Command reference Β· Claude Code
/branch
Creates a branch of the current conversation from this point, to try a different direction without losing the history so far.
/branch creates a branch of the running conversation from the current point, to try a different direction without losing the existing history. The command switches directly into the new branch; the original remains unchanged and is reachable again via /resume.
/branch is distinct from two related commands: /fork instead copies the conversation into an independent background session (its own row in claude agents) and lets you keep working in the current window β since version 2.1.212, this copy no longer reports back. For a side task whose result should flow back into the current conversation, /subtask is intended instead, a background subagent with full conversation context.
Historically, today's /branch command was itself called /fork until version 2.1.77; the name /fork was then reassigned several times and has only denoted copying into an independent session since version 2.1.212.
π THE SAME TASK (βBRANCH SESSION (FORK/BRANCH)β) ON OTHER PLATFORMS
β WHEN TO USE IT?
Try an alternative approach from the current point
/branch
Explore a fundamentally different direction and keep working there yourself
/branch try server-side instead of client-side rendering
β WHEN NOT TO?
The result of a side task should flow back into this conversation while you keep working
/branch moves you away from the existing history into the new branch; for a side task with feedback into the current conversation, /subtask has been intended since version 2.1.212, not /fork.
Better: /subtask
An independent copy should keep running in the background while you stay in the current window
/branch switches into the new branch and thereby leaves the current view; anyone who wants to keep working themselves while a copy runs independently in the background needs /fork.
Better: /fork
SOURCES
- Claude Code docs (official) β code.claude.com
MORE COMMANDS Β· Claude Code