## Problem Codex follow-up turns fail immediately with: ``` error: unexpected argument '--sandbox' found Usage: codex exec resume --json --skip-git-repo-check --model <MODEL> --config <key=value> <SESSION_ID> [PROMPT] ``` Seen on Codex CLI 0.152.0 after a first turn that itself failed with `gpt-5.6-sol` requiring a newer Codex. ## Root cause `electron/providers.js` `buildArgs` always appends `--sandbox <mode>` (issue #170). Live CLI: - `codex exec` accepts `-s, --sandbox` (read-only | workspace-write | danger-full-access) - `codex exec resume` does **not** list `--sandbox` (only `--dangerously-bypass-approvals-and-sandbox`) A nightly from origin/main (`dc15acba` / v0.17.0) cannot fix this; the argv is unchanged. ## Fix Omit `--sandbox` on the resume path. Fresh `exec` still passes it. Session inherits the first-turn sandbox policy. ## Test `getProvider("codex").buildArgs({ sessionId })` must not include `--sandbox`. Fresh exec still maps permissionMode as today.
Activity
fix(codex): omit --sandbox on exec resume (#795) (#797)