Use when working in Codex interactive mode and the task can be split into independent tracks, especially for parallel implementation, review, testing, or other subagent work using the native agent tools. Do not use for tiny single-track edits or explanation-only tasks.
This skill is for the parent Codex agent in interactive mode.
The previous MCP delegation workflow (delegate_autopilot / delegate_run / delegate_resume) is replaced with native subagent orchestration for reliable parallel track control.
Use these tools only:
spawn_agentsend_inputwaitresume_agentclose_agentwait(ids=[...]).Use native subagents before direct edits when at least one is true:
Do not use for tiny single-file edits, strict sequential chains, or pure explanations.
spawn_agent.spawn_agent per track, then grouped wait.worker with explicit constraints and parent checkpoints.Exception: when explicitly following /Users/kosta/.codex/superpowers/skills/subagent-driven-development/SKILL.md, keep implementation subagents sequential for that workflow's staged review loop.
Role defaults:
agent_type: "explorer"agent_type: "worker"agent_type: "explorer" (or default)Parallel defaults:
track -> agent_id -> status.agent_id as the durable persistence key (replacing old MCP run_dir references) for resume, verifier context, and recovery.delegate_* tools.Every subagent must report:
agent_idAfter implementation tracks complete:
If one or more agents are incomplete:
wait with explicit IDs and higher timeout.send_input.resume_agent for interrupted threads.close_agent completed tracks to keep orchestration clean.Every 3-5 turns in long delegated sessions, restate:
delegate_autopilot(task, ...) -> split task into tracks + spawn_agent per track + grouped waitdelegate_run(...) -> strict single-track spawn_agent with deterministic promptdelegate_resume(thread_id, ...) -> resume_agent(id)agent_idmax_agents/max_parallel knobs -> explicit track decomposition + spawn count1) Build tracks: T1, T2, T3 (independent)
2) id1 = spawn_agent({agent_type:"worker", message:"<T1 prompt>"})
3) id2 = spawn_agent({agent_type:"worker", message:"<T2 prompt>"})
4) id3 = spawn_agent({agent_type:"explorer", message:"<T3 prompt>"})
5) wait({ids:[id1,id2,id3], timeout_ms:120000})
6) If needed, send_input({id:id2, interrupt:false, message:"<follow-up>"})
7) wait({ids:[id2], timeout_ms:120000})
8) verifier = spawn_agent({agent_type:"explorer", message:"<final verifier prompt>"})
9) wait({ids:[verifier], timeout_ms:120000})
10) close_agent for all completed agents
## Task
<concise track task>
<scope>
- In scope: <files/areas>
- Out of scope: <explicit exclusions>
</scope>
<constraints>
- Do not spawn subagents.
- Do not call MCP `delegate_*` tools.
- Keep edits minimal and reversible.
- Run appropriate tests/checks; if skipped, explain why.
</constraints>
<deliverable>
1. agent_id
2. Files read
3. Files changed + why
4. Tests/checks + results
5. Blockers/open questions
6. Risks/integration notes
7. Next actions
</deliverable>
## Task
Final integration verification for all completed tracks.
<inputs>
- Changed files by track
- Track outputs and assumptions
</inputs>
<checks>
1. Cross-file naming/reference consistency
2. Import/dependency/interface compatibility
3. Test alignment with touched behavior
4. Obvious regressions/conflicts
</checks>
<constraints>
- Do not spawn subagents.
- Do not call MCP `delegate_*` tools.
- Read-only unless explicitly asked to patch.
</constraints>
<report>
1. agent_id
2. Files reviewed
3. Findings by severity
4. Suggested minimal fixes
5. Verification commands
</report>