Fix: multiple sessions in same repo now get independent bridges - #5
Open
spor3006 wants to merge 3 commits into
Open
Fix: multiple sessions in same repo now get independent bridges#5spor3006 wants to merge 3 commits into
spor3006 wants to merge 3 commits into
Conversation
Session identity was stored per-project (.claude/bridge-session file), causing two Claude sessions in the same repo to share one bridge ID. Exiting either session would destroy the other's bridge. Now all three scripts prefer the per-process BRIDGE_SESSION_ID env var over the shared file. cleanup.sh only removes the file pointer if it still belongs to the exiting session.
- test-register: verify env var reuse, new session without env var, two sessions in same project - test-get-session-id: env var priority over file, stale env var fallback - test-cleanup: pass BRIDGE_SESSION_ID, verify cross-session file preservation
The connect/listen/ask commands used get-session-id.sh which could return another session's ID from the shared file. Now all commands call register.sh first (idempotent via env var) to ensure each session has its own identity. Also fixed bridge-listen.sh fallback and updated bridge-awareness skill docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Shreyas, thanks for the awesome tool! Have been giving this a spin lately and faced the issue mentioned below. Raised a fix for the same, PTAL!
Summary
.claude/bridge-sessionfile), causing two Claude sessions in the same repo to share one bridge IDregister.sh,get-session-id.sh,cleanup.sh) now prefer the per-processBRIDGE_SESSION_IDenv var over the shared filecleanup.shonly removes the file pointer if it still belongs to the exiting sessionTest plan
/bridge start)/bridge peersshows both sessions while both are active