Claude Code fork subagents (2.1.302): about a third cheaper than general-purpose subagents in our test
Claude Code 2.1.302 turns fork subagents on by default in claude -p and the Agent SDK. In 12 runs of the same task, forks cost about 36% less and finished 5 seconds sooner, but Claude only used them when asked.
By the RanThis team, written with AI assistance7 min read
Why trust this: every result, number and screenshot comes from a real run on our own accounts, not from the AI. How we test
Fork subagents in Claude Code 2.1.302 did not burn extra usage in our test; they were cheaper. Three forks did the same job as three general-purpose subagents for about 36% less (USD 0.138 against 0.217 per run, Claude Code's list-price estimate) and finished about 5 seconds sooner.
The catch: on a plain prompt Claude still chose general-purpose subagents every time. "On by default" in claude -p and the Agent SDK does not mean you get the saving without asking.
Tested on 18 October 2026 with Claude Code 2.1.302 (released 16 October, 16:48 UTC),
claude -pin a clean shell on Linux, signed in with a Claude Max plan, model Claude Sonnet 5.5. The data is made-up sample data: three CSV files of 400 office-supply orders each.
At a glance
Key results
- Fork subagents were cheapest: USD 0.138 per run on average (3 runs: 0.138, 0.141, 0.136), against USD 0.217 for the 9 runs that used general-purpose subagents.
- Faster too: 17.1 seconds wall time on average, against 22.3 seconds.
- Less to write to the cache: about 26,800 cache-write tokens per fork run, against about 57,800 for general-purpose runs. That is where most of the price gap comes from.
- Claude did not pick forks on its own: with fork mode on and a prompt that only said "delegate to subagents", all 3 runs used general-purpose subagents.
- The off switch works: with
CLAUDE_CODE_FORK_SUBAGENT=0, Claude's fork requests were refused and it fell back to general-purpose subagents. - All 12 runs got the numbers right.
What changed in 2.1.302
The Claude Code changelog for 2.1.302 says fork subagents (subagent_type: "fork") are now on by default in claude -p, the Agent SDK, the desktop app and VS Code, as they already were in the terminal, and that CLAUDE_CODE_FORK_SUBAGENT=0 turns them off. The same release makes a subagent's own Agent calls run in the foreground by default outside the terminal.
A fork is different from a normal subagent. Per Anthropic's subagents documentation, a normal subagent "starts with a fresh, isolated context window" and gets a delegation message that Claude writes for it. A fork "inherits the entire conversation so far": same system prompt, tools, model and message history as the main session. Only its final result comes back to the main conversation.
One thing to know: when we checked on 18 October, the same documentation page still said fork mode "is off in non-interactive mode with -p and in the Agent SDK unless you turn it on". The changelog is newer, and our runs behaved the way the changelog describes.
Hands-on test
Setup
- Claude Code 2.1.302, run with
npx @anthropic-ai/[email protected], in a shell with no Claude Code environment variables set (an earlier attempt inside another Claude Code session inherited that session's settings, so we threw those runs away). - Plan: Claude Max. Model:
claude-sonnet-5-5for the main session. - Data: three CSV files (
sales_north.csv,sales_south.csv,sales_west.csv), 400 rows each, columnsorder_id, date, product, qty, unit_price. We generated them with a script and computed the right answers in advance. - Task (same in every run): delegate each file to its own subagent, in parallel; each one computes total revenue, order count and top product with Python; the main session only combines the results into a table.
- Four setups, 3 runs each:
- fork mode on (default), plain prompt;
- fork mode off, plain prompt;
- fork mode on, prompt adds "Use fork subagents (subagent_type "fork")";
- fork mode off, same fork prompt.
- What we measured:
claude -p --output-format stream-json. Cost and tokens come from the finalresultmessage (modelUsage,total_cost_usd), which is Claude Code's estimate at API list prices; on a Max plan nothing is billed per run. Subagent types come from the Agent tool calls andsubagent_stats.by_type. Wall time includes startingnpx.
The results, run by run
| Setup | Subagents actually used | Avg cost per run | Avg wall time | Avg cache-write tokens | Avg output tokens |
|---|---|---|---|---|---|
| Fork mode on, asked for forks | 3 fork | USD 0.138 | 17.1 s | 26,800 | 1,755 |
| Fork mode on, plain prompt | 3 general-purpose | USD 0.200 | 20.4 s | 52,900 | 2,563 |
| Fork mode off, asked for forks | 3 general-purpose (forks refused) | USD 0.211 | 22.3 s | 56,200 | 2,771 |
| Fork mode off, plain prompt | 3 general-purpose | USD 0.240 | 24.3 s | 64,400 | 3,653 |
Every run returned the right table: north 400 orders and 105,761.50 in revenue, south 400 and 106,063.00, west 400 and 110,236.00, with Whiteboard the top product in all three regions.
The spread between general-purpose runs is wide (USD 0.175 to 0.258), so don't read much into the gap between the three general-purpose rows. The fork runs were tight (USD 0.136 to 0.141) and below every general-purpose run.
Why forks came out cheaper here
The fork runs read a little more from the prompt cache than the others (about 273,000 tokens against 239,000), but wrote less than half as much to it, and cache writes cost more than cache reads. That fits the documentation: a fork reuses the main conversation's prompt, so there is less new context to cache. A general-purpose subagent starts from its own system prompt and a delegation message, and each of the three has to be cached separately.
They also wrote fewer output tokens. With a fork, Claude's delegation message can be short, because the fork already knows the task. For general-purpose subagents, Claude wrote a full brief for each one, with file paths, the formula and the output format.
This is one small task with tiny files. On a long session the picture can change: a fork inherits the whole conversation, so a fork started late in a long session carries a lot more context than a fresh subagent with a short brief. We did not test that.
What worked
What worked
- Forks were cheaper, faster and just as accurate on a parallel task where each piece needed the same instructions.
- Asking by name works. Adding one sentence, "Use fork subagents (subagent_type "fork")", was enough for Claude to start forks in all 3 runs.
- The off switch is clean. With
CLAUDE_CODE_FORK_SUBAGENT=0, the fork requests were refused, Claude said the fork type wasn't available and switched to general-purpose subagents, and the answer was still right.
Where it fell short
What didn't work
- "On by default" did not change Claude's choice. In the 3 plain-prompt runs with fork mode on, Claude used general-purpose subagents every time. If you want the saving in a script, ask for forks.
forkis not in the agent list. Theagentslist in the session's init message showedclaude,Explore,general-purpose,Planandstatusline-setup, with nofork, even when forks worked. Don't use that list to check whether fork mode is on.- The docs page and the changelog disagree about
-p(see above). Trust the version you run, and test it. - We could not read Max usage per run.
/usageis not available insideclaude -p, so the numbers above are Claude Code's list-price estimate, not a reading of the plan's usage meter. More tokens should mean more usage, but we did not measure the plan limit directly. For how the Max meter itself behaves, see our Claude Code usage limits breakdown.
Our verdict
If you run Claude Code from scripts or the Agent SDK and split work across subagents, update to 2.1.302 and ask for forks by name when each piece needs the same context. In our test that cut the estimated cost of the run by about a third and saved a few seconds. Keep general-purpose (or a custom subagent) when you want the subagent to start clean, for example in a long session where forking would copy a lot of history. And if forks cause trouble in a pipeline, CLAUDE_CODE_FORK_SUBAGENT=0 turns them off.
Frequently asked questions
Do fork subagents use more of my Claude usage limit?
Not in our test. Three fork subagents cost an estimated USD 0.138 per run against USD 0.217 for three general-purpose subagents doing the same job, mostly because they wrote less to the prompt cache. We measured Claude Code's list-price estimate, not the Max usage meter.
How do I turn off fork subagents in claude -p?
Set the environment variable CLAUDE_CODE_FORK_SUBAGENT=0 before running claude -p or the Agent SDK. In our runs, Claude's fork requests were then refused and it used general-purpose subagents instead.
Will Claude use forks automatically after the update?
Not in our test. With fork mode on and a prompt that only asked for subagents, Claude picked general-purpose subagents in all 3 runs. When the prompt asked for "fork subagents", it used forks in all 3 runs.
What is the difference between a fork and a normal subagent?
A normal subagent starts with a fresh context and only sees the brief Claude writes for it. A fork inherits the whole conversation so far, with the same system prompt, tools, model and history, and only its final answer comes back to the main session.
Sources
- Claude Code changelog – 2.1.302: fork subagents on by default in claude -p, Agent SDK, desktop and VS Code; CLAUDE_CODE_FORK_SUBAGENT=0 turns them off
Vendor document
- Claude Code docs – Subagents: a fork inherits the entire conversation; normal subagents start with a fresh context
Vendor document
- npm – @anthropic-ai/claude-code 2.1.302 published 16 October 2026, 16:48 UTC
Vendor page


