Skip to content

Browse catalog

Search catalog

[READY] Type a title, tag, or description.

NOTES // snippet

Turn off Claude Code subagent forking

LAST_MODIFIED
2026.10.26
CATEGORY
snippet

A forked subagent (subagent_type: "fork") inherits the whole conversation and its prompt cache. It is on by default, and CLAUDE_CODE_FORK_SUBAGENT=0 turns it off.

Use

In settings.json:

{
  "env": { "CLAUDE_CODE_FORK_SUBAGENT": "0" }
}

Turn it off when you want Claude to wait for a subagent’s result instead of spawning it in the background. Fork mode is on by default since v2.1.232 for interactive sessions.

Contrast with subagent context isolation: a fork shares your context, an isolated subagent starts clean.

Sources

  1. Claude Code changelogAnthropic
claude-codesubagentssettings

Related_Notes