Parallel work
Subagent responsibilities and limits
Treat a subagent as a boundary around context, not as extra capacity, with one documented exception. For an ordinary subagent it starts with a fresh, isolated context window, and only its final summary returns to the delegating conversation, so verbose intermediate output stays behind.1 The exception is a "fork" subagent, which inherits the parent conversation entirely, system prompt, tools, model, full history, and so loses the documented context-isolation benefit.1 Anthropic's own guidance frames delegation to an ordinary subagent primarily as a context-budget move, sending the reading somewhere else so file contents land in the subagent's window rather than yours.2
What an ordinary subagent receives is documented, and it is less than the parent holds: its own system prompt, the delegation message, the CLAUDE.md hierarchy and a git status snapshot, with the built-in Explore and Plan agents skipping the last two.1
What it cannot do is documented too. A fixed filter removes a set of tools from every subagent, including the one that asks the user a question, so it cannot pause mid-run to ask you anything; the brief has to carry the necessary direction and any decision that would otherwise need a user follow-up.1 It is one-shot unless resumed by its returned agent ID; Explore and Plan return no ID at all.1 Spawn depth is capped at three layers by default, concurrency at twenty running subagents per session.1 The documented costs are real but unquantified: a fresh subagent may need time to gather context the main session already had, and every agent description is loaded into the delegating conversation, with a startup warning once the combined descriptions pass 15,000 tokens.1
The working rule that follows is to delegate work whose output is large and whose result is small. A wide search, a survey of a directory, an investigation that would otherwise read hundreds of files: the delegating conversation keeps the conclusion instead of the transcript.2 Write the brief as if the worker cannot ask a follow-up question, because no subagent, a fork included, can ask one during its run.
When this does not hold. No vendor publishes a measurement of whether delegating improves or degrades the outcome against doing the work in the main session. The practice is widely recommended but not measured, and the documented rationale is context management, not results. No source was found stating a per-invocation token or wall-clock cost figure either, and no comparable primitive with stated context, return and tool limits was found at the other vendors, so there is nothing to compare the semantics against. Delegation is a way of spending context deliberately. That is all it is currently known to be.
参考文献
测验
What returns from a non-fork subagent to the delegating conversation?
- Only its final summary
- Its full transcript, including every file it read
- Its summary plus the list of tool calls it made and their raw output
The subagent works in its own isolated context window and hands back only the summary, so verbose intermediate output such as logs and file contents stays behind in that window.
A fixed tool filter applies to every subagent, which is why a subagent cannot ____ during its run.
- ask the user a question
- spawn subagents of its own
- read the CLAUDE.md hierarchy
The filter strips the tool for asking the user a question. Spawning is capped rather than blocked, and CLAUDE.md is part of an ordinary subagent's startup context, though built-in Explore and Plan agents skip it.
A wide search across many files, where the useful output is a short conclusion, is a good candidate for delegating to a subagent.
- True
- False
Delegation fits work whose output is large and whose result is small: the subagent's own context absorbs the search, and only the conclusion returns to the delegating conversation.
评论
还没有评论,来说第一句吧。