[FEATURE] /branch should register forked sessions as navigable entries in claude agents
Problem Statement
When using claude agents as a session manager, there is no way to start two interactive feature branches from a shared context and manage both within the agents interface.
The two existing commands each solve half the problem:
/branch- creates an interactive fork with full shared context, but the new session never appears inclaude agents. It can only be reached viaclaude -r <session-id>in a separate terminal./fork <directive>- does appear inclaude agents, but is a one-way task worker. You cannot interact with it conversationally.
None of the available options give all three properties simultaneously:
| Approach | Shared context | Interactive | Visible in claude agents |
|---|---|---|---|
| /branch twice | Yes | Yes | No |
| /fork <directive> twice | Yes | No | Yes |
| Two terminals with claude -r <id> | Yes | Yes | No (manual) |
Use Case
I have a dev session with accumulated context (environment set up, codebase explored, decisions made). I want to start two features from that exact point and work on each interactively, switching between them in claude agents the same way I switch between any other agents.
Today I have to manage session IDs manually across multiple terminals. The agents panel is blind to both branches.
Proposed Behaviour
When /branch is called inside an active session:
- The forked session is registered as a child entry in
claude agents, linked to the parent - Both the parent and child are navigable and interactive from the agents TUI
- The
forkedFrommetadata already written to the session file (it exists today) is used to model the parent-child relationship
Related
- #32631 - broader branching spec (fork, merge, tree navigation)
- #24123 -
/forkshould open in a new terminal tab - #55347 -
/rewindpromises a fork but doesn't create one