AI News DailyTips한국어
← AI tool tips
Claude Code✓ Confirmed in official docsAdded Oct 17

How to start and turn off Claude Code fork subagents that inherit your conversation

A fork in Claude Code is a subagent that inherits the entire conversation so far. You don't have to re-explain the background, and the fork's own tool calls stay out of your conversation; only its final result comes back. Starting with 2.1.302 (October 16), fork mode is on by default not only in the terminal but also in claude -p, the Agent SDK, the desktop app and VS Code.

  1. Start one yourself with /subtask followed by the task. The fork runs in the background in a panel below the prompt, and its result arrives as a message in your main conversation when it finishes.
/subtask draft unit tests for the parser changes so far
  1. In the panel, move between rows with ↑/↓ and press Enter to open a fork's transcript and send it follow-ups. x stops a running fork, and Esc returns focus to the prompt.

  2. A fork shares the main session's system prompt, tools and model, so its first request reuses the main session's prompt cache. For tasks that need the same context, it costs less than a fresh subagent.

  3. To turn fork mode off, set the environment variable to 0. It turns off in every kind of session, and you can still start forks yourself with /subtask.

{
  "env": {
    "CLAUDE_CODE_FORK_SUBAGENT": "0"
  }
}
  1. To keep fork mode on but stop Claude from spawning forks on its own, add an Agent(fork) deny rule.
{
  "permissions": {
    "deny": [
      "Agent(fork)"
    ]
  }
}

/subtask needs 2.1.212 or later; on 2.1.161 through 2.1.211 the command is /fork. claude mcp serve never offers forks. The docs still say fork mode is off by default in -p and the Agent SDK; the 2.1.302 changelog changed that.

Get notified when a new tip lands

Tip alerts only go out in the app. Install it and turn notifications on.

Get the app

All tips →