codex-control
Resolve and run the harness 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. - Project-local repo layout:
harness/engine/codex-exec-adapter.mjs. - Embedded install layout:
.claude/harness/engine/codex-exec-adapter.mjs. - Plugin-mode layout: read the project's
CLAUDE.mdHarness block, find theWorkflow({ scriptPath: "<harness plugin root>/engine/pipeline.js", ... })example, and derive<harness plugin root>/engine/codex-exec-adapter.mjs.
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.