fix: verify title marker in ensure_pane() fast path (#93)#132
Merged
bfly123 merged 1 commit intobfly123:mainfrom Mar 11, 2026
Merged
fix: verify title marker in ensure_pane() fast path (#93)#132bfly123 merged 1 commit intobfly123:mainfrom
bfly123 merged 1 commit intobfly123:mainfrom
Conversation
When tmux recycles a pane ID after CCB restart, ensure_pane() trusted the cached pane_id without verifying the title marker, routing messages to the wrong process. Add title marker verification to the fast path in all 8 session modules.
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.
Summary
Fixes #93 —
ensure_pane()trusts stalepane_idwithout title verification, routing messages to the wrong tmux pane after CCB restart.Root cause: All 8 session modules have the same fast path that returns immediately when
pane_idis alive, without checking if the title marker resolves to a different pane. When tmux recycles a pane ID to another process, messages are silently delivered to the wrong target.Fix: Add title marker verification to the fast path in all 8 session modules. If the marker resolves to a different alive pane, update the cached
pane_idand route to the correct pane.Files changed:
lib/gaskd_session.py(Gemini)lib/caskd_session.py(Codex)lib/oaskd_session.py(OpenCode)lib/daskd_session.py(Droid)lib/baskd_session.py(CodeBuddy)lib/haskd_session.py(Copilot)lib/laskd_session.py(Claude)lib/qaskd_session.py(Qwen)test/test_ensure_pane_stale.py(40 new tests)Test plan
ask geminiroutes to correct pane after tmux pane ID recycling