Summary audio
Spoken summary — press play to read along: the line being spoken stays near the top.
Study notes
Core Concept
- Specialized assistants that Cloud Code delegates tasks to
- Each runs in its own isolated conversation context window
- Returns only a summary to the main thread; intermediate work stays isolated
Key Advantages
- Context window management: Prevents main context from being cluttered with tool calls, file reads, and search results
- Efficiency: Get focused answers without storing the entire exploration journey
- Scalability: Enables longer Cloud Code sessions without context bloat
How Subagents Work
- Receive two inputs: custom system prompt (from config) + task description (from parent agent)
- Work autonomously without exposing intermediate steps to main conversation
- Entire subagent conversation is discarded after returning summary
Trade-off
- Benefit: Clean main context window
- Cost: Main window loses visibility into how conclusions were reached
Built-in Subagents
- General Purpose: Multi-step tasks requiring exploration and action
- Explore: Fast codebase searching
- Plan: Research and analysis before presenting plans
Custom Subagents
- Can create your own with custom system prompts and tool access
Takeaways
- Subagents are specialized assistants that isolate work: Each runs in its own conversation context, keeping intermediate steps (tool calls, searches, file reads) hidden from the main thread—only returning a summary.
- They solve context window bloat: By delegating focused tasks to subagents, the main conversation stays clean and efficient, enabling longer Cloud Code sessions without losing context space.
- **Trade-off: Cleanliness vs. transparency**: You gain a clutter-free main window but lose visibility into how conclusions were reached—the entire subagent conversation is discarded after summarizing.
- Built-in subagents handle common patterns: General Purpose (multi-step tasks), Explore (codebase searching), and Plan (research/analysis) cover typical workflows.
- Customizable for your needs: You can create custom subagents with tailored system prompts and specific tool access for domain-specific tasks.
Flashcards 10 cards
Question
click to reveal · ←/→
Answer
click to flip back
Knowledge check 6 questions