subagents
6 questions
- AI
When do I drop down to the Agent SDK instead of using filesystem agents?
The Agent SDK is for building Claude-powered applications, not for using Claude Code itself. Use programmatic agents (defined in code via `agents` in query options) when you need dynamic agent definitions, when you are integrating into your own app, or when filesystem markdown is too static for your runtime.
- AI
Can I use Haiku for everyday Claude Code work?
Haiku 4.5 is fast and cheap (\$1 input / \$5 output per MTok, roughly a third of Sonnet 4.6 and a fifth of Opus 4.7), with near-frontier intelligence on scoped tasks. Use it for mechanical batch work, subagents, and latency-sensitive turns; do not reach for it on hard debugging or architecture, where Sonnet 4.6 still wins. The biggest pitfall is invisible: `/effort` levels and adaptive reasoning do not apply to Haiku.
- AI
How do I run multiple research subagents in parallel?
Ask for parallel subagents in one user turn. Each runs in a fresh context, returns one summary to the parent's live context, and (in normal use) exits; transcripts persist on disk for grep, but the live parent never receives the trail. Use it for noisy independent lookups, not for work you plan to iterate on.
- AI
How do I refactor three services at once with subagents?
A captured `claude --print --output-format stream-json` session against the same demo app. Lead agent designs and tests a shared logger sequentially, then dispatches three subagent migrations in a single assistant turn so they run in parallel. The article shows the actual fan-out, the actual subagent prompts (with enumerated call sites), and the moment the lead made a real judgment call on one service's quirks.
- AI
Should this be a skill, a plugin, a subagent, or an MCP server?
Skills are reusable prompts. Subagents are isolated research workers. MCP servers are persistent stateful tools. Plugins bundle the three for distribution. Pick by asking which property you actually need: persistence, isolation, or reusability.
- AI
Should I spawn subagents or build an agent team?
Subagents report to one parent and work independently. Agent teams share a mailbox and task list, letting teammates message each other directly. The experimental flag, display mode options, and the absence of /resume for in-process teams are the deciding details.