Files
Codeman/.changeset/7ab53c88.md
T
Codeman maintainer 48f30f3055 style: drop em-dashes from the text added in c2114615
House style, and these land in the changelog. Only the sentences added in the
previous commit are touched; the em-dashes in contributor text and in the
pre-existing COD-54/COD-115 comments are left alone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-14 12:46:24 +02:00

1.3 KiB

aicodeman
aicodeman
patch

fix(terminal): swallow Ctrl+Z in agent sessions so it cannot suspend a running CLI

Ctrl+Z raises SIGTSTP on the pane's tty. In a shell session that is ordinary job control and is left alone, but in an agent session suspending the CLI stops an unattended loop dead with no visible output, the same failure shape as an XOFF freeze. The key is now swallowed in attachCustomKeyEventHandler for every non-shell mode, and unconditionally in the subagent/teammate terminals, which always run an agent CLI. The match is case-insensitive, because Caps Lock flips ev.key to 'Z' without setting shiftKey and a plain === 'z' check would let exactly the keystroke this exists to catch through.

This is defence in depth rather than a fix for the steady state: an agent CLI holds its tty in raw mode with ISIG off, where ^Z is already inert. It covers the moments that are not the steady state: the window before the CLI takes the tty at startup, and any point where it hands the tty back. Two input paths are deliberately not covered and still reach the PTY: the mobile keyboard accessory bar's one-shot Ctrl, and the CJK composition textarea when cjkInputEnabled is on. Both are separate choke points to the PTY, and both are worth covering if this ever turns out to matter in practice.