Codex workflow
Run deterministic multi-step agent workflows in Codex - fan-out, parallel, schema-validated structured output - via the codex-workflow MCP orchestrator (run_workflow), with native in-chat fallbacks. Use when you want Claude-Code-Workflow-style orchestration in Codex: 'run a workflow', 'fan out subagents', 'review each file in parallel', 'orchestrate these steps'. Triggers: 'codex-workflow', 'run_workflow', 'orchestrate in codex'.From its SKILL.md
npx -y skills add vanducng/skills --skill codex-workflowAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 8 stars8 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 6 commands, including `cd ~/vd-cli && go build -o ~/.local/bin/vd ./cmd/vd` and 5 more.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
5.3 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
Codex Workflow
Deterministic multi-agent orchestration in Codex - the analog of Claude Code's Workflow tool. Pick the right level for the job.
Three levels (cheapest first)
| Need | Use | Determinism |
|---|---|---|
| Ad-hoc "spawn one agent per X, summarize" in a chat | native NL spawn | low (model decides) |
| Fixed fan-out over a worklist (one worker per row, schema'd) | spawn_agents_on_csv | medium |
| Collision-free parallel implementation | worktree + codex exec & | high (isolated) |
| Scripted multi-step pipeline with structured output you parse | run_workflow (the orchestrator MCP) | high |
Reach for run_workflow when you'd otherwise hand-wire codex exec calls; reach for the native paths for quick in-session work.
run_workflow - the orchestrator
Installed as the codex-workflow MCP extension (vd mcp install codex-workflow). Call the run_workflow tool with a spec:
{
"steps": [
{ "id": "scan", "prompt": "List changed files vs main.", "output_schema": {"type":"object","properties":{"files":{"type":"array"}}} },
{ "id": "review", "prompt": "Review {file} for bugs.", "agent": "code-reviewer", "parallel_group": "g1" }
]
}
- v1 shape: sequential steps + one
parallel_group+ per-stepoutput_schema. NOT loops/conditionals (those are a later iteration - script them outside, or use multiplerun_workflowcalls). agent(optional) names a~/.codex/agents/*.tomlrole; itsdeveloper_instructionsare injected as a prompt override (see #26363 below).- Concurrency is capped by
[agents].max_threads(config). - Returns one structured result per step:
{id, status, output}.
Native fallbacks (no orchestrator needed)
If run_workflow (or any code-mode wrapper) fails with a missing codex-code-mode-host, the machine has the standalone codex cask without ChatGPT.app - the shared plugin runtime's file-access host ships only inside /Applications/ChatGPT.app. Don't retry the wrapper; disable the broken feature with codex -c features.code_mode=false, or drop to raw codex exec -s read-only -C <dir> (prompt via stdin, -o for output) or the fallbacks below.
spawn_agents_on_csv - deterministic batch
One worker per CSV row; each calls report_agent_job_result exactly once. Params: csv_path, instruction (with {column} placeholders), id_column, output_schema, output_csv_path, max_concurrency. Best for "review/audit/transform one file|package|service per row." See references/native-orchestration.md.
worktree + codex exec & - collision-free parallel writes
Pairs with vd:worktree. One worktree + background codex exec per task; wait. Each agent writes in isolation, no merge collisions mid-flight.
Natural-language spawn
"Spawn one agent per review point, wait for all, summarize each." Codex orchestrates spawn/route/wait/close. Lowest ceremony, lowest determinism - keep fan-out at 3–5 (token cost is linear; human review is the real ceiling).
Patterns (translated from Claude's Workflow)
- Loop-until-dry: repeat a finder step until K rounds return nothing new (script with repeated
run_workflowcalls). - Adversarial N-vote verify: a parallel_group of N skeptics per finding; keep if majority confirm.
- Multi-modal sweep: parallel steps each searching a different way, blind to each other.
- Pipeline: chain
run_workflowcalls, feeding step outputs forward.
Caveat - regression #26363 (while open)
Since Codex v0.137.0, custom ~/.codex/agents/*.toml are not selectable at in-session spawn (generic fallback). run_workflow works around it by injecting the named agent's developer_instructions as a prompt override. For raw NL spawns, do the same by hand: paste the role's instructions into the spawn prompt. Drop this workaround when OpenAI restores agent_type selection.
Install & enable
The run_workflow tool ships as the codex-workflow vd extension (Python/uv MCP server). Prereqs: uv + codex login (model work runs through your Codex login - no extra API key).
cd ~/vd-cli && go build -o ~/.local/bin/vd ./cmd/vd # if vd lacks `mcp` (prefix env -u GOROOT if GOROOT is mise-pinned)
vd mcp install codex-workflow # Codex (~/.codex/config.toml) + Claude (project ./.mcp.json)
vd mcp install codex-workflow --scope user # …or Claude global (~/.claude.json)
vd mcp list && vd mcp doctor # verify
# then RESTART Codex / Claude Code to load the server
Scope only changes the Claude target (project → ./.mcp.json, user → ~/.claude.json); Codex always uses its global config.toml.
Integration
- Composes:
vd:worktree(parallel writes), the~/.codex/agents/*.tomlroles. - Install/manage:
vd mcp install|list|enable|disable|doctor codex-workflow.
What ships with it: 1 file
2.8 KB alongside SKILL.md
references/
- native-orchestration.md2.8 KB
Gives 0 of the 12 instructions most agent orchestration skills give in ~1.3k tokens
Counted across 848 of the 1,300 authors here whose files we hold, read 2026-09-06
- Dispatch one agent per independent problem domainin 56 of 848, across 42 files
- Run full test suite after integrationin 55 of 848, across 42 files
- Verify fixes do not conflictin 40 of 848, across 32 files
- Review each summary when agents returnin 40 of 848, across 31 files
- Write a handoff document summarising the current conversationin 30 of 848, across 25 files
- Reference existing artifacts by path or URLin 26 of 848, across 24 files
- Give each agent a specific scopein 19 of 848, across 10 files
- Give each agent a clear goalin 19 of 848, across 10 files
- Include a suggested skills section in the documentin 18 of 848, across 16 files
- Tailor the doc to the user argumentsin 18 of 848, across 15 files
- Issue all subagent dispatches in the same responsein 17 of 848, across 11 files
- Use git worktrees for isolationin 17 of 848, across 8 files
Said here and by no other author read
- Use native fallbacks if run_workflow fails
- Install the codex-workflow extension
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.