codex-control
Resolve and run the harness beta Codex CLI bridge without assuming the project embedded
.claude/harness/**.
Adapter Resolution
Use the first existing codex-exec-adapter.mjs path:
- Explicit
codex_adapter_pathfrom the Workflow args, when provided. - Beta repo layout:
harness-beta/engine/codex-exec-adapter.mjs. - Stable repo layout:
harness/engine/codex-exec-adapter.mjs. - Embedded stable install layout:
.claude/harness/engine/codex-exec-adapter.mjs. - Plugin-mode layout: derive
engine/codex-exec-adapter.mjsbeside the betapipeline.jspath used for the current Workflow call.
If none exists, record that Codex was unavailable and continue through the normal Claude/Sonnet path.
Run Contract
- Always run
node "$ADAPTER" --detect --cwd "$PWD" --output <providers.json>before asking Codex to implement or verify. - Use a separate Codex process for Implement and Test.
- Implement may use
--sandbox workspace-write. - Test prompts must be verification-only: do not ask Codex to change implementation files, and do not trust the Implement narrative without command/file evidence.
- After Codex returns, read the adapter JSON and produce the normal harness artifact shape expected by the current stage.