Ctrl+Z suspend has no reliable resume — destroys long-running agent sessions

Resolved 💬 2 comments Opened Mar 21, 2026 by FrankAtGHub Closed Apr 18, 2026

Description

Ctrl+Z now suspends Claude Code (added recently). The problem: there is no reliable way to resume.

Steps to Reproduce

  1. Run Claude Code in a tmux session (long-running agent)
  2. Accidentally press Ctrl+Z (easy to do, especially over SSH or remote terminal)
  3. Claude Code shows: Claude Code has been suspended. Run 'fg' to bring Claude Code back.
  4. Type fg — it types INTO the suspended Claude Code input field, not the shell
  5. Try Ctrl+_, arrow keys, Enter — nothing works
  6. Only fix: kill the process and restart, losing all conversation context

Expected Behavior

Either:

  • Ctrl+Z should be disableable via keybindings.json
  • fg should actually work (resume to shell, then fg back)
  • There should be a documented resume keybinding
  • Or Ctrl+Z should be removed as a keybinding entirely

Impact

For users running Claude Code as long-lived agents in tmux sessions (24/7 AI assistants, development pipelines, orchestration systems), an accidental Ctrl+Z is catastrophic:

  • Hours/days of conversation context lost
  • No way to save state before the kill
  • Session transcript exists in JSONL but the live conversation is destroyed
  • Especially painful over SSH where key sequences can be unreliable

Environment

  • Claude Code v2.1.81
  • Ubuntu 24.04
  • tmux 3.4
  • SSH from Windows Terminal (PowerShell) to Linux server

Workaround

None. Must kill the session (tmux kill-session) and restart. Conversation context is lost.

Suggestion

Add suspend to keybindings.json so users can disable it:

{
  "suspend": null
}

Or make the resume actually work from the shell level.

View original on GitHub ↗

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