[BUG] "Fix with Claude Code" action is broken in VSCode
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [X] Other: Claude Code <!-- specify -->
- Claude CLI version: 1.0.3
- Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 -->
- Terminal: <!-- e.g. iTerm2, Terminal App -->
Bug Description
When you right click a line of code in the VSCode editor and choose "Fix with Claude Code" it does not make edits to the code.
Steps to Reproduce
- Run
claudein the integrated terminal in VSCode to install the Claude Code plugin - Right click on a line of text in a file in the editor
- Choose "Fix with Claude Code"
Expected Behavior
Choosing "Fix with Claude Code" fixes a diagnostics error or issue with Claude Code.
Actual Behavior
If using a zsh profile terminal: There seems to be a string wrapping issue with the "Fix with Claude Code" action in VSCode. Strings are passed to the terminal with newlines and are being executed as shell code instead of injected as context. Results in errors from zsh like zsh: no such file or directory: file:///index.ts. Then the claude command runs at the end.
Terminal output:
file:///index.ts
Context: index.ts (typescript), line 4:
`import * as vs from 'vscode';`
There are 1 issues in this section:
- Error at line 4: '@codingame/monaco-vscode-extension-api' should be listed in the project's dependencies. Run 'npm i -S @codingame/monaco-vscode-extension-api' to add it
❯ file:///index.ts
❯
❯ Context: index.ts (typescript), line 4:
zsh: no matches found: (typescript),
❯ `import * as vs from 'vscode';`
zsh: command not found: import
❯
❯ There are 1 issues in this section:
zsh: command not found: There
❯ - Error at line 4: '@codingame/monaco-vscode-extension-api' should be listed in the project's dependencies. Run 'npm i -S @codingame/monaco-vscode-extension-api' to add it
quote> claude
quote>
VSCode plugin output channel logs:
2025-06-16 17:31:29.477 [info] Creating new Claude terminal
2025-06-16 17:31:34.032 [info] New WS connection from: /
2025-06-16 17:31:34.032 [info] MCP server connected to transport
2025-06-16 17:31:34.032 [info] [DiagnosticStreamManager] Started streaming diagnostics
2025-06-16 17:31:34.032 [info] [DiagnosticStreamManager] Registered client client_0. Total clients: 1
2025-06-16 17:31:34.032 [info] Registered diagnostic client: client_0
2025-06-16 17:31:34.532 [info] Logging event: quick_fix_command undefined
2025-06-16 17:31:34.532 [info] Logging event: quick_fix_command undefined
2025-06-16 17:31:34.532 [info] Logging event: quick_fix_command undefined
2025-06-16 17:31:34.532 [info] Logging event: quick_fix_command undefined
2025-06-16 17:31:38.268 [info] [DiagnosticStreamManager] Notifying 1 clients about diagnostics change for 1 files
If using a bash profile terminal: The terminal will open and close rapidly, it's too fast for me to catch, I usually just it see it flash on the screen. But then, no edits appear in the editor.
VSCode plugin output channel logs:
2025-06-16 17:29:04.864 [info] Creating new Claude terminal
2025-06-16 17:29:04.993 [info] Terminal shell integration available
2025-06-16 17:29:05.038 [info] Claude terminal closed after executing claude
2025-06-16 17:29:32.219 [info] Enhanced prompt: file:///index.ts
I'm working on a typescript file (index.ts).
Here's the code around line 24 (lines 21-27):
The code has the following issues:
- Error at line 19: Delete `⏎⏎⏎⏎⏎⏎⏎··⏎··`
2025-06-16 17:29:32.219 [info] Creating new Claude terminal
2025-06-16 17:29:32.337 [info] Terminal shell integration available
2025-06-16 17:29:32.366 [info] Claude terminal closed after executing claude
In both cases the code is not being updated.
Additional Context
VSCode
Version: 1.101.0 (Universal)
Commit: dfaf44141ea9deb3b4096f7cd6d24e00c147a4b1
Date: 2025-06-11T15:00:50.123Z
Electron: 35.5.1
ElectronBuildId: 11727614
Chromium: 134.0.6998.205
Node.js: 22.15.1
V8: 13.4.114.21-electron.0
OS: Darwin arm64 24.5.0
Some other info: I use vim in vscode.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗