Ctrl+C cannot interrupt stuck SSH/long-running Bash commands
Resolved 💬 3 comments Opened Feb 5, 2026 by jsleetw Closed Feb 8, 2026
Bug Description
When a Bash command (especially SSH remote commands) gets stuck or takes too long, Ctrl+C does not interrupt the command. The CLI becomes completely unresponsive and cannot accept any new input.
Steps to Reproduce
- Run a long-running SSH command via Bash tool, e.g.:
``bash``
ssh user@remote-server "docker compose exec -T app yt-dlp --dump-json 'https://youtube.com/...'"
- While the command is running (showing "Running…" status)
- Try pressing
Ctrl+Cto interrupt - Nothing happens - CLI remains stuck
Expected Behavior
Ctrl+Cshould interrupt the running command- User should be able to cancel and continue using the CLI
Actual Behavior
Ctrl+Chas no effectEscapehas no effect- CLI is completely frozen
- Only way to recover is to:
- Close the terminal window entirely
- Or
pkill -f "ssh ..."from another terminal
Environment
- OS: macOS (Darwin 23.5.0)
- Claude Code version: latest
- Shell: zsh/bash
Additional Context
This is particularly problematic with:
- SSH commands to remote servers
- Commands with
--timeoutthat don't respect the timeout - Docker exec commands over SSH
The workaround Ctrl+\ (SIGQUIT) also doesn't work reliably.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗