Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/codermagefox/claudecode-codex-subagents/codex-subagentsgit clone --depth 1 https://github.com/CoderMageFox/claudecode-codex-subagentsWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00027 | $0.03435 |
| Opus 5 | $0.00014 | $0.01717 |
| Sonnet 5 | $0.00005 | $0.00687 |
| Haiku 4.5 | $0.00003 | $0.00344 |
Grade A, and why
codex-subagents scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
95% identical to codex-subagents — 8 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 452 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codex Subagents - Codex 子代理编排
You are coordinating a complex task by delegating to multiple Codex sub-agents via MCP.
Your Role
Act as an intelligent orchestrator that:
- Analyzes the task and breaks it into parallelizable units
- Delegates to Codex agents via
mcp__codex-subagent__spawn_agents_parallel(max 3 agents per batch) - Chains execution if >3 agents needed, with progress tracking using TodoWrite
- Logs all subagent activities to
.codex-temp/[timestamp]/[function-name].log - Collects results and intelligently merges them
- Validates quality through comprehensive checks
- Reports results with actionable next steps
Task: $ARGUMENTS
Process Flow
Step 0: Ensure .gitignore Setup (5 seconds)
IMPORTANT: Prevent committing temporary files
Before starting, ensure the project has proper .gitignore configuration:
# Check if .gitignore exists
if [ ! -f .gitignore ]; then
echo "Creating .gitignore to prevent committing temporary files..."
cat > .gitignore << 'EOF'
# Codex Subagents temporary files
.codex-temp/
# Common temporary files
*.log
.DS_Store
EOF
echo "✓ Created .gitignore"
else
# Check if .codex-temp/ is already ignored
if ! grep -q "\.codex-temp/" .gitignore; then
echo "Adding .codex-temp/ to .gitignore..."
echo "" >> .gitignore
echo "# Codex Subagents temporary files" >> .gitignore
echo ".codex-temp/" >> .gitignore
echo "✓ Updated .gitignore"
fi
fi
Why this matters:
.codex-temp/contains agent logs and temporary files- These files are project-specific and should NOT be committed
- Ensures clean git history without temporary artifacts
Step 1: Task Analysis (30 seconds)
Analyze the task to understand:
- Scope and boundaries
- File dependencies
- Optimal parallelization strategy
- Expected complexity
Questions to answer:
- What files/components need changes?
- Are changes independent or dependent?
- What's the optimal agent count (3-7)?
- What patterns should be followed?
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 452 lines · 27 tokens per session scan A 0ad9077b16a6
codex-subagents is a command published in the GitHub repository CoderMageFox/claudecode-codex-subagents (49 stars, last pushed 9mo ago), licensed MIT. It adds 27 tokens to every session and 3,435 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to codex-subagents, differing in 8 lines, and is treated as a copy.
Other commands, from other repositories
brainstorm
Interactive requirements discovery through Socratic dialogue and systematic exploration.
brainstorm
Interactive requirements discovery through Socratic dialogue and systematic exploration.
image-node-prompt-pack
Build the dual-variant prompt pack, imagegen packet, and initial manifest using the selected library template.
greet
Generate contextual agent greeting using GreetingBuilder infrastructure.
plan-workflow
Generate a skill chain plan for a high-level goal by analyzing the skills registry for input/output compatibility.
perf-difficult-conversation
Three-conversations framework rehearsal (Stone/Patton/Heen — Harvard Negotiation Project) for high-stakes conversations — termination, demotion, hard feedback, conflict surfacing. Produces three-conversations breakdown (what-happened / feelings / identity), conversation script with multiple opening choices, SCARF…