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

  1. 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/...'"
``

  1. While the command is running (showing "Running…" status)
  2. Try pressing Ctrl+C to interrupt
  3. Nothing happens - CLI remains stuck

Expected Behavior

  • Ctrl+C should interrupt the running command
  • User should be able to cancel and continue using the CLI

Actual Behavior

  • Ctrl+C has no effect
  • Escape has 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 --timeout that don't respect the timeout
  • Docker exec commands over SSH

The workaround Ctrl+\ (SIGQUIT) also doesn't work reliably.

View original on GitHub ↗

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