Claude Code forks subagents by default now. In 9 runs, it never forked
Claude Code turned on fork subagents by default in claude -p. On a 164-file repo with a three-step job, Claude never forked or delegated once in 9 runs. Forks on cost $0.218 a run, forks off $0.245, and with subagents denied $0.305.
Claude Code 2.1.302 turned fork subagents on by default in claude -p, the Agent SDK, desktop and VS Code (changelog). A fork is a subagent that starts with a copy of your whole conversation and sends back only its final answer. Abdullah asked on X whether that makes long runs better or just burns through usage faster. So we tested it.
The setup
A Node API called fleetdesk: 164 files, 16 modules, 135 files in src/, 18 test files. That’s bigger than the 24-file repo in our earlier subagent test. Three steps, all in one continuous session:
- Search: list every place in
src/that reads an environment variable, with the file, variable and default, in a newENV_READS.md. There are 13 reads in 12 files, written six different ways, plus two decoys outsidesrc/. - Refactor: move all of those reads into a new
src/config.jswith the same defaults, update every call site, and run the tests. - Bug hunt: support says refunds are too high on orders with a discount code. Find the cause, fix it, add a regression test and run the tests.
We used Claude Code 2.1.312, the latest version on the day. Version 2.1.307 changed how forks launched together behave, so results on 2.1.302 to 2.1.306 could differ. Same prompts, same repo, 3 runs each way:
- Forks on: the new default, nothing changed.
- Forks off:
CLAUDE_CODE_FORK_SUBAGENT=0. Normal subagents are still allowed. - No subagents: the Agent tool denied in
.claude/settings.json, so no delegation at all.
Afterwards, eight checks graded each run, including hidden tests Claude never saw.
What happened
| Forks on (default) | Forks off | No subagents | |
|---|---|---|---|
| Runs passing all 8 checks | 3 of 3 | 2 of 3 | 3 of 3 |
| Fork calls | 0 | 0 | 0 |
| Any subagent calls | 0 | 0 | 0 |
| Average total cost | $0.218 | $0.245 | $0.305 |
| Cost range | $0.213 to $0.224 | $0.226 to $0.277 | $0.235 to $0.343 |
| Cost of step 1 (search) | $0.037 | $0.049 | $0.047 |
| Cost of step 2 (refactor) | $0.121 | $0.130 | $0.190 |
| Cost of step 3 (bug hunt) | $0.060 | $0.065 | $0.068 |
| Largest context in step 1, tokens | 20,334 | 20,098 | 18,394 |
| Largest context in the whole run, tokens | 40,659 | 41,107 | 43,643 |
| Context at the first request, tokens | 18,343 | 18,204 to 18,207 | 16,050 to 16,052 |
| Average turns | 40.7 | 38 | 56 |
| Average time per run | 78.9s | 87.9s | 101.6s |
| Average input tokens, including cached | 475,391 | 571,699 | 707,389 |
| Average output tokens | 10,427 | 10,950 | 14,730 |
Claude Code 2.1.312, Sonnet 5.5, claude -p, 3 runs per column (averages unless marked). Every run, check and diff: run data. With a 3-run smoke test, the runs cost $3.15 in API charges in total. That’s what we measured: API cost, not how much of a Pro or Max plan’s usage limit this would use.
What we learned
The new default never fired. In 9 runs with forks on, Claude made 0 fork calls, and no run in any column started a subagent of any kind. It searched with Grep, read files and edited them itself. So on this job, turning forks on by default changed nothing about how the work got done.
So the cost gaps aren’t from forking. Forks on averaged $0.218 and forks off $0.245, but neither column delegated, so that gap is run-to-run variation. One forks-off run cost $0.277; the other two cost $0.226 and $0.231.
The no-subagents column cost the most, and we can’t pin it on the setting. It averaged $0.305, mostly in the refactor step ($0.190 against $0.121 and $0.130). Two of its runs took 60 and 65 turns, and the third took 43 turns and cost $0.235, in line with the others. The one real difference we can measure: with the Agent tool denied, Claude starts with about 2,300 fewer tokens of context (16,050 against 18,343), because the tool’s instructions aren’t loaded.
Quality was the same. Eight of nine runs passed every check. The one miss was a forks-off run that left a process.env read outside src/config.js. All nine found all 13 environment reads, kept the defaults, fixed the refund bug and added a regression test.
What failed, and the limits of this test
- We didn’t see a fork, so we can’t say whether forks help when they happen. Our test design had a fallback that asks Claude to split the work across subagents. We didn’t run it this time.
- One run missed a check. A forks-off run left a
process.envread outsidesrc/config.js. Every other check passed in every run. - A test setup problem in our smoke run. The repo’s
npm testcommand fails on Node 22, so our first 3-run smoke test marked it failed in every run. We ran the real 9 runs on Node 20, where the untouched repo passes all 37 tests. The smoke test’s $0.85 is included in the total. - Headless only. We ran
claude -p, where Claude can wait for a subagent. In the interactive terminal, VS Code and desktop, the docs say it can’t wait for one while fork mode is on, so timing there may differ. - One repo, 9 runs. 164 files is bigger than our last test, but small next to a real monorepo. Bigger, messier jobs may push Claude to delegate.
- API cost only. We can’t measure how much of a subscription’s weekly limit the same work would use.
The recipe
- Don’t expect the default to change much on everyday jobs. On a three-step job across a 164-file repo, Claude never chose to fork.
- Turn it off if you’d rather not have work happen out of sight.
CLAUDE_CODE_FORK_SUBAGENT=0turns fork mode off but keeps normal subagents. Adding"Agent(fork)"topermissions.denyblocks only forks. Both are in the subagent docs. - Denying all subagents saves a little context, not money. It cut about 2,300 tokens from the starting context, but that column still cost the most here.
- Watch for it on long, wide jobs. If you see forks in your own sessions, check
/usage: each subagent’s requests count toward the same limits as your main conversation.