Claude Code 2.1.132: Graceful Shutdown When Killed via IDE or SSH Disconnect

Claude Code

Claude Code 2.1.132 introduces graceful shutdown handling so that tasks interrupted by IDE closure, SSH disconnection, or signal-based termination can be recovered cleanly in the next session. The release also addresses a collection of reliability issues spanning model-selection display, terminal rendering, shell environment initialization, and keyboard shortcut correctness on macOS and Windows. Together these fixes reduce the friction of working across remote or multi-IDE setups.


Graceful Shutdown on SIGTERM and SSH Disconnect

One of the most disruptive scenarios in any long-running coding session is an unexpected termination β€” the IDE closes, the SSH connection drops, or a system signal kills the process. Prior to version 2.1.132, Claude Code would exit abruptly in these situations without saving session state, meaning any in-progress context was lost and could not be resumed.

Version 2.1.132 introduces graceful shutdown handling. When Claude Code receives a termination signal (SIGTERM) β€” whether from an IDE shutdown, an SSH disconnect, or an explicit kill command β€” it now performs an orderly exit sequence: flushing pending writes, checkpointing session state, and closing file handles cleanly. This means the session becomes resumable, and developers can pick up where they left off without losing context.

For teams running Claude Code in remote environments β€” containerized CI runners, cloud development boxes, or long-lived tmux/screen sessions β€” this change meaningfully reduces the cost of connection interruptions.

Reliability Fixes and Display Corrections

Beyond graceful shutdown, version 2.1.132 delivers a focused set of reliability improvements across several subsystems.

Model Display and Status Accuracy

The /status command previously showed the wrong model identifier in certain configurations, leading to confusion about which model was actually handling requests. This has been corrected so the displayed model always reflects the active runtime model.

Terminal Rendering

Fullscreen terminal rendering received additional stability work. Scroll position artifacts and flicker during alternate-screen transitions β€” issues that surfaced when switching between the TUI renderer and standard terminal output β€” have been addressed.

Shell Environment Initialization

Shell startup sequences on certain configurations were not correctly inheriting environment variables set in .bashrc or .zshrc profile files. This could cause tools invoked by Claude Code to run with an incomplete environment. The initialization order has been corrected.

Keyboard Shortcuts

  • Alt+T thinking toggle on macOS was not reliably intercepting the key chord due to a conflict with the macOS Option key mapping. The binding has been updated to fire correctly.
  • Dead keyboard in Windows background sessions: Keyboard input was silently dropped when Claude Code ran in a background Windows terminal session. Input handling now correctly routes keystrokes regardless of foreground/background session state.

Summary

Version 2.1.132 is a focused reliability release. The graceful shutdown feature is the standout change β€” it makes Claude Code meaningfully more resilient in remote and IDE-managed environments. The remaining fixes address display and input correctness issues that, while individually small, collectively smooth out the day-to-day experience for developers on macOS, Windows, and remote Linux setups.