[BUG] Quitting via /quit or ctrl+d sometimes leaves shell in broken state
Resolved 💬 4 comments Opened Mar 27, 2026 by witchof0x20 Closed Apr 16, 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?
This one has been hard to hunt down the exact cause for. Occasionally, when quitting a claude code session (via /quit, ctrl+d, ctrl+c) i end up in a state where ctrl-sequences output characters to the prompt and backspace no longer works. The shell becomes fixed with reset, but ideally a shell should not become unusable after claude code exits.
What Should Happen?
Shell is usable normally after claude code exits.
Error Messages/Logs
No error messages, Ctrl-U for example spits out
;5u7;5u7;5u7;5u7;5u7;5u7;5u77;5u7;5u7;
Steps to Reproduce
Happens intermittently when exiting sessions, and I'm not sure of the exact condition. Seems to not happen exiting from a fresh session.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.83
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
Terminal is alacritty, OS is NixOS
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗