[BUG] Claude Code v2.1.83 breaks my terminal on exit
Status Fixed / completed
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 7 comments · opened Mar 25, 2026 · closed Mar 26, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
After exiting Claude Code v2.1.83, Ctrl+C, Ctrl+D, Ctrl+L etc. don't work anymore!
Example:
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Press Ctrl-D again to exit
Resume this session with:
claude --resume a1213c5a-8086-4d4d-8bd4-07b5bf06f947
~ % 00;5u00;5u00;5u00;5u08;5u
What Should Happen?
my terminal should keep working normally after exiting Claude Code
Error Messages/Logs
Steps to Reproduce
exit Claude Code v2.1.83
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
v2.1.81
Claude Code Version
v2.1.83
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
using Ghostty
7 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I am running into this too.
OS: MacOS
Terminal: Kitty
Claude Version:
v2.1.83I exited the program with
/exit.The issue is also present on Linux.
Edit: on ghostty, terminal can be restored with Menu -> Reset and Ctrl-C afterwards.
Same issue here on Linux (Rocky Linux 10, kernel 6.12.0) with Ghostty, running Claude Code inside a Podman container.
Bisect confirmation: Built two identical containers differing only in Claude Code version:
/exitAdditional note: host-side cleanup (
stty sane,reset, escape sequence resets) has no effect. The parent wrapper script also appears to be signal-killed on container exit, preventing any post-exit cleanup from running.Workaround to restore your terminal
Same root cause as #38761 — Claude Code enables kitty keyboard protocol but does not restore terminal state on exit.
A Stop hook can fix this automatically:
This sends the disable sequences for both kitty keyboard protocol (
\e[<u,\e[=0u) and modifyOtherKeys (\e[>0m) on every session exit.This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.