# Codex Control

> Use when a harness stage must delegate Implement or Test work to local Codex CLI from plugin, repo-local, or embedded installs.

- Skill: `newkayak12/codex-control-2` (Agent Skill)
- Install (CLI): `npx skillmds@latest add newkayak12/codex-control-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/newkayak12/codex-control-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: newkayak12 (https://skillmd.com/u/newkayak12)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/newkayak12/codex-control-2

---


# 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:

1. Explicit `codex_adapter_path` from the Workflow args, when provided.
2. Beta repo layout: `harness-beta/engine/codex-exec-adapter.mjs`.
3. Stable repo layout: `harness/engine/codex-exec-adapter.mjs`.
4. Embedded stable install layout: `.claude/harness/engine/codex-exec-adapter.mjs`.
5. Plugin-mode layout: derive `engine/codex-exec-adapter.mjs` beside the beta
   `pipeline.js` path 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.

