[BUG] Claude Code in VSCode CLI does not respond to ESC and Ctrl+C events
Status Fixed / completed
Reported on v2.1.83
Maintainer reply ✓ Yes — ashwin-ant
Workaround ✓ Mentioned in thread ↓
Activity 10 comments · opened Mar 25, 2026 · closed Apr 19, 2026
💡 Likely answer: A maintainer (ashwin-ant, collaborator)
responded on this thread — see the highlighted reply below.
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?
When running Claude Code via the VSCode integrated terminal (CLI), keyboard interrupt signals such as ESC and Ctrl+C are not being handled correctly. The process does not respond to these events as expected.
What Should Happen?
Description
When running Claude Code via the VSCode integrated terminal (CLI), keyboard interrupt signals such as ESC and Ctrl+C are not being handled correctly. The process does not respond to these events as expected.
Expected Behavior
Ctrl+Cshould interrupt the current operation or cancel the running process.ESCshould cancel/abort the current input or ongoing task.
Actual Behavior
- Neither
ESCnorCtrl+Cproduce any effect. - The process continues running without acknowledging the keyboard signals.
Error Messages/Logs
NA
Steps to Reproduce
- Open the VSCode integrated terminal.
- Run
claudeto start Claude Code. - During an active session or while a response is being generated, press
ESCorCtrl+C.
Claude Model
Sonnet (default)
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
Windows
Terminal/Shell
PowerShell
Additional Information
- Editor: Visual Studio Code
- Terminal: VSCode integrated terminal (CLI)
- OS: Windows 10
10 Comments
/Also unable to inputsame here, version 2.1.84. in my case also Tab key does not work
I have the same (win11 arm64)
Going back to 2.1.81 resolves the problem temporarily.
This is the Kitty keyboard protocol regression introduced in v2.1.83. Claude Code now pushes enhanced keyboard mode (progressive enhancement level 1+) but doesn't properly handle the protocol in certain terminal emulators, particularly VSCode's xterm.js.
Root cause: The Kitty keyboard protocol sends modifier keys and special keys as CSI sequences (e.g.,
CSI 57358 ufor Caps Lock). When the terminal or the app doesn't fully decode these sequences, raw escape codes leak into input and key events like ESC/Ctrl-C get swallowed or misinterpreted.Workaround — force xterm.js back to standard keyboard protocol:
Add this to your VS Code
settings.json:This tells xterm.js to not advertise Kitty protocol support, so Claude Code won't push enhanced mode.
Alternative — pin to 2.1.81:
Why downgrading works: v2.1.81 didn't push Kitty keyboard protocol, so ESC, Ctrl-C, and Ctrl-D were handled through standard ANSI sequences.
The fix should come from Claude Code properly popping the Kitty protocol on exit and correctly decoding all key events while in enhanced mode. This is tracked across several related issues (#38761, #38647, #38840).
This VS Code setting works for me with 2.1.84
"terminal.integrated.enableKittyKeyboardProtocol": false
@ashokvc this works , thanks for sharing
I was also stuck in that situation, but pressing CTRL + C multiple times worked for me.
This issue is really killing my Claude Code (CC) productivity. Sometimes I have accept edits on, and watch CC take 10 mins updating many files with the wrong design. Only when it ends do I get the chance to instruct it on the proper design for the fix. If my git is not up to date I have to rely on CC correctly reverting the code changes. The help text in the terminal says "Hit esc to interrupt", so it's frustrating when the software is not compliant with its own instructions. If you comment, don't deflect: my prompting is wrong, I should have updated git before code changes, my using CC wrong, etc. Programs have been interrupting processing for decades; why can't CC? I don't get why this is hard?
Version 2.1.81 (Claude Code)
Windows 11
Windows Terminal running PS 7.6.0
This was fixed in v2.1.85 — Restored terminal allowlist for Kitty keyboard protocol so VS Code integrated terminal (xterm.js) and SSH sessions no longer get pushed into enhanced keyboard mode, fixing ESC/Ctrl+C/Shift+Tab/Ctrl+W being swallowed on Windows. If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.
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.