Editor’s note: This is an AI-assisted English adaptation of a research note on Claude Code v2.1.220. It distinguishes observations from that build from the current documented behavior of subagents, forks, and workflows.
Say you ask Claude Code to find React components in a monorepo that use useMemo with the wrong dependencies. The main agent can search for every candidate, read each file, and work through the results. The trouble isn’t whether it can do that. It’s what the main conversation has to carry afterward: piles of search results and file excerpts that won’t help with the next task.
A subagent can do the investigation in its own conversation and return a short report. The main agent gets the candidates worth fixing rather than every candidate the search turned up. Anthropic’s context engineering article describes the broader pattern. The companion Agent Loop article on sidechains looks at execution and routing. Here the question is what each model call actually gets to see.
1. A separate conversation is not an empty prompt
For a normal, non-forked subagent, Claude Code starts a new conversation rather than copying the parent’s earlier chat and tool results. The delegation supplies a task prompt. The subagent guide documents its own system prompt, tool access, and permission settings. The tool is now called Agent; Task was its old name. See the Agent tool deep dive for the historical tool interface.
The old note showed one user message in the starting history and drew a broader conclusion: subagents don’t receive CLAUDE.md. That isn’t a safe rule for current versions. Many subagents load applicable instruction files at startup; Explore and Plan skip that startup bundle. A custom definition can use omitClaudeMd on supported versions, subject to the documented rules for managed instructions. Directory-specific instructions can still load when the agent works with matching files. The parent’s auto memory is not automatically loaded into a fresh subagent. Part 5 explains the difference between standing instructions and auto memory.
Give the subagent what it can’t infer: the question, the scope, and the shape of a useful answer. For the React example, ask it to list the file and line for each suspected dependency bug, explain the missing value in one sentence, and flag findings that need a test. That will be more useful to the parent than “look around and report back.”
2. A report comes back; the transcript stays separate
The normal return path delivers the subagent’s result to the parent without adding the entire investigation to the main message history. The older note described a particular final-text extraction and a usage envelope. Treat their exact format as implementation details. The useful boundary is that the parent can act on findings without first reading every step that produced them.
The transcript isn’t necessarily gone. The current docs describe separate JSONL transcripts that can survive compaction of the parent conversation. If you need to continue the same investigation, resume the subagent. If you need to check one claim, ask for the relevant evidence or inspect the cited lines. Neither requires importing every tool result into the parent. Parts 1 and 2 cover how tool results become part of the conversation that goes back to the model.
There is also a cache consequence. The parent appends the delegation and its result after existing history. The child’s intermediate reads don’t rewrite that prefix. A normal subagent warms its own cache, so this is a way to keep the parent lean, not a promise that the work consumes fewer tokens overall.
3. Forking trades a fresh start for inherited context
Use a fresh subagent when the evidence is in the repository and the task can be stated on its own. Consider a fork when it depends on what the parent already learned: for example, a series of failed fixes and the reasoning behind them.
The current prompt-caching guide says that a fork inherits the parent’s prompt, tool set, and conversation. It can reuse a matching warm prefix. The old note described a fixed placeholder in a fork-related code path; don’t generalize that into “a fork strips all inherited tool results.” That would both misstate the documented behavior and obscure a useful feature of forks: they can start with the evidence already in the conversation. A shared prefix still needs an existing cache entry within its lifetime. Part 3 explains that distinction.
4. Context isolation and worktree isolation are different
A subagent with its own conversation can still work in the same checkout. If two agents edit the same files, separate context windows won’t prevent a conflict. For independent changes, supported agents can use isolation: worktree to work in another checkout. Check the base revision and review what changed before integrating it. Don’t assume the worktree is always destroyed when the agent ends or that it constitutes a general-purpose sandbox.
The old note used Node.js AsyncLocalStorage to explain how an in-process implementation might scope a working-directory value to each async execution chain. The design distinction holds independently of that mechanism: changing a process-global directory is different from giving one tool call a scoped working directory. The particular storage mechanism isn’t public API.
Likewise, context boundaries aren’t permission boundaries. Review the subagent’s tool and permission configuration instead of assuming it inherits every runtime approval, or that it starts with none. The Agent Loop article on approvals gives the complementary view. Independent context does not imply a separate account, quota, or guaranteed cancellation behavior.
5. A task checklist isn’t a list of running jobs
The interactive-mode guide distinguishes two things called tasks:
| What you want to inspect | What it represents |
|---|---|
| The checklist, when Task tools are available | Work items and their status, which can persist across compactions |
The background-task view, accessible through /tasks
|
Running work such as shells and background subagents |
This distinction explains why an item marked “in progress” in a checklist isn’t a process handle and why inspecting a running job isn’t the same as reviewing the plan. The older note described an in-memory registry alongside disk-backed checklist state; those storage details aren’t necessary to use the distinction.
The historical .output trap
The note observed two very different files presented as .output: a shell task’s captured terminal output and, in one local subagent implementation, a symlink to its full JSONL transcript. It also observed a build steering readers away from TaskOutput toward file reads. Neither the tool’s availability nor the alias layout should be assumed across current versions.
The risk isn’t the extension. It’s treating an output reference as a small finished report when it can lead to a large trace. If you feed the transcript back into the parent, you undo the very isolation you delegated for. Start with the result. For a shell log, inspect the lines relevant to the failure; for a subagent report, ask the worker for its supporting file locations. Open the structured transcript only when you actually need to audit what happened, and keep the read bounded.
6. Coordination doesn’t have to mean shared history
The old note distinguished same-process message queues from file-backed team delivery. The stable idea is that agents can exchange a question, correction, or result without merging their conversations. The current agent teams guide documents direct messaging with SendMessage in supported configurations. A teammate’s message isn’t user approval, and a team’s persistent state is not the same as any one agent’s transcript.
Workflows are another example of where the old snapshot shouldn’t be treated as current. It described a stub name in that build; Claude Code now documents dynamic workflows for orchestrating subagents. Read the workflow guide for availability and behavior rather than relying on the old feature-flag description.
For the monorepo investigation, keep the decision simple: delegate the wide search, bring back actionable findings, and inspect original evidence only where it changes the decision. Give agents separate checkouts when they’ll make competing edits. The payoff is not just doing more work at once; it’s keeping the main conversation focused on what to do next.
