Module 08 · intermediate · 1 hour
Subagents
Subagents help when a task can be divided into independent, well-bounded responsibilities. Each agent needs a clear objective, scope, output contract, and tool posture.
Define a specialist
Subagent roles are configured with a name, description, instructions, model or reasoning preferences where supported, and tool access. The description should make delegation predictable.
[agents.security_reviewer]
description = "Review an authorized diff for security regressions"
config_file = "agents/security-reviewer.toml"Delegate bounded work
Give one concrete subtask with explicit inputs and a deliverable that can be merged into the parent task. Avoid sending two agents to edit the same file unless coordination is part of the design.
- Research: Independent evidence
- Implement: Separate file ownership
- Verify: Fresh validation lane
Coordinate parallel agents
Parallelism helps only when the lanes are independent enough to avoid serial rework. The parent agent remains responsible for reconciling contradictions and validating the combined result.
Research docs ─┐
Inspect code ───┼─> Parent synthesis ─> Verification
Review tests ───┘Know when not to delegate
Keep tightly coupled edits, tiny tasks, and work requiring constant shared state in one agent. Delegation has context and coordination cost.
Continue learning
Use the official OpenAI Codex documentation as the final reference for current commands, settings, and availability.