TL;DR
/branchmoves you into a copy of the conversation (the original stays put, you return with/resume): it'sgit checkout -bfor your chat./fork [prompt]doesn't move you: it copies your whole conversation into a new background session, with its own row inclaude agents, that works on its own while you keep going. Since v2.1.212; the subagent/forkused to launch is now/subtask.
Update, October 31, 2026: since v2.1.212
/forkno longer launches a subagent inside your session: it copies the conversation into a new background session, with its own row inclaude agents. The old behavior now lives in/subtask.
If you learned /fork as "the subagent that inherits my context", your mental model is wrong. Since v2.1.212 there are three different mechanisms, and mixing them up is what makes people reach for the wrong one:
/branch: you switch into a copy yourself./fork: the copy goes off to another background session and you stay put./subtask: a subagent with your context hands a result back here.
/branch: you clone and switch in
/branch [name] creates a branch of the conversation at this point, switches you into it, and preserves the original (you return with /resume). It's for exploring a different direction without losing what you have. Want it as a fresh, independent session from outside? claude --continue --fork-session does exactly that, covered in branch your sessions with fork-session.
/fork: you send a copy to another session and keep going
/fork [prompt] doesn't move you. It copies the whole conversation into a new background session, which shows up as its own row in agent view (claude agents). The copy carries over the model, permission mode, effort level, and any "don't ask again" grants you gave during the session. From then on they're two independent conversations: nothing the copy does comes back into yours.
The typical use case: you're mid-implementation and, without stopping, you fire:
> /fork open a draft pull request with the work so far
- With a prompt, the copy starts working on it right away.
- Without one, it waits for its first instruction: select its row in
claude agentsand pressSpace, or jump in withclaude attach <id>. - The confirmation is one line with the copy's state (
session running), its row name, and its id forclaude attach. Click the name to switch into the copy; this session moves to the background. - Its edits stay out of yours: Claude Code tells it to create its own worktree before touching code, unless it's set to edit in place.
/subtask: the old /fork
If what you wanted was the old /fork, it's now called /subtask <task>. It spawns a background subagent that inherits the whole conversation (same system prompt, tools, model, and history), works while you keep going, and when it's done only its final result comes back as a message in your conversation. It shows up in a panel below your prompt: Enter opens its transcript so you can send it messages, x stops or dismisses it.
A normal subagent starts fresh: it doesn't see your history, and Claude writes it a summary message (which is why they sometimes lose context). The /subtask one inherits everything, and because its system prompt and tools are identical to the parent's, its first request reuses the parent's cache (prompt caching). The /fork copy also keeps the original conversation's cache, since v2.1.257.
Reference
/branch [name] |
/fork [prompt] |
/subtask <task> |
|
|---|---|---|---|
| What it creates | A branch of the conversation | A new background session | A background subagent |
| Do you switch? | Yes, you move into the copy | No, you stay in yours | No, you stay in yours |
| Where you see it | In your terminal | Its row in claude agents |
A panel below the prompt |
| What comes back to your chat | Nothing (it's you) | Nothing, it's independent | Its final result |
| The original | Preserved (/resume) |
Untouched, you stay in it | Untouched, you stay in it |
Details worth knowing
- Agent view turned off: with
disableAgentVieworCLAUDE_CODE_DISABLE_AGENT_VIEW,/subtaskisn't available and/forklaunches the old subagent. - Sessions that can't be copied: if you started with a replaced system prompt or a
--toolsallowlist,/forksays so instead of making a partial copy. - The copy's name: if your session has no title, the row is named after your prompt.
- A
/subtaskfork can't spawn another fork (it can spawn other subagent types).
Official docs: Copy the session with /fork · Fork the current conversation · Commands
Requirements
- Claude Code v2.1.212+ for
/forkas a background session and for/subtask, with agent view on.