Enable Claude Code to leverage OpenAI Codex CLI for plan review, code review, and complex problem discussions.
The Problem: Blindly letting AI write code often results in low success rates. Complex tasks need thorough analysis before implementation.
The Solution: Combine Claude's speed with Codex's reasoning:
- ✅ Plan Review — review implementation plans BEFORE coding
- ✅ Code Review — deep analysis of a diff
- ✅ Complex Questions — technical discussions requiring deep reasoning
- ✅ Multi-Round — iterative refinement via session
resume
The Philosophy: In plan-and-review workflows, a second opinion matters. Claude Code is fast; Codex adds thorough analysis. Combining both raises quality.
codex exec is non-interactive, not "single-shot". Each call runs a full agent loop: Codex autonomously reads files, greps, runs shell commands, and reasons over many steps before returning. The skill uses exec because you can't drive the interactive TUI from another agent — but exec keeps the full agentic loop. For follow-up rounds, resume the same session by its session id (see Multi-Round below).
which codex && codex --versionInstall path depends on your installer (e.g. ~/.local/bin/codex, or a package manager). If missing, follow the OpenAI Codex CLI install docs.
Check the current one first:
codex login statusParadigm A — ChatGPT account (OAuth) — uses your ChatGPT subscription quota + rate limits:
codex login # opens a browser to authorize; no API key neededStatus shows Logged in using ChatGPT.
Paradigm B — API key — billed per API usage:
codex login --with-api-key # reads key from stdin
# non-interactive: codex login --with-api-key <<< "$OPENAI_API_KEY"Status shows Logged in using an API key - sk-***.
Commands are identical under both paradigms. What differs: billing, rate limits, and which model names are available.
claude skill add https://github.com/Awakehsh/awesome-agent-tools/tree/main/skills/codex-cli$skill-installer https://github.com/Awakehsh/awesome-agent-tools/tree/main/skills/codex-cligit clone https://github.com/Awakehsh/awesome-agent-tools.git
cp -r awesome-agent-tools/skills/codex-cli ~/.claude/skills/- If the user names a model, use exactly that model.
- If not, do NOT pass a model flag — Codex uses the default from
~/.codex/config.toml. - Never hardcode a model name. Names change across releases and differ between login modes; hardcoding causes "model does not exist" failures.
- See the active default: any
codex execheader printsmodel: <name>, or readmodel = "..."in~/.codex/config.toml.
Note on flags: top-level
codex reviewhas no-m— pass a model with-c model="...".codex exec/codex exec reviewaccept-m.
/codex-cli ask "your question" # quick question
/codex-cli reviewplan # review an implementation plan
/codex-cli review --uncommitted # review uncommitted changes
/codex-cli review --base main # review changes vs a branchUnderlying commands (follow config model by default):
codex review --uncommitted
codex review --base main
codex exec "Review this plan: [...]" --skip-git-repo-checkcodex exec's nominal default is read-only, but ~/.codex/config.toml (sandbox_mode) overrides it. If your config sets danger-full-access, commands run with full write access unless you pass -s read-only. This skill follows your config — it does not force a sandbox. For a guaranteed no-writes review, add -s read-only. Check the sandbox: <mode> line in the codex exec header.
| Capability | Status |
|---|---|
| Shell + file tools (read repo, grep, run commands) | ✅ stable |
| Web / internet search | |
browser_use / computer_use |
exec |
# Round 1 — capture the session id printed in the header
codex exec review --uncommitted # header: session id: <UUID>
# Round 2+ — resume that EXACT session (never --last in automation)
codex exec resume <UUID> "Re-review after I addressed points 1 and 3."resume --last is unreliable: any concurrent Codex call becomes "last". Always resume by explicit <session-id>.
- Default: follow config (don't pass an effort flag).
- Override per call:
-c model_reasoning_effort="medium|high|xhigh".
| Error | Solution |
|---|---|
command not found: codex |
Install Codex CLI; which codex should return your path. |
Authentication required |
codex login (account) or codex login --with-api-key (API); verify codex login status. |
model 'xxx' does not exist |
Drop -m to use the config default (name unavailable in your login mode). |
-m rejected on codex review |
Top-level review has no -m; use -c model="..." or codex exec review. |
Specify --uncommitted, --base, or --commit |
Give the review a target. |
| Resume lost context | You used --last with concurrent sessions; resume by explicit <session-id>. |
| Aspect | Detail |
|---|---|
| Code transmission | Your code/prompts are sent to OpenAI for processing. |
| Credentials | Stored under ~/.codex/ (auth.json); keep the directory private. |
| Sandbox | Follows config.toml; add -s read-only for guaranteed no-writes. |
| Sensitive code | Be mindful when reviewing secrets or proprietary logic. |
See OpenAI's data usage policies.
/codex-cli reviewplan
↓
Bash: codex exec "Review this plan..." (follows config model; full agent loop)
↓
Codex autonomously reads files / runs tools / reasons
↓
Returns: APPROVED / NEEDS REVISION
↓
Round 2+ via: codex exec resume <session-id> "..."
Open an issue: https://github.com/Awakehsh/awesome-agent-tools/issues
MIT License — see LICENSE
- OpenAI Models Documentation — model names change; verify against your login mode.
- Local source of truth:
~/.codex/config.tomlandcodex login status.