ce-work-beta Codex delegation: pre-checks pass, then Claude Code's auto-mode classifier blocks the codex exec launch (no fallback)
Summary
Run ce-work-beta with delegate:codex and work_delegate_sandbox: yolo, and all four Pre-Delegation Checks pass. The workflow then tries to launch codex exec --dangerously-bypass-approvals-and-sandbox. In Claude Code's auto permission mode, the auto-mode classifier denies that command outright. The skill has no pre-check for this, no warning, and no documented fallback, so the run stops dead right after telling the user delegation is active.
The skill's Consent Flow gates on its own config file (work_delegate_consent: true in .compound-engineering/config.local.yaml). That is a separate authorization layer from Claude Code's Bash permission rules, and the two never meet. Writing consent into the skill config does not grant the harness permission to run the dangerous command.
Environment
- compound-engineering plugin 3.12.0, skill
ce-work-beta
- Codex CLI
codex-cli 0.139.0
- Orchestrator: Claude Code in auto permission mode
- No
codex allowlist in settings.json or settings.local.json (default state)
Steps to reproduce
- Write
.compound-engineering/config.local.yaml with work_delegate: codex, work_delegate_consent: true, work_delegate_sandbox: yolo.
- Run Claude Code in auto permission mode with no allowlist entry for
codex exec.
- Invoke the skill with
delegate:codex on a plan file.
- Watch the four Pre-Delegation Checks (platform gate, env guard, availability, consent) pass.
- The skill reaches Execution Loop Step A and issues the background Bash call:
codex exec -c model_reasoning_effort=high --dangerously-bypass-approvals-and-sandbox --output-schema ... -o ... - < prompt.
Expected
One of two behaviors:
- The skill confirms the launch will be permitted before it promises delegation. It checks the harness permission posture, or it folds a scoped
codex exec allowlist rule into the consent flow.
- The skill catches the denial and falls back to standard mode, the same way it already handles other Pre-Delegation Check failures, and tells the user how to allowlist
codex exec.
Actual
Claude Code's auto-mode classifier denies the launch. Its stated reason: the command spawns a Codex agent with --dangerously-bypass-approvals-and-sandbox, an unsafe autonomous agent loop the user never explicitly authorized. The four checks had already shown green, so the user is told delegation is active and then hits a wall with no recovery path the skill defines.
Root cause
references/codex-delegation-workflow.md treats the skill's config consent as enough authorization to run codex exec --dangerously-bypass-approvals-and-sandbox. The harness permission layer gates the actual launch, and the skill never inspects or reconciles it. Grep the whole skill and you find no mention of settings.json, Bash allowlists, the auto-mode classifier, or a harness-level denial of the launch command. The one permission note covers subagent mode, not codex exec. The skill marks yolo as Recommended, so the recommended path is the one most likely to be blocked.
Impact
In auto mode, Codex delegation does not work out of the box. The flag the skill recommends gets denied, nothing catches it, and the user is stranded mid-workflow. The failure stays hidden until the launch: every pre-check passes, so the user only finds out after the orchestrator has already written the scratch files, the prompt, and the schema. The defect lives in the shared references/codex-delegation-workflow.md, so it will reach stable ce-work too once delegation lands there.
Suggested fix (one or more)
- Pre-check the harness permission posture before promising delegation. If
codex exec is not allowlisted, guide the user to add a scoped Bash rule, or fall back to standard mode up front.
- Fold harness allowlisting into the Consent Flow. When the user grants consent, offer to write a scoped allowlist rule such as
Bash(codex exec:*) to settings.local.json.
- Catch the launch denial and fall back gracefully, the way other Pre-Delegation Check failures already do.
- Document that yolo-mode delegation needs the orchestrating harness to permit
codex exec --dangerously-bypass-approvals-and-sandbox, so the Recommended label does not mislead users in auto mode.
Related issues
Notes
A workaround today: add a Bash rule allowing codex exec to settings.local.json, or run delegation in a permission mode that prompts interactively instead of auto-denying. The skill mentions neither.
ce-work-beta Codex delegation: pre-checks pass, then Claude Code's auto-mode classifier blocks the
codex execlaunch (no fallback)Summary
Run
ce-work-betawithdelegate:codexandwork_delegate_sandbox: yolo, and all four Pre-Delegation Checks pass. The workflow then tries to launchcodex exec --dangerously-bypass-approvals-and-sandbox. In Claude Code's auto permission mode, the auto-mode classifier denies that command outright. The skill has no pre-check for this, no warning, and no documented fallback, so the run stops dead right after telling the user delegation is active.The skill's Consent Flow gates on its own config file (
work_delegate_consent: truein.compound-engineering/config.local.yaml). That is a separate authorization layer from Claude Code's Bash permission rules, and the two never meet. Writing consent into the skill config does not grant the harness permission to run the dangerous command.Environment
ce-work-betacodex-cli 0.139.0codexallowlist insettings.jsonorsettings.local.json(default state)Steps to reproduce
.compound-engineering/config.local.yamlwithwork_delegate: codex,work_delegate_consent: true,work_delegate_sandbox: yolo.codex exec.delegate:codexon a plan file.codex exec -c model_reasoning_effort=high --dangerously-bypass-approvals-and-sandbox --output-schema ... -o ... - < prompt.Expected
One of two behaviors:
codex execallowlist rule into the consent flow.codex exec.Actual
Claude Code's auto-mode classifier denies the launch. Its stated reason: the command spawns a Codex agent with
--dangerously-bypass-approvals-and-sandbox, an unsafe autonomous agent loop the user never explicitly authorized. The four checks had already shown green, so the user is told delegation is active and then hits a wall with no recovery path the skill defines.Root cause
references/codex-delegation-workflow.mdtreats the skill's config consent as enough authorization to runcodex exec --dangerously-bypass-approvals-and-sandbox. The harness permission layer gates the actual launch, and the skill never inspects or reconciles it. Grep the whole skill and you find no mention ofsettings.json, Bash allowlists, the auto-mode classifier, or a harness-level denial of the launch command. The one permission note covers subagentmode, notcodex exec. The skill marksyoloas Recommended, so the recommended path is the one most likely to be blocked.Impact
In auto mode, Codex delegation does not work out of the box. The flag the skill recommends gets denied, nothing catches it, and the user is stranded mid-workflow. The failure stays hidden until the launch: every pre-check passes, so the user only finds out after the orchestrator has already written the scratch files, the prompt, and the schema. The defect lives in the shared
references/codex-delegation-workflow.md, so it will reach stablece-worktoo once delegation lands there.Suggested fix (one or more)
codex execis not allowlisted, guide the user to add a scoped Bash rule, or fall back to standard mode up front.Bash(codex exec:*)tosettings.local.json.codex exec --dangerously-bypass-approvals-and-sandbox, so the Recommended label does not mislead users in auto mode.Related issues
ce-work-beta: delegation silently falls back whencodex-delegation-workflow.mdis read relative to CWD). Same skill and same delegation flow, different failure mode. There the workflow file never loads; here it loads, the pre-checks pass, and the launch itself is denied. This bug sits downstream of ce-work-beta: delegation silently falls back to standard mode when references/codex-delegation-workflow.md is read relative to project CWD #949.codex execlaunch.Notes
A workaround today: add a Bash rule allowing
codex exectosettings.local.json, or run delegation in a permission mode that prompts interactively instead of auto-denying. The skill mentions neither.