codex-dispatch

codex-dispatch is a skill for Claude Code from iofold/ainative-claude-plugins. It costs 76 tokens per session (2,126 once invoked), scanned B, original, MIT.

A task dispatcher that runs OpenAI's Codex command-line tool in separate Git worktrees. A worktree is an additional working copy of a repository, allowing an agent to work without directly altering the main checkout.

In plain words
What is it for?
Use it to assign coding or review tasks to Codex, let it work on its own branch, and inspect or merge the resulting changes.
Why use it?
It isolates independent coding tasks and reduces conflicts between concurrent changes. It can also be used when a task needs autonomous code generation, structured output, or a separate code review.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions subagents; runs codex exec.

Part of the external-agents plugin — 2 skills shipped together

Good fit Use it to assign coding or review tasks to Codex, let it work on its own branch, and inspect or merge the resulting changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/iofold/ainative-claude-plugins/codex-dispatch
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.

Any agent
npx skills add iofold/ainative-claude-plugins --skill codex-dispatch
Clone the repo
git clone --depth 1 https://github.com/iofold/ainative-claude-plugins

Made for: Claude Code.

Or install external-agents, the plugin that ships this one along with the rest of its 2 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codex-dispatch

README.md
[![agentmods](https://agentmods.dev/badge/skills/iofold/ainative-claude-plugins/codex-dispatch/github.svg)](https://agentmods.dev/skills/iofold/ainative-claude-plugins/codex-dispatch)
Your own site
<a href="https://agentmods.dev/skills/iofold/ainative-claude-plugins/codex-dispatch"><img src="https://agentmods.dev/badge/skills/iofold/ainative-claude-plugins/codex-dispatch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codex-dispatch

Your own site · 80×15
<a href="https://agentmods.dev/skills/iofold/ainative-claude-plugins/codex-dispatch"><img src="https://agentmods.dev/badge/skills/iofold/ainative-claude-plugins/codex-dispatch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,126 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00076 $0.02126
Opus 5.5 $0.00030 $0.00850
Sonnet 5.5 $0.00015 $0.00425
Haiku 4.5 $0.00008 $0.00213

Measured 1mo ago against content hash 8634f22ab640, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

codex-dispatch 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 1mo 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.

**Setup:** Set in `~/.claude/settings.json` under `env`, or inject from vault:
external-agents/skills/codex-dispatch/SKILL.md · 227 lines

How it starts

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

Codex CLI Task Dispatch

Dispatch independent coding tasks to OpenAI's Codex CLI running in isolated git worktrees. Codex has its own tool loop and excels at autonomous code generation.

Use Codex when: task benefits from OpenAI models, you want a diverse model perspective, task involves long-running autonomous coding, you need structured JSON output, or code review via codex review.

Use Claude subagents when: task needs current conversation context, is tightly coupled to ongoing work, is quick (<30s), or needs MCP tools.

Essential Workflow

1. Conflict check — verify file independence

Before dispatching, confirm no other agent is modifying the same files, dev servers, or shared state (DB files, lock files). Each task gets its own branch.

2. Create worktree

TASK_ID=$(date +%s)-codex-$(echo "$TASK_NAME" | tr ' ' '-' | tr '[:upper:]' '[:lower:]' | head -c 30)
WORKTREE=/tmp/agent-tasks/$TASK_ID
git worktree add $WORKTREE -b agent/codex/$TASK_ID

3. Write prompt file

Never pass complex prompts inline. Write to the worktree for shell-safety and audit trail.

cat > $WORKTREE/.codex-prompt.md << 'PROMPT'
# Task: [TITLE]
## Objective
[What to accomplish]
## Files to Modify
- path/to/file — [what to change]
## Files to NOT Modify
- path/to/other — owned by another agent
## Constraints
- Follow existing code patterns
- Run tests after changes
## Acceptance Criteria
- [ ] [Criterion]
- [ ] All existing tests pass
PROMPT

Optionally write .codex/instructions.md in the worktree for persistent project context Codex reads automatically.

4. Dispatch

Recommended — captures JSONL events + final message:

codex exec \
  --full-auto \
  --json \
  -C $WORKTREE \
  --ephemeral \
  -o $WORKTREE/.codex-result.txt \
  - < $WORKTREE/.codex-prompt.md \
  > $WORKTREE/.codex-events.jsonl \
  2> $WORKTREE/.codex-stderr.txt &
CODEX_PID=$!

Simple — final message only (no event stream):

codex exec --full-auto -C $WORKTREE --ephemeral \
  -o $WORKTREE/.codex-result.txt \
  - < $WORKTREE/.codex-prompt.md \
  2>&1 | tee $WORKTREE/.codex-log.txt &

Read the full file on GitHub · 227 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. 1mo ago First seen · 227 lines · 76 tokens per session scan B 8634f22ab640

Subscribe to this mod's changes

codex-dispatch is a skill published in the GitHub repository iofold/ainative-claude-plugins (3 stars, last pushed 1mo ago), licensed MIT. It adds 76 tokens to every session and 2,126 once invoked, about $0.0003 per session on Opus 5.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-10-24.

Related

codex-dispatch compared with skills from other repositories

codex-dispatch next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codex-dispatchiofold/ainative-claude-pluginsSkill31mo agoMITB76Claude Code
merge-batchdiegosouzapw/OmniRouteSkill91k2d agoMITA46Claude Code
prowler-commitprowler-cloud/prowlerSkill15kyesterdayApache-2.0A44Claude Code, Codex
gh-auth-isolationgithub/gh-awSkill5.7ktodayMITA20Claude Code, Codex
comet-githubrpamis/cometSkill3.3ktodayMITA72Claude Code, Codex
github-skillzeenie-ai/OpenCompanySkill1.1k4d agoMITA51Claude Code
codex-autoresearchleo-lilinxiao/codex-autoresearchSkill3.3k12d agoMITA39Codex