Input corruption: first keystrokes at a fresh prompt scrambled in VS Code integrated terminal (Windows)
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
- Run
claudein the VS Code integrated terminal (PowerShell) on Windows. - At a fresh prompt, type a short sentence at normal speed, e.g.
Did not fix it. - The first characters scramble:
Didrenders asD 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: bothtrueandfalseeditor.accessibilitySupport:off(status bar had shown "Screen Reader Optimized")terminal.integrated.localEchoEnabled:offterminal.integrated.shellIntegration.enabled:falseterminal.integrated.gpuAcceleration:offandauto
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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗