codex-subagents

A skill for launching OpenAI Codex agents from Claude Code, with read-only exploration and review as the default.

In plain words
What is it for?
Use it to ask Codex for code reviews, plans, second opinions, Spark checks, parallel codebase analysis, or approved full-access tasks.
Why use it?
It provides independent analysis or parallel work while preventing file changes and privileged actions unless they are explicitly requested.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/xuio/claude-code-codex-subagents/codex-subagents
Any agent
npx skills add xuio/claude-code-codex-subagents --skill codex-subagents
Clone the repo
git clone --depth 1 https://github.com/xuio/claude-code-codex-subagents

Made for: Claude Code, Codex.

Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,194 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5 $0.00088 $0.02194
Opus 5 $0.00044 $0.01097
Sonnet 5 $0.00018 $0.00439
Haiku 4.5 $0.00009 $0.00219

Measured 2d ago against content hash 07baf2b57831, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

codex-subagents scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Set `advanced.isolated_codex_home: true` when unrelated Codex MCP servers from the user's `~/.codex/config.toml` should not be loaded for the run.
skills/codex-subagents/SKILL.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codex Subagents

Use the codex-subagents MCP server like Claude's native Task tool when the task benefits from an independent OpenAI Codex worker inside Claude Code. If the user asks to "use Codex", "ask Codex", "launch Codex subagents", "use Spark", "get a Codex second opinion", or "run parallel Codex agents", call the MCP tools directly. Do not wait for the user to name the MCP tool.

Default behavior:

  • Launches one-shot Codex work through codex exec; persistent sessions use codex app-server --listen stdio:// by default for real live steering. The app-server child is owned by the MCP server process, so no external background daemon is required.
  • Prefers the Codex desktop app binary at /Applications/Codex.app/Contents/Resources/codex when it exists.
  • Runs Codex in read-only sandbox mode unless the user explicitly requests a different sandbox.
  • Uses non-interactive approvals so write or privileged operations fail instead of prompting.
  • Supports explicit non-sandbox/full-access execution with full_access: true, which maps to Codex's --dangerously-bypass-approvals-and-sandbox flag and allows DNS/network plus unrestricted file and git writes.
  • Lets the caller set model, reasoning effort, project directory, timeout, and parallelism per agent. Put uncommon settings under advanced.
  • Supports advanced.model: "spark" for Codex Spark (gpt-5.3-codex-spark) without requiring Claude to remember the exact model string.
  • Supports nested Codex subagents by passing advanced.codex_subagents, advanced.subagent_tasks, and advanced.subagent_runtime; custom agents are sent as Codex agents.<name>... config overrides for the child run.
  • Supports persistent Codex sessions through the session_id returned by codex_task and codex_task_group; use codex_followup to continue, steer, wait on, cancel, or otherwise manage the same Codex context.
  • Supports codex_wait_any for harvesting whichever background Codex session finishes first when Claude launched several sessions in parallel.
  • Supports structured results with advanced.output_contract or advanced.output_schema; use these when Claude must merge, compare, or aggregate Codex outputs.
  • Redacts secret-looking output by default and does not forward secret-looking environment variables unless forward_sensitive_env is explicitly true.
  • Compacts large tool responses before returning them to Claude; when mcpResponse.compacted is true, use the returned summary first and inspect server logs only if the omitted raw tail is necessary.

Prefer the native Claude-like tools for normal use:

  • For one delegated task, call codex_task. Provide description like Claude's Task description and prompt as the self-contained task. For code review and exploration, ask for concise findings with file paths and line references.
  • For independent tasks that can run concurrently, call codex_task_group with one task object per workstream. Split by ownership such as API flow, tests, security, performance, UI, docs, or migration risk. Keep tasks concrete and bounded, and set max_parallel to the smaller of the useful agent count and 4 unless the user asks for more.
  • For multi-turn Codex work, call codex_task for the initial prompt and preserve the returned session_id. Use codex_followup with mode: "queue" for ordinary follow-ups, mode: "wait" when Claude needs completion, mode: "steer" for active redirection, and mode: "cancel" when the user no longer wants the run.
  • For several background Codex sessions, use codex_wait_any with all known session_id values instead of polling each session one at a time. Repeat with the returned remaining ids until all work is complete.
  • Use codex_followup mode steer only when the user wants to redirect active work now. It delivers real live steering with Codex turn/steer when app-server support is active. Set interrupt_current: true only when the active turn should be cancelled and redirected.
  • If unsure which path fits, call codex_task or codex_followup first; use MCP resources only for diagnostics or when a tool response explicitly says to inspect a resource.

Read the full file on GitHub · 122 lines

Changes

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.

  1. 2d ago First seen · 122 lines · 88 tokens per session scan B 07baf2b57831

Subscribe to this mod's changes

codex-subagents is a skill published in the GitHub repository xuio/claude-code-codex-subagents (2 stars, last pushed 2mo ago), licensed MIT. It adds 88 tokens to every session and 2,194 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.