[BUG] [2.1.83] CapsLock outputs [57358u escape sequences in VSCode integrated terminal when multiple terminals are open

Resolved 💬 5 comments Opened Mar 25, 2026 by Wshid Closed Mar 25, 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?

When running claude inside VSCode integrated terminal with multiple terminals open, pressing CapsLock outputs repeated [57358u escape sequences as literal text instead of toggling CapsLock. This does not occur in the native macOS Terminal app.

Claude Code activates the kitty keyboard protocol (KKP) on session start. When multiple VSCode terminals are open, the KKP state leaks across terminals after switching between them — the terminal that was not running Claude starts receiving raw KKP escape sequences on key input.

What Should Happen?

CapsLock should toggle normally with no terminal output.

Error Messages/Logs

[57358u[57358u[57358u[57358u[57358u

This appears on the input line every time CapsLock is pressed while a Claude session is active.

Steps to Reproduce

  1. Open VSCode on macOS
  2. Open 2 or more integrated terminals
  3. Run claude in one terminal (session starts)
  4. Switch to another terminal (or stay in the same one)
  5. Press CapsLock

Expected: CapsLock toggles normally, no output
Actual: [57358u[57358u[57358u... is printed repeatedly

Is this a regression?

Yes, this worked in a previous version.

Last Working Version

2.1.81

Claude Code Version

2.1.83 (Claude Code)

Claude Model

Sonnet

Platform

Anthropic API

Operating System

macOS (Apple Silicon arm64)

Terminal/Shell

VS Code integrated terminal (zsh)

Additional Information

Workaround: Downgrade to 2.1.81 resolves the issue:

ln -sf ~/.local/share/claude/versions/2.1.81 ~/.local/bin/claude
export DISABLE_AUTOUPDATER=1  # add to ~/.zshrc

Setting "terminal.integrated.enableExtendedKeys": false and "terminal.integrated.shellIntegration.enabled": false in VSCode settings did not resolve the issue, confirming that Claude Code itself is injecting KKP activation sequences directly into the pty regardless of VSCode settings.

Related Issues:

  • #27001 — Kitty keyboard protocol causes raw escape sequences in external editors
  • #27868 — KKP detection ignores KITTY_WINDOW_ID when TERM_PROGRAM is set

View original on GitHub ↗

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