Delegate Early
Use this skill when a task can be split into parallel streams or when the main context risks ballooning. The top-level Codex remains the lead; subagents are assistants.
Goals
- •Conserve primary context by offloading research/review/planning.
- •Improve throughput with parallel subagent streams.
- •Capture delegation evidence for auditability.
When to spawn
- •Before deep reading/analysis to avoid bloating context.
- •When new ambiguity appears or scope changes.
- •For independent streams (research, review, planning, edge cases).
Task slicing heuristic
- •Identify 2–4 independent streams with minimal shared context.
- •Prefer streams like:
research,review,spec-check,edge-cases.
Required conventions
- •Use
MCP_RUNNER_TASK_ID=<task-id>-<stream>for subagents. - •Record manifest paths and summarize findings in the main run.
- •Run
node scripts/delegation-guard.mjsbefore review handoff to verify delegation evidence.
Minimal delegation workflow
- •Name streams and write 1–2 sentence goals for each.
- •Spawn subagents with clear, bounded prompts.
- •Wait for subagent completion; retrieve manifest evidence and summarize findings into the main plan.
- •Proceed with implementation.
Prompt patterns
- •Research: “Find X, cite Y, return 3 bullets + risks.”
- •Review: “Inspect files A/B for regressions; list issues by severity.”
- •Planning: “Draft a 3–5-step plan, call out unknowns.”
Escalation rules
- •If delegation is impossible, set
DELEGATION_GUARD_OVERRIDE_REASONand document it in the task checklist.
Subagent summary format
- •Findings: Key results and conclusions from the subagent run
- •Risks: Issues, blockers, or concerns
- •Open questions: Unresolved items requiring follow-up
- •Evidence: Manifest path (e.g.,
.runs/<task-id>-<stream>/cli/<timestamp>/manifest.json)