Install
openclaw skills install codex-handoff-skillOffload finalized coding plans to Codex CLI for automated execution. Use when: user says "hand off to codex", "let codex do it", "offload to codex", runs /codex-handoff, or has a plan ready for Codex CLI execution. Claude Code acts as supervisor/judge in a loop — Codex CLI does the coding.
openclaw skills install codex-handoff-skillClaude Code is the supervisor/judge. Codex CLI is the executor. You orchestrate a loop: send plan to Codex, review results, re-run if incomplete, until the task is comprehensively done.
Announce at start: "Using codex-handoff to orchestrate Codex CLI execution of the plan."
codex --version)docs/plans/, .claude/plans/, or provided inline)docs/plans/, .claude/plans/, or user arguments)--full-auto mode| Task | Details |
|---|---|
| Build Codex prompt | prompt-templates.md |
| Review & audit results | review-process.md |
| Handle errors | error-handling.md |
Find the plan to execute. Search in order:
docs/plans/ for the most recent .md file (sorted by date prefix).claude/plans/ for any recent plan filesOnce found:
After reading the plan, scan for H2 headings matching: ## Phase N:, ## Stage N:, ## Part N:, or numbered sections like ## 1. Backend.
--phase N — Optional. Re-run only phase N.See prompt-templates.md. Use the "Initial Execution Prompt" for single-pass, or "Phase-Scoped Execution Prompt" for phased mode (current phase only + completed phase summaries).
Parse optional arguments:
--max-iterations N — max loop iterations (default: 5, per-phase in phased mode)--model MODEL — pass to codex as -m MODEL--phase N — execute only this phase (phased mode only)codex exec --full-auto -s workspace-write [-m MODEL] < /tmp/codex-handoff-{timestamp}.md
Let the command run to completion. Capture stdout and exit code. Report: "Codex iteration {N} complete. Reviewing changes..."
Phased execution flow: For each phase (or single phase if --phase N): build phase-scoped prompt → run Codex → review → correction loop (up to max-iterations) → phase passes: record summary, advance → phase fails at max: ask user to continue or stop.
See review-process.md for the review checklist, scorecard, and decision matrix. In phased mode, the scorecard is scoped to current phase items only.
See report format in review-process.md. In phased mode, report per-phase results then aggregate. If items remain, suggest --phase N to retry.