Polecat spawn quits at Claude Code trust dialog: "No, exit" is now pre-selected, gt presses Enter
Summary
Claude Code 2.1.252 renders the workspace trust dialog with "No, exit" as the pre-selected option:
Quick safety check: Is this a project you created or one you trust? ...
❯ No, exit
Yes, I trust this folder
Enter to confirm · Esc to cancelTmux.AcceptWorkspaceTrustDialog (internal/tmux/tmux.go) assumes option 1 is the trust option and sends Enter, so Claude exits. gt sling then reports getting pane for <session> (session likely died during startup) and rolls the polecat back. Polecats whose directory already has hasTrustDialogAccepted: true in ~/.claude.json are unaffected, which is why it looks intermittent (reused polecat names work, fresh ones die).
Environment
gt 1.1.0 (Homebrew) and main@649b832; Claude Code 2.1.252; macOS 25.6.
Fix that works locally
Before sending Enter, if the captured pane contains ❯ No, exit (or > No, exit), send Down first and wait ~150ms. Patched build has been running polecats successfully.
if containsWorkspaceTrustDialog(content) {
if strings.Contains(content, "❯ No, exit") || strings.Contains(content, "> No, exit") {
_, _ = t.run("send-keys", "-t", session, "Down")
time.Sleep(150 * time.Millisecond)
}
if _, err := t.run("send-keys", "-t", session, "Enter"); err != nil { return err }
...A more robust variant: parse the highlighted line and only press Enter when it contains "trust".
Source: gastownhall/gastown