Persistent JSON syntax error in Claude Code for VS Code extension
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?
Hello,
I'm experiencing a persistent error with the Claude Code for VS Code extension. After installation and login, I consistently receive this error message:
"SyntaxError: Unexpected token 'C', "Claude con"... is not valid JSON"
What I've tried:
- Uninstalled and reinstalled the extension multiple times
- Deleted all settings files (.claude folder, VSCode settings)
- Completely uninstalled and reinstalled VS Code
- Rebooted the computer
- Cleared all VSCode cache and configuration files
- Removed conflicting extensions
System Information:
- OS: Windows
- VS Code Version: Latest (freshly installed)
- Claude Code Extension Version: Latest
- Subscription: Claude Pro (paid, active)
- Internet connection: Stable (tested with ping to anthropic.com)
Developer Console Error:
The VS Code developer console shows:Error: ENOENT: no such file or directory, scandir 'C:\Users\4\.claude\projects\C--Users-4'
The error appears immediately after logging in, every time. The extension seems to be creating a corrupted configuration file or malfor
What Should Happen?
Subject:
Persistent JSON syntax error in Claude Code for VS Code extension
Description:
Hello,
I'm experiencing a persistent error with the Claude Code for VS Code extension. After installation and login, I consistently receive this error message:
"SyntaxError: Unexpected token 'C', "Claude con"... is not valid JSON"
What I've tried:
Uninstalled and reinstalled the extension multiple times
Deleted all settings files (.claude folder, VSCode settings)
Completely uninstalled and reinstalled VS Code
Rebooted the computer
Cleared all VSCode cache and configuration files
Removed conflicting extensions
System Information:
OS: Windows
VS Code Version: Latest (freshly installed)
Claude Code Extension Version: Latest
Subscription: Claude Pro (paid, active)
Internet connection: Stable (tested with ping to anthropic.com)
Developer Console Error:
The VS Code developer console shows:
Error: ENOENT: no such file or directory, scandir 'C:\Users\4\.claude\projects\C--Users-4'
The error appears immediately after logging in, every time. The extension seems to be creating a corrupted configuration file or malformed project path.
Could you please help resolve this issue?
Thank you!
Error Messages/Logs
SyntaxError: Unexpected token 'C', "Claude con"... is not valid JSON
Troubleshooting resources
Steps to Reproduce
- Install Claude Code for VS Code extension
- Open VS Code
- Attempt to log in with Claude.ai subscription
- Error appears immediately after login
- Error persists after reinstalling VSCode, clearing all settings, and rebooting
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
Latest
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
<img width="1277" height="799" alt="Image" src="https://github.com/user-attachments/assets/cfc1f50f-9c07-4c80-9b67-57eb91a39d06" />
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗