claude-codex-subagent
CLAUDE.md4 starsChanged 7 months agoMITView on GitHub
Default answer language for this maintainer is Chinese unless the user asks for English. Keep responses direct and evidence-backed. This repo teaches Claude Code to use local Codex as a worker subagent. Claude keeps orchestration, judgment, and user conversation state. Codex handles context-heavy or tool-heavy work: current web facts, large reads, bulk repo analysis, long file writes, audits, test runs, and fresh-context debugging. For Codex CLI 0.141.0+: Use stdin for generated or multiline prompts. Do not teach new examples with…
In this repository2 other files it gives its agents.
- AGENTS.mdAGENTS.md
- codex-subagentSkill
The file
We split this CLAUDE.md into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 3
Default answer language for this maintainer is Chinese unless the user asks for English.
- Very specific: line 21
Use stdin for generated or multiline prompts.
- Distinctive: line 39
Every dispatch prompt should include:
- Distinctive: line 48
Prefer short final returns.
- Very specific: line 59
When using a persona through scripts/codex-dispatch.sh, pass only the task specific scope as the argument.
- Distinctive: line 64
Read in this order before changing behavior:
- Distinctive: line 75
Use the dispatch guide for exact Codex CLI parameters.
- Distinctive: line 79
Before finishing, run the validation commands in AGENTS.md.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Claude Maintainer Guide
Default answer language for this maintainer is Chinese unless the user asks for English. Keep responses direct and evidence-backed.
What This Repo Teaches
This repo teaches Claude Code to use local Codex as a worker subagent. Claude keeps orchestration, judgment, and user conversation state. Codex handles context-heavy or tool-heavy work: current web facts, large reads, bulk repo analysis, long file writes, audits, test runs, and fresh-context debugging.
Dispatch Defaults
For Codex CLI 0.141.0+:
codex exec --skip-git-repo-check --sandbox workspace-write -C <repo> -Use stdin for generated or multiline prompts. Do not teach new examples with
--full-auto; it is deprecated. If a persona still says sandbox: full-auto,
the wrapper treats it as a legacy alias for --sandbox workspace-write.
Escalate deliberately:
--sandbox workspace-write: normal local repo reads, edits, tests, lint, build.--search: helper-script shorthand for current public web facts. Directcodex execuses--config web_search="live"; top-level interactivecodexsupports--search.--dangerously-bypass-approvals-and-sandbox: shell network, cross-workspace access, global installs, or Windows sandbox ACL fallback after reporting the exact error.--ephemeral: throwaway checks that should not persist a session.--json,-o,--output-schema: automation and machine-readable outputs.
How To Prompt Codex
Every dispatch prompt should include:
- goal and done condition,
- scope and working directory,
- what not to touch,
- exact return format,
- verification expectations,
- whether file edits are allowed.
Prefer short final returns. The point of this skill is to avoid reinflating the main Claude context with Codex's full internal work.
Use Personas
reviewer: severity-ranked code review.debugger: fresh root-cause analysis.auditor: security audit.researcher: current web/docs research.refactorer: cleanup/dead-code/stale TODO survey.
When using a persona through scripts/codex-dispatch.sh, pass only the task
specific scope as the argument; the persona supplies the contract.
Maintenance Workflow
Read in this order before changing behavior:
AGENTS.mdskills/codex-subagent/SKILL.mddocs/codex-dispatch-guide.mddocs/prompt-and-agent-patterns.mdscripts/codex-dispatch.shscripts/doctor.shpersonas/README.mdREADME.mdandINSTALL.md
Use the dispatch guide for exact Codex CLI parameters. Use the prompt and agent patterns guide for public-facing prompt contracts, persona design, skill design, command design, result handling, and release-safe redaction rules.
Before finishing, run the validation commands in AGENTS.md. If a real Codex
dispatch fails because of Windows sandbox ACL setup, report that as a local
Codex sandbox limitation and validate the non-destructive path with bypass only
when the task permits it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

