[BUG] Ctrl+C fails to cancel generation on Manjaro Linux

Resolved 💬 3 comments Opened Mar 28, 2026 by kvalv Closed Apr 1, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

Ctrl+C during response generation does not cancel the generation. Instead, it triggers the "press Ctrl+C to exit" prompt (the process-level SIGINT handler).

During generation:

  • Ctrl+C: triggers "press Ctrl+C to exit" prompt instead of canceling
  • Single Escape: no effect
  • Double Escape: cancels generation, but with noticeable delay
  • Ctrl+Q (explicitly bound to chat:cancel): no effect
  • Type + Enter: cancels, but with ~8 second delay

This suggests stdin is being polled infrequently or in line-buffered mode during streaming rather than character-by-character raw mode.

What Should Happen?

Ctrl+C should immediately cancel generation, as it does on Fedora with the same Claude Code version and terminal.

Steps to Reproduce

  1. Open Claude Code CLI in Alacritty on Manjaro Linux
  2. Send a prompt that generates a long response
  3. Press Ctrl+C during generation
  4. Observe: "press Ctrl+C to exit" prompt appears instead of canceling generation
  5. Compare: on Fedora with same setup, Ctrl+C correctly cancels generation

Debugging Performed

  • Raw mode works correctly in standalone Node.js test — process.stdin.setRawMode(true) catches Ctrl+C as keypress: [3] without SIGINT
  • No SIGINT double-delivery in raw mode test
  • No stty overrides or trap SIGINT in shell config
  • Clean reinstall (removed both npm-global and native installs) did not fix
  • TERM=xterm-256color did not fix
  • Reproducible across: Alacritty direct, tmux, vim terminal

Claude Model

Opus

Is this a regression?

I don't know

Claude Code Version

2.1.86 (Claude Code)

Platform

Anthropic API

Operating System

Other Linux (Manjaro, kernel 5.15.197-1-MANJARO)

Terminal/Shell

Other (Alacritty + zsh, also reproduced in tmux and vim terminal)

Additional Information

  • Works correctly on Fedora with same Claude Code version (2.1.86), same terminal (Alacritty), newer kernel (6.x)
  • System Node.js: v25.2.1
  • Alacritty terminfo is installed
  • Keybindings diagnostic confirms ctrl+c is hardcoded and cannot be rebound

🤖 Generated with Claude Code

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗