codex-subagent

Installation
Summary

Spawn autonomous subagents to offload context-heavy work and preserve parent token budget.

  • Subagents burn their own tokens and return only final results, ideal for deep research (3+ searches), codebase exploration (8+ files), multi-step workflows, and long-running operations
  • Choose between mini model (gpt-5.1-codex-mini) for pure search tasks or inherit parent model for multi-step analysis, refactoring, and generation work
  • Supports up to 5 parallel subagents via background shell execution with file-based output capture using -o parameter or JSONL event stream parsing
  • Requires detailed, context-rich prompts following a structured template: task context, specific objectives, constraints, output format, and success criteria
SKILL.md

Codex Subagent Skill

Spawn autonomous subagents to offload context-heavy work. Subagents burn their own tokens, return only final results.

Golden Rule: If task + intermediate work would add 3,000+ tokens to parent context → use subagent.

Intelligent Prompting

Critical: Parent agent must provide subagent with essential context for success.

Good Prompting Principles

  1. Include relevant context - Give the subagent thorough context
  2. Be specific - Clear constraints, requirements, output format
  3. Provide direction - Where to look, what sources to prioritize
  4. Define success - What constitutes a complete answer

Examples

Related skills
Installs
309
GitHub Stars
929
First Seen
Jan 23, 2026