Repository navigation
fix(sdk): probe the Codex sandbox before starting a billed scan - #1084
Merged
mldangelo-oai merged 2 commits intoSep 30, 2026
Merged
mldangelo-oai merged 2 commits into
mldangelo-oai merged 2 commits into
Conversation
Runtime preparation now runs `codex sandbox -- true` with the Codex command and CODEX_HOME the scan will use. When the sandbox backend cannot start, every shell command the scan agent issues fails, no draft artifacts are written, and the scan still runs to completion before the seal check reports a missing contract. The probe costs a few milliseconds and turns that into an immediate SandboxUnavailableError carrying what Codex reported, the command to reproduce it, and a pointer to the AppArmor profile that Linux hosts and containers restricting unprivileged user namespaces need. The probe is skipped on Windows, where there is no separate sandbox backend that can fail to start. Co-Authored-By: Claude Opus 5 <[email protected]>
mldangelo-oai
approved these changes
Sep 30, 2026
mldangelo-oai
left a comment
Collaborator
There was a problem hiding this comment.
Thank you for adding this preflight. Catching a sandbox startup failure before spending model time is a useful improvement. I’ve reviewed the updated probe and regression coverage, including cancellation and fresh and resumed Deep Scan workers. The final commit passes the required Linux, macOS, and Windows checks. Looks good to merge.
Merged
3 tasks done
This was referenced Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Report Unix sandbox startup failures during runtime preparation, before plugin bootstrap or a billed Codex thread starts. The error includes Codex's diagnostic output and points to the existing Linux sandbox setup guidance.
Changes
--versioninsidecodex sandbox, using the scan's environment and Codex home, a ten-second timeout, and caller cancellation.SandboxUnavailableErrorand stop runtime preparation when the probe fails.Testing
pnpm run typesandpnpm run format: passed.pnpm --dir sdk/typescript run build:ci: passed.Risk and rollout
Adds one local process check before scan startup on Unix, with no model request or new CLI options. The probe uses the already selected Codex executable and preserves scan settings. Windows keeps its existing startup behavior. Cross-platform CI passed on the final commit.
Public disclosure review