Repository navigation
Closed
Labels
ready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agent
Description
Parent
What to build
harness codex runs a Command's sessions on Codex. A Run on Codex can go from the implement session through Repairs to a pull request that is ready for review, or merged in a Merge run, just as it does on Claude. See ADR 0012 and docs/research/codex-headless-harness.md.
- Starting a session. Each session runs
codex exec --json --dangerously-bypass-approvals-and-sandboxin the Run's worktree, with stdin set to null (Codex waits for stdin to close).- It gets
-m <model>and the reasoning-effort config setting when those are set. - It also gets the config setting that makes Codex read
CLAUDE.mdwhen a repository has noAGENTS.md.
- It gets
- Skills. The Factory skills are linked into the worktree under
.agents/skills/, hidden through.git/info/exclude, as for Claude. Each Session prompt's first line invokes its skill as$thirdshift-<skill>. Theprompts/page keeps the Claude rendering, with a one-line note on Codex. - Reading the stream. Codex's JSONL stream feeds the same behaviour a Claude stream does:
- the session id comes from
thread.started - progress lines on stderr come from
item.*events (commands, file changes, tool calls), with a session-ended summary - the full stream is kept as the Session log
- the final message is the last
agent_message - a failed session (
turn.failed, or a non-zero exit) fails as a Claude session does, with Codex's error in the cause. A retryableerrorevent alone isn't fatal.
- the session id comes from
- Checks before work. The Model and Effort are checked against
codex debug models, which costs no tokens.- Names match regardless of case, and a display name turns into its slug:
GPT-6.1-Solbecomesgpt-6.1-sol, andMaxbecomesmax. - The Effort must be one of the levels that Model supports.
- A failure happens before the Claim, the worktree and any log, and lists the valid choices.
- The "not supported yet" refusal from the Harness, Model and Effort Ticket goes away.
- Names match regardless of case, and a display name turns into its slug:
- Recording. Recording works as for Claude, with the translated names.
Acceptance criteria
- With
harness codex, a fresh Run's implement session, its Repairs, and a Spec run's Ticket Runs and Spec review all run oncodex execwith the bypass flag, the Model and Effort, theCLAUDE.mdfallback, and stdin set to null. An Architect run's Architecture review does too. - Every
thirdshift-*skill is found in the worktree's.agents/skills/, none appears ingit status, and each prompt's first line uses$thirdshift-<skill>. - Progress lines, the session-ended summary, the Session log and the final message come from Codex's stream.
- A session that ends in
turn.failedor exits non-zero fails the Run with Codex's error in the cause. -
model GPT-6.1-Sol effort Maxreaches Codex asgpt-6.1-solandmax. An unknown Model, or an Effort that Model doesn't support, fails before the Claim, the worktree and any log, naming the valid choices. - The fake gains a
codexpersonality:exec --json,debug modelsfrom a fixed catalog, and per-test scripts like the fakeclaude. -
prompts/is regenerated, with the Codex note.
Blocked by
Metadata
Metadata
Assignees
Labels
ready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agent
Activity
Check the fake codex's stdin by fstat, as macOS has no /proc (#394)
JacobStephens2 commentedon Oct 5, 2026
Closed by #404, merged into issue-136 by a thirdshift Merge run.