Add /fork skill β parallel sessions from one conversation - #2
Conversation
New skill: /fork opens a new terminal tab with a forked copy of the current conversation. The child session auto-connects to the parent via the bridge, so both can query each other immediately. Supports Ghostty, iTerm2, and Terminal.app on macOS. Uses the existing register.sh for bridge registration and the pending-connect breadcrumb for auto-connect on SessionStart. Use cases: - Branch off an experiment without losing main thread - Parallelize work across two agents sharing context - Test a different approach while keeping the original running Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PatilShreyas
left a comment
There was a problem hiding this comment.
Thanks for the PR and the creative idea! Forking a conversation and auto-connecting via bridge is a cool concept. However, I have a few concerns that lead me to request changes:
1. Conflicts with built-in Claude Code /fork
Claude Code already has a native fork/worktree mechanism. Adding a /fork skill to this plugin would shadow or conflict with that built-in command. Users would get confused about which /fork they're invoking.
2. Scope of session-bridge
session-bridge is specifically about cross-project, cross-repo communication between separate Claude Code sessions. The core use case: a library session and a consumer app session talking to each other about breaking changes, API migrations, etc.
Forking is a different concern. It's about session management and parallelization within the same project. It doesn't fit the plugin's purpose.
3. Technical issues
A few things in the implementation that would need fixing if this were in scope:
- Skill vs Command: The file uses
argument-hintandallowed-toolsin SKILL.md frontmatter, but those are command fields, not skill fields. This should be a command if anything. - Session ID lookup: Uses
ls -t *.jsonl | head -1which we specifically moved away from becauseclaude -pcreates small session files thatls -tpicks over the real conversation. We builtget-session-id.shfor this. pending-connectbreadcrumb has no reader: There's noSessionStarthook in ourhooks.jsonto read~/.claude/session-bridge/pending-connect. The child session wouldn't actually auto-connect.- macOS only: No OS detection or guard for Linux users.
Suggestion
This would work better as a standalone plugin rather than part of session-bridge. That way it can own the /fork UX without conflicting with Claude Code's built-in mechanism or overloading this plugin's scope.
Appreciate the contribution though!
Summary
Adds a new
/forkskill that opens a new terminal tab with a forked copy of the current Claude Code conversation. The forked session auto-connects to the parent via the bridge.plugins/session-bridge/skills/fork/SKILL.mdREADME.mdβ added/forkto commands table and plugin structureHow it works
register.shpending-connectbreadcrumb for the child's SessionStart hookclaude -r <session> --fork-sessionTerminal support (macOS)
Use cases
/bridge askeach other immediately after forkTest plan
/forkfrom a Ghostty session β new tab opens with forked conversation/fork experimentβ new tab with named session/bridge peersshows both sessions/bridge askfrom parent β child responds with context from the forked conversationGenerated with Claude Code