fix: ExpectedPaneCommands returns both node and claude for Claude Code (#740)
Newer versions of Claude Code report the tmux pane command as "claude" instead of "node". This caused gt mayor attach (and similar commands) to incorrectly detect that the runtime had exited and restart the session. The fix adds "claude" to the expected pane commands alongside "node", matching the behavior of IsClaudeRunning() which already handles both. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1437,10 +1437,11 @@ func TestGetRuntimeCommand_UsesRigAgentWhenRigPathProvided(t *testing.T) {
|
||||
|
||||
func TestExpectedPaneCommands(t *testing.T) {
|
||||
t.Parallel()
|
||||
t.Run("claude maps to node", func(t *testing.T) {
|
||||
t.Run("claude maps to node and claude", func(t *testing.T) {
|
||||
got := ExpectedPaneCommands(&RuntimeConfig{Command: "claude"})
|
||||
if len(got) != 1 || got[0] != "node" {
|
||||
t.Fatalf("ExpectedPaneCommands(claude) = %v, want %v", got, []string{"node"})
|
||||
want := []string{"node", "claude"}
|
||||
if len(got) != 2 || got[0] != "node" || got[1] != "claude" {
|
||||
t.Fatalf("ExpectedPaneCommands(claude) = %v, want %v", got, want)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user