From 1453b8b59224ac546506a1f2d361c8aba050e59d Mon Sep 17 00:00:00 2001 From: Julian Knutsen Date: Tue, 13 Jan 2026 21:39:55 +0000 Subject: [PATCH] fix(handoff): use correct witness working directory (#444) The witness role doesn't have a /rig worktree like the refinery does. The handoff command was trying to cd to /witness/rig which doesn't exist, causing the respawned pane to fail immediately and the session to die. Changed witness workdir from /witness/rig to /witness. Co-authored-by: Claude Opus 4.5 --- internal/cmd/handoff.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/cmd/handoff.go b/internal/cmd/handoff.go index 9a97c37e..ccbd0ef6 100644 --- a/internal/cmd/handoff.go +++ b/internal/cmd/handoff.go @@ -442,10 +442,11 @@ func sessionWorkDir(sessionName, townRoot string) (string, error) { return "", fmt.Errorf("cannot parse crew session name: %s", sessionName) case strings.HasSuffix(sessionName, "-witness"): - // gt--witness -> //witness/rig + // gt--witness -> //witness + // Note: witness doesn't have a /rig worktree like refinery does rig := strings.TrimPrefix(sessionName, "gt-") rig = strings.TrimSuffix(rig, "-witness") - return fmt.Sprintf("%s/%s/witness/rig", townRoot, rig), nil + return fmt.Sprintf("%s/%s/witness", townRoot, rig), nil case strings.HasSuffix(sessionName, "-refinery"): // gt--refinery -> //refinery/rig