claudeers.

🔓 unclaimed — this page was auto-generated from GitHub. Are you the creator?

Claim this page →
// Automation & Workflows

codex-claude-subagents

Claude as subagents in Codex — scoped workers, resumable sessions, git-ignored logs.

Actively maintained
99/100
last commit 7 days ago
last release none
releases 0
open issues 0
// install
git clone https://github.com/jnopareboateng/codex-claude-subagents

codex-claude-subagents

Use Claude as subagents in Codex. Yep, that's it.

No more keeping Codex and Claude open side by side, manually shuttling context between them. This skill lets Codex spawn Claude CLI workers directly — scoped to a directory, resumable by session ID, logs kept out of git.

OpenAI ships a Codex plugin for Claude Code. This is the other direction: Claude as a worker, orchestrated from inside Codex.


Why

Codex and Claude are both capable agents with different strengths. Codex excels at orchestration, planning, and driving multi-step workflows. Claude excels at deep reasoning, careful edits, and long-horizon tasks. Running Claude subagents from inside Codex lets you get the best of both — without a framework, extra packages, or glue code.

This skill wires them together:

Architecture diagram

No framework, no extra packages — stdlib only.


Install

cp -R skills/claude-subagents ~/.codex/skills/

Restart your Codex session after installing — Codex discovers skills at session start.

Requirements


Quickstart

Read-only audit

python3 ~/.codex/skills/claude-subagents/scripts/run_claude_subagent.py \
  --task audit-security \
  --prompt examples/prompts/read-only-audit.md

Scoped fix

python3 ~/.codex/skills/claude-subagents/scripts/run_claude_subagent.py \
  --task fix-auth \
  --prompt examples/prompts/scoped-fix.md \
  --write-scope src/auth

Resume an interrupted run

python3 ~/.codex/skills/claude-subagents/scripts/run_claude_subagent.py \
  --task fix-auth \
  --prompt examples/prompts/scoped-fix.md \
  --session-id <session-id-from-ledger> \
  --write-scope src/auth

Session IDs are stored in .agent-runs/claude/ledger.json after each run.


How to use from inside Codex

Once the skill is installed, Codex picks it up automatically. Ask Codex things like:

"Run a security audit on this repo using the Claude subagent skill."

"Delegate the auth refactor to a Claude worker scoped to src/auth."

Codex will invoke the launcher, wait for the summary, and report back.


CLI reference

run_claude_subagent.py [options]

Required:
  --task   <id>       Stable kebab-case task identifier (used for log filenames)
  --prompt <file>     Markdown prompt file to send to the worker

Optional:
  --write-scope <dir> Directory the worker may edit (repeatable; omit = read-only)
  --session-id  <id>  Resume a previous Claude session
  --model       <m>   Claude model (default: sonnet)
  --effort      <e>   Reasoning effort: low|medium|high|xhigh|max (default: high)
  --permission-mode   Claude permission mode (default: acceptEdits)
  --cwd         <dir> Working directory for the Claude run (default: .)
  --name        <n>   Display name for the session (default: task id)

Log layout

All logs are written to .agent-runs/claude/ in the working directory. This path is automatically added to .gitignore.

FileContents
ledger.jsonIndex of all runs — task, session ID, timestamps, exit code
<task>.jsonlStreaming structured output from Claude
<task>.stderr.logstderr from the Claude process
<task>.prompt.mdFull injected prompt (worker contract + your prompt)
<task>.summary.mdFinal summary written by the Claude worker

Worker contract

Every prompt is prepended with a contract that tells Claude:

  • Codex is lead orchestrator; Claude is a scoped worker
  • Writes are restricted to --write-scope (or read-only if unset)
  • Structured output goes to logs; don't summarize to stdout
  • Write a compact summary to .agent-runs/claude/<task>.summary.md
  • Summary must include: Outcome, Files Inspected, Files Changed, Verification, Risks, Next

This contract is injected automatically — your prompt file only needs the task description.


Example prompts

Ready-made prompts live in examples/prompts/:

PromptUse case
read-only-audit.mdSecurity audit — no writes, structured findings table
scoped-fix.mdTemplate for a scoped fix — fill in the issue description

Concurrency and feedback model

Workers run sequentially per launcher call. The launcher blocks on subprocess.run until the Claude process exits. There is no built-in parallel dispatch.

To run multiple workers in parallel, background multiple launcher calls with distinct --task IDs:

python3 run_claude_subagent.py --task audit-auth  --prompt prompts/audit.md &
python3 run_claude_subagent.py --task audit-tests --prompt prompts/audit.md &
wait

Per-task log files (<task>.jsonl, <task>.summary.md) are keyed by task ID and do not collide. ledger.json is a shared file with no write lock — if two workers finish simultaneously, one ledger entry can be lost. For hard guarantees, add a file lock around the ledger write or use separate ledger files per task.

Feedback is post-hoc and one-way. Codex is blind while a worker runs. The only output channel is the summary file the worker writes on exit, plus the JSON blob the launcher prints to stdout on completion. There is no mid-run signalling: the worker cannot return partial results, and Codex cannot interrupt or redirect a running worker. To get intermediate visibility, tail the .jsonl log from a separate process while the worker runs.


Limitations

  • Requires Claude CLI installed and authenticated locally.
  • Codex does not hot-reload skills — restart the session after cp.
  • Broad --write-scope values (. or /) are unsafe; always scope to the minimum required directory.
  • Session resumption depends on Claude CLI's --session-id support; behaviour may vary across CLI versions.

Contributing

Issues and PRs welcome. Keep it stdlib-only — no new runtime dependencies.

// compatibility

Platformscli, api
Operating systems
AI compatibilityclaude
LicenseMIT
Pricingopen-source
LanguagePython

// faq

What is codex-claude-subagents?

Claude as subagents in Codex — scoped workers, resumable sessions, git-ignored logs.. It is open-source on GitHub.

Is codex-claude-subagents free to use?

codex-claude-subagents is open-source under the MIT license, so it is free to use.

What category does codex-claude-subagents belong to?

codex-claude-subagents is listed under data in the Claudeers registry of Claude-compatible tools.

0 views
12 stars
unclaimed
updated 15 days ago

// embed badge

codex-claude-subagents on Claudeers
[![Claudeers](https://claudeers.com/api/badge/codex-claude-subagents.svg)](https://claudeers.com/codex-claude-subagents)

// retro hit counter

codex-claude-subagents hit counter
[![Hits](https://claudeers.com/api/counter/codex-claude-subagents.svg)](https://claudeers.com/codex-claude-subagents)

// reviews

// guestbook

0/500

// related in Automation & Workflows

🔓

The agent that grows with you

// automationNousResearch/Python211,605MIT[ claude ]
🔓

The API to search, scrape, and interact with the web at scale. 🔥

// automationfirecrawl/TypeScript143,720AGPL-3.0[ claude ]
🔓

🌐 Make websites accessible for AI agents. Automate tasks online with ease.

// automationbrowser-use/Python103,709MIT[ claude ]
🔓

An open-source long-horizon SuperAgent harness that researches, codes, and creates. With the help of sandboxes, memories, tools, skill, subagents and message…

// automationbytedance/Python76,016MIT[ claude ]
→ see how codex-claude-subagents connects across the ecosystem