Input corruption: first keystrokes at a fresh prompt scrambled in VS Code integrated terminal (Windows)

Open 💬 3 comments Opened Jun 29, 2026 by m-selig

Summary

Typing at a fresh Claude Code prompt inside the VS Code integrated terminal on Windows corrupts the first 1-2 keystrokes (phantom space/backspace or character reorder). After the first characters, the rest of the line is clean. Does not happen in standalone Windows Terminal / PowerShell.

Repro

  1. Run claude in the VS Code integrated terminal (PowerShell) on Windows.
  2. At a fresh prompt, type a short sentence at normal speed, e.g. Did not fix it.
  3. The first characters scramble: Did renders as D id (phantom space after the first char). Another observed case: I did -> DI did.

Expected

Text appears exactly as typed.

Actual

First 1-2 characters are reordered / gain a phantom space or backspace; the remainder of the line is correct.

Environment

  • Claude Code: 2.1.195
  • VS Code: 1.122.1
  • OS: Windows 10 (19045)
  • Shell: PowerShell (pwsh)

Already tried (no effect)

  • terminal.integrated.windowsUseConptyDll: both true and false
  • editor.accessibilitySupport: off (status bar had shown "Screen Reader Optimized")
  • terminal.integrated.localEchoEnabled: off
  • terminal.integrated.shellIntegration.enabled: false
  • terminal.integrated.gpuAcceleration: off and auto

Notes / suspected cause

Clean in standalone Windows Terminal, broken only in the VS Code integrated terminal, and only for the first keystrokes at prompt-start. This is consistent with the TUI's terminal query at prompt-draw (cursor-position / device-attributes request) having its reply injected into the input stream and colliding with the user's first keystrokes, with VS Code's xterm.js reply timing differing from a native Windows console.

View original on GitHub ↗

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