From b930704b5f74ec60db5742702f1105feafdf147c Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Wed, 24 Dec 2025 14:34:10 -0800 Subject: [PATCH] fix: prevent tmux link-window from auto-switching windows (gt-wmhj) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running `gt crew at ` from inside tmux, the linked window would auto-select, causing users to unknowingly switch agents. Add -d flag to keep user in their current window. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/tmux/tmux.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/tmux/tmux.go b/internal/tmux/tmux.go index b7e1fec6..3ee82cb8 100644 --- a/internal/tmux/tmux.go +++ b/internal/tmux/tmux.go @@ -532,9 +532,10 @@ func (t *Tmux) ConfigureGasTownSession(session string, theme Theme, rig, worker, // LinkWindow links a window from another session into the current session. // This allows viewing another session's window as a tab without switching sessions. // Useful when already inside tmux and want to see another session. +// Uses -d flag to NOT auto-select the new window, keeping user in current window. func (t *Tmux) LinkWindow(sourceSession string, windowIndex int) error { source := fmt.Sprintf("%s:%d", sourceSession, windowIndex) - _, err := t.run("link-window", "-s", source) + _, err := t.run("link-window", "-s", source, "-d") return err }