I'm trying to use the Claude Code extension, but it fails to initialize.
Environment:
- Extension: 2.0.13
- VS Code: 1.105.0
- OS: Windows 11 (Windows_NT x64 10.0.26100)
Problem:
Immediately after installation, the extension's side panel shows a persistent error: SyntaxError: Unexpected token 'C', "Claude con"... is not valid JSON. This error blocks all functionality. It seems the extension is trying to parse a non-JSON file that starts with "Claude con...".
I expected the extension to load normally after installation. Instead, I got the SyntaxError.
To fix this, I have tried exhaustively:
- Complete Reinstallation: Uninstalled the extension and manually deleted all related folders in
%USERPROFILE%\.vscode\extensionsand%APPDATA%\Code\User\globalStorage. - Manual
mcp.jsonCreation: Created a validmcp.jsonwith a correct PAT using a plain text editor to rule out script/encoding issues. - Configuration Checks: Confirmed the workspace is "Trusted" and the user
settings.jsonis empty. The error still occurs even with no folder open. - Full VS Code Profile Reset: Renamed the entire
%APPDATA%\Codefolder to launch VS Code in a factory-fresh state. I installed only the Claude Code extension, but the same error occurred immediately.
None of these steps solved the problem. I now suspect the cause is an external factor (a bug specific to my environment or a network issue) rather than a local configuration error.
