tobihagemann/turbo / claude/skills/codex-exec
codex-exec
VerifiedRun autonomous task execution using the codex CLI. Use when the user asks to "codex exec", "run codex exec", "execute a task with codex", or "delegate to codex".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.7 KB |
| references/parallel-execution.md | markdown | 1.8 KB |
references/parallel-execution.md
View on GitHub# Parallel Execution in Codex
Codex supports parallel sub-agents via `spawn_agent` and `wait_agent` tools. This works in both interactive and `codex exec` mode.
## How It Works
- **`spawn_agent`** creates a new agent thread with its own conversation context. Returns an agent ID.
- **`wait_agent`** waits for one or more agents to complete and returns their results.
- Sub-agents run concurrently, not blocking the parent.
- The parent can spawn multiple agents, do its own work, then wait for results.
## Gating Rule
The model will not fan out into sub-agents unless the prompt **explicitly requests parallel delegation**. The `spawn_agent` tool description gates itself on explicit user permission:
> "Only use spawn_agent if and only if the user explicitly asks for sub-agents, delegation, or parallel agent work."
Prompts must clearly say to use sub-agents or parallel execution.
## Prompt Pattern
To trigger parallel fan-out, structure the prompt like:
```
Delegate each of the following tasks to a separate sub-agent using spawn_agent so they run in parallel. Wait for all agents to complete, then synthesize their findings into a unified report.
1. [Task A description]
2. [Task B description]
3. [Task C description]
```
Key elements:
- Explicitly mention `spawn_agent` or "sub-agent" or "parallel"
- List the tasks to fan out
- Instruct to wait for all results and synthesize
## Limitations
- **Thread limits**: `agents.max_threads` in codex config caps concurrent sub-agents (Codex default 6; Turbo's `codex/SETUP.md` recommends raising it to 16). The hard ceiling enforced by Codex is 64.
- **Depth limits**: `agents.max_depth` (default 1) prevents unbounded recursion — a sub-agent cannot itself spawn sub-agents under the default config
- **No structured output**: Sub-agents return text via `wait_agent` / `resume_agent` results; there is no schema-typed channel
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Unverified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |