Support opening /branch in new terminal tab with shared /color
Resolved 💬 3 comments Opened Apr 4, 2026 by brandontomlin2 Closed Apr 8, 2026
Feature Request
Problem
When using /branch to fork a conversation, the branch runs inline in the same terminal. There's no way to:
- Open the branch in a new terminal tab/window — useful for comparing or working across the original and branched sessions side-by-side
- Share
/colorbetween the original and branched sessions — so both terminals are visually grouped as related work - Revert
/colorwhen the branch closes — returning the original session to its default color once the branch is no longer active
Why this matters
When branching a conversation to explore an alternative approach, it's natural to want both sessions visible simultaneously. Visual grouping via shared color makes it easy to identify which terminals are related. Reverting the color on branch close keeps the workspace clean.
Current limitations
/branchis an in-process fork with no terminal integration/coloris ephemeral and session-only — not stored in settings or accessible via hooks- No
BranchCreateorBranchClosehook events exist, so there's no way to intercept branch lifecycle - No programmatic API to get/set
/colorfrom hooks or CLI flags
Proposed solution
BranchCreatehook event — fires when/branchor/forkis called, exposing the new session ID in the hook input JSONBranchClose/BranchEndhook event — fires when a branched session ends--colorCLI flag — allow setting the session color viaclaude --resume <id> --color cyan, enabling hooks to propagate color to new tabs--new-taboption for/branch— optionally open the branch in a new terminal tab/window (e.g.,/branch --tab my-experiment)
With these primitives, users could configure hooks to:
- Open a new terminal tab on branch creation via AppleScript/iTerm2 escape sequences
- Start the branched session with
claude --resume <branch-session-id> --color <parent-color> - Revert the parent session's color on
BranchClose
Alternative / simpler approach
A built-in /branch --tab flag that handles the new-tab + color-sharing behavior natively, without requiring hook configuration.
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗