[BUG] Ctrl+C does not interrupt `claude auth login`'s code-paste prompt (raw mode swallows SIGINT)

Status Open
Reported on v2.1.250
Maintainer reply None cached
Activity 0 comments · opened Aug 28, 2026

Description

claude auth login's code-paste prompt does not respond to Ctrl+C. Once it reaches:

Paste code here if prompted >

pressing Ctrl+C does nothing — the process keeps running indefinitely. The only way to stop it is to kill it externally (by PID or pattern match from another session, or hang up the terminal).

Reproduction

  1. Run claude auth login in an interactive terminal.
  2. Wait for the URL to print and the prompt to reach Paste code here if prompted >.
  3. Press Ctrl+C.

Expected: process exits.
Actual: process keeps running, prompt stays up, no response to Ctrl+C at all.

Reproduced identically on two independent clients/terminals (an iPhone SSH client and a Fedora 44 laptop, both SSH'd into the same remote host) — rules out a client-specific terminal quirk.

Root cause (best understanding)

The prompt puts the terminal into raw mode, which clears the termios ISIG flag. With ISIG cleared, the kernel's tty line discipline stops translating a Ctrl+C keystroke into SIGINT for any process attached to that terminal — the raw 0x03 byte arrives as plain stdin data instead of a signal. The prompt's input handling doesn't appear to check for that byte and self-exit, unlike other Node CLI patterns (readline/inquirer/ink) that typically detect 0x03 in raw mode and emit a synthetic SIGINT themselves.

This also means a wrapper script cannot work around it via its own signal trap — raw mode is a property of the shared tty device, not per-process, so no SIGINT is generated for anything on that terminal to catch.

Environment

  • claude --version: 2.1.250 (Claude Code)
  • Platform: Linux (Fedora 44)

Possibly related

  • #87553 (SIGINT ignored despite a registered handler, different trigger — startup hang, Bun runtime)
  • #81929 (Ctrl+C dead with Apple Korean IME — narrower case, possibly same underlying raw-mode family)

View original on GitHub ↗