Skip to content

fix: Save scan instructions before Deep workers start - #600

Open
ianw-oai wants to merge 1 commit into
mainfrom
dev/ianw/persist-scan-prompt-20260821
Open

fix: Save scan instructions before Deep workers start#600
ianw-oai wants to merge 1 commit into
mainfrom
dev/ianw/persist-scan-prompt-20260821

Conversation

@ianw-oai

Copy link
Copy Markdown
Collaborator

Summary

The SDK sent scan instructions to the parent agent but did not save them with the scan. Deep workers read the saved scan context, so they could start without these instructions.

Save options.scanPrompt in scans.user_context during registration, before workers start. This does not depend on the parent agent to copy the text.

Changes

  • Send scan instructions through the existing stdin transport.
  • Preserve UTF-8 text, whitespace, and line endings without trimming.
  • Save the context in the existing registration transaction.
  • Test the saved context and Deep worker prompt with synthetic inputs. Check scans without instructions and scans with knowledge-base input.

Testing

All checks passed on the final patch:

  • Focused API and Deep workbench tests: 150 passed, 2 skipped, 0 failed.
  • pnpm run test --seed 12345 --only-failures: 1,484 passed, 29 skipped, 0 failed.
  • pnpm run test --only-failures (seed 666922896): 1,484 passed, 29 skipped, 0 failed.
  • pnpm run types
  • pnpm run format
  • git diff --check

Risk and rollout

No public commands, flags, settings, or prompt text change. Scans without a scan prompt keep the existing behavior. Knowledge-base handling is unchanged.

The change uses the existing context field and transaction. No database migration or special rollout step is required. It applies to new scan registrations and does not change saved scans.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@ianw-oai ianw-oai changed the title [codex] Save scan instructions before Deep workers start fix: [codex] Save scan instructions before Deep workers start Aug 21, 2026
@github-actions github-actions Bot added the bug Something isn't working label Aug 21, 2026
@ianw-oai ianw-oai changed the title fix: [codex] Save scan instructions before Deep workers start fix: Save scan instructions before Deep workers start Aug 21, 2026
@ianw-oai
ianw-oai marked this pull request as ready for review August 21, 2026 16:38
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-08-21T16:41:20.967774Z 0a6c8ad Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant