/branch (/fork) should keep the current process in the original session
Resolved 💬 2 comments Opened Mar 17, 2026 by satokupo Closed Apr 15, 2026
Summary
The /branch (and its alias /fork) command automatically switches the current process to the newly created branch session. This forces the user to leave the original session, which is unintuitive and inconvenient for parallel workflows.
Current Behavior
- User is in session A (working on a task)
- User runs
/branch myname - Current process is switched to the new branch session (new UUID)
- The original session A can only be resumed via
claude -r <original-UUID> - Unless the user ran
/renamebeforehand, there's no friendly name to resume the original
Expected Behavior
The current process should stay in the original session, and the branch should be created as a separate session that can be opened in another terminal:
- User is in session A
- User runs
/branch myname - User remains in session A
- Branch is accessible via
claude -r mynamein another terminal
Why This Matters
- The current behavior requires users to always run
/renamebefore/branchas a workaround, which is easy to forget - Users who want to work on both the original and branch in parallel (common use case) are forced to copy/paste a raw UUID to get back to the original
- The mental model is counterintuitive — "branching" typically means creating something new from where you are, not moving to the new thing
Workaround
Currently users must:
/rename my-session ← name the current session first
/branch my-branch ← then branch (auto-switches to branch)
claude -r my-session ← resume original in another terminal
Suggested Improvement
Either:
- Default to staying in the original session (preferred — matches git branch mental model where
git branch foodoesn't switch to foo) - Add a
--no-switchflag to/branch - Auto-assign a name to the original session before switching (e.g., derive from the branch name like
myname-origin)
Environment
- Claude Code version: 2.1.77
- OS: macOS (Darwin 25.3.0, arm64)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗