[BUG] Ctrl+Z keybinding behavior is inconsistent between running Claude Code inside and outside a tmux session

Resolved 💬 4 comments Opened Jul 9, 2025 by jasonWong-serviceDirect Closed Jul 10, 2025

● Environment

  • Platform (select one):
  • [x] Anthropic API
  • Claude CLI version: 1.0.44 (Claude Code)
  • Operating System: Pop!_OS 22.04 (Linux 6.12.10)
  • Terminal: tmux 3.2a

Bug Description

Ctrl+Z keybinding behavior is inconsistent between running Claude Code inside and outside a tmux session. Inside tmux, Ctrl+Z acts as "undo" instead of suspending Claude Code.

Steps to Reproduce

  1. Open a terminal without tmux and run claude
  2. Press Ctrl+Z - Claude Code suspends correctly (SIGTSTP)
  3. Type fg to resume, then exit Claude Code
  4. Start a tmux session with tmux
  5. Inside tmux, run claude
  6. Press Ctrl+Z - Claude Code performs "undo" action instead of suspending

Expected Behavior

Ctrl+Z should suspend Claude Code with SIGTSTP signal consistently, whether running inside or outside a tmux session.

Actual Behavior

  • Outside tmux: Ctrl+Z suspends Claude Code (correct behavior)
  • Inside tmux: Ctrl+Z acts as "undo" command (same as Ctrl+U)

Additional Context

Both Ctrl+Z and Ctrl+U perform "undo" when Claude Code runs inside tmux. This prevents users from suspending Claude Code with the standard Unix Ctrl+Z shortcut when working in tmux sessions.

View original on GitHub ↗

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