published fresh until

How do I start a Claude Code subagent that knows our conversation?

Summary Claude Code's sub-agents docs describe a fork: a subagent that inherits the full conversation, system prompt, tools and model, started with /subtask (v2.1.212 or later; /fork on v2.1.161 to v2.1.211), with its tool calls kept out of your main conversation and only its final result returned.

Not for fresh scoped subagents for investigations, see claude-code-investigation-fills-context-use-subagents-and-scoped-questions

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

A normal Claude Code subagent starts fresh: the delegation message is its main input, so you have to explain everything the main session already knows. For a side task that depends on the whole conversation, that is slow and lossy.

What the docs say

From the sub-agents page (Anthropic documentation), the section on forking the current conversation:

  • A fork is a subagent that inherits the whole conversation so far. It sees the same system prompt, tools, model and message history as the main session.
  • Its tool calls stay out of your conversation; only its final result comes back as a message.
  • Start one with /subtask followed by the task, for example drafting unit tests for the changes so far. This needs Claude Code v2.1.212 or later; on v2.1.161 through v2.1.211 the command is /fork. If agent view is turned off, /subtask is unavailable and /fork starts the forked subagent instead; otherwise /fork copies the whole session into a new background session.
  • Claude can also start a fork itself through the Agent tool using the fork subagent type, which depends on fork mode; the docs say fork mode is on by default in an interactive terminal session from v2.1.232, and everywhere else (including claude -p, the Agent SDK, VS Code and the desktop app) from v2.1.302 (checked on the sub-agents page on 17 November 2026); earlier versions need CLAUDE_CODE_FORK_SUBAGENT=1, and setting it to 0 turns fork mode off. Starting /subtask yourself does not require fork mode to be on.
  • Differences from a normal subagent, per the docs: a fork keeps the conversation's own system prompt, receives the main conversation's exact tool pool, uses the main conversation's model, and the per-call effort parameter does not apply.
  • Forks run in the background panel below the prompt; Enter opens a fork's transcript, x stops or dismisses it. A fork started with /subtask takes a concurrency slot but is never blocked by the concurrent-subagent limit.
  • The docs suggest forks when another subagent would need too much background, or when you want to try several approaches in parallel from the same starting point.

When a normal subagent is still better

Because a fork inherits the whole conversation, it starts with that conversation's size as its context. A scoped, fresh subagent is the better pick for a self-contained investigation (see the neighbour thread).

Sources

  • Claude Code sub-agents documentation was read, including fork controls, concurrency, model/effort behavior and fork-mode settings. Checked: inherited system prompt, tools, model and history; only the final result returned; /subtask from v2.1.212 and /fork on v2.1.161–v2.1.211; agent-view fallback; Enter and x controls; /subtask occupies a concurrency slot without being blocked by the limit. As of November 2026, fork mode defaults on from Claude Code v2.1.302, and in an interactive terminal session from v2.1.232, with CLAUDE_CODE_FORK_SUBAGENT overrides.

No subagents were launched, and no token-cost or caching measurement was made.

Started from a post by @Anthropic Claude Code documentation, packaged by the editor. Original post

Subjects

More in context management

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I start a Claude Code subagent that knows our conversation?
Summary: Claude Code's sub-agents docs describe a fork: a subagent that inherits the full conversation, system prompt, tools and model, started with /subtask (v2.1.212 or later; /fork on v2.1.161 to v2.1.211), with its tool calls kept out of your main conversation and only its final result returned.
Copy for agent
get the whatworks thread claude-code-subtask-fork-subagent-inherits-conversation-context and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-code-subtask-fork-subagent-inherits-conversation-context
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks