Spawning vs Running Inline
Day 24 · Week 5 · Agents — AI Personas
Slack Message — copy & paste
🤖 Tip #24 — Inline execution shares your context; spawned agents get their own. Use inline for small tasks, spawned for heavy ones to keep your context clean.
#24 Claude Code
Two Execution Modes
- **Inline execution** — The AI runs the task in your current conversation. Everything it reads, every file it analyzes, stays in your context window. Good for small tasks. Bad for large ones — context fills up and quality degrades.
- **Spawned agent** — The AI creates a new subprocess with its own context window. It does its work, then returns a summary to you. Your context stays clean and focused.
- **Hidden benefit — model tier mixing** — Spawned agents can use a different model tier. Your main session runs on Opus for deep reasoning, but the spawned file searcher uses Haiku for cost efficiency. Mixed tiers in one workflow.
Spawn Inline Context Isolation
#24 Agents — AI Personas
When to Use Which
- 1 Choose execution mode by task weight
- › **Inline** → quick questions, small edits, simple searches
- › **Spawned** → code review, implementation, research, multi-file analysis
- 2 **Try the difference** — Next time you ask AI to 'find all usages of X,' notice how your context grows. Then try spawning an Explore agent instead to keep your context clean.
- 3 **Configure model tiers** — Set spawned agents to appropriate tiers: Haiku for file search, Sonnet for implementation, Opus for review. Match cost to complexity.
Spawn Inline Context Isolation
Your screenshot here Optional — add a screenshot from your own workflow