fix: qualify pane ID with session name in FindAgentPane verification#3503
Open
ckumar1 wants to merge 1 commit intogastownhall:mainfrom
Open
fix: qualify pane ID with session name in FindAgentPane verification#3503ckumar1 wants to merge 1 commit intogastownhall:mainfrom
ckumar1 wants to merge 1 commit intogastownhall:mainfrom
Conversation
FindAgentPane and NudgeSessionWithOpts qualified pane IDs using "session:%N" syntax, but tmux send-keys interprets this as a window reference, failing with "can't find window: %N". The correct syntax is "session:.%N" where the dot indicates a pane target. display-message accepts both forms (which masked the bug in FindAgentPane verification), but send-keys does not. Confirmed: send-keys -t "session:%22" → "can't find window: %22" send-keys -t "session:.%22" → success Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Executed-By: gastown/crew/woodhouse
c9da7f0 to
199d904
Compare
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
FindAgentPaneandNudgeSessionWithOptsqualify pane IDs with the session name to avoid ambiguity in multi-session environments. The existing code usedsession:%Nsyntax (e.g.,hq-dog-alpha:%22), buttmux send-keysinterprets this as a window reference, failing with "can't find window: %22".The correct tmux target syntax for panes is
session:.%N(note the dot), which tells tmux to look up a pane rather than a window.display-messageaccepts both forms, which masked the bug —FindAgentPane's verification viadisplay-messagepassed, but the subsequentsend-keysdelivery failed.What changed
internal/tmux/tmux.go: Changed pane qualification fromsession + ":" + panetosession + ":." + panein bothNudgeSessionWithOpts(delivery) andFindAgentPane(verification)Reproduction
Test plan
go build ./cmd/gtpassesgo vet ./internal/tmux/cleanTestFindAgentPane_*tests passgt nudgesucceeds for target with pane ID%22