[BUG] Claude Code - Persistent JSON Parse Error on Windows (versions 2.0.62-2.0.73)
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?
Claude Code fails to start on Windows 11 VS Code with a persistent JSON parse error across all tested versions (2.0.62, 2.0.70, 2.0.73). The extension successfully authenticates via OAuth but crashes immediately when attempting to spawn the Claude process with the error: SyntaxError: Unexpected token 'C', "Claude con"... is not valid JSON
What Should Happen?
After OAuth authentication, Claude Code should successfully start and respond to user prompts without JSON parsing errors.
Error Messages/Logs
Authentication succeeds:
2025-12-18 10:06:43.201 [info] Login successful
2025-12-18 10:06:43.201 [info] OAuth tokens found in secure storage
2025-12-18 10:06:43.201 [info] Auth status: method=claudeai
Error Messages/Logs:
2025-12-18 10:13:07.032 [info] From claude: Spawning Claude Code native binary: c:\Users\dtempe\.vscode\extensions\anthropic.claude-code-2.0.62-win32-x64\resources\native-binary\claude.exe --output-format stream-json --verbose --input-format stream-json --max-thinking-tokens 0 --model default --permission-prompt-tool stdio --mcp-config {"mcpServers":{"claude-vscode":{"type":"sdk","name":"claude-vscode"}}} --setting-sources user,project,local --permission-mode plan --include-partial-messages --debug --debug-to-stderr --enable-auth-status
2025-12-18 10:13:07.972 [info] Closing Claude on channel: nmzlg0ox8n
2025-12-18 10:13:07.972 [error] Error from Claude (on channel nmzlg0ox8n): SyntaxError: Unexpected token 'C', "Claude con"... is not valid JSON
Steps to Reproduce
- Install Claude Code extension in VS Code on Windows 11
- Authenticate via OAuth with Claude.ai account (authentication succeeds)
- Open Claude Code panel and attempt to send any message (e.g., "hello")
- Error appears immediately: SyntaxError: Unexpected token 'C', "Claude con"... is not valid JSON
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
2.0.73
Platform
Other
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
No response
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/12080
- https://github.com/anthropics/claude-code/issues/13035
- https://github.com/anthropics/claude-code/issues/11828
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
FIXED !
This error persisted across: Multiple Claude Code versions (2.0.62, 2.0.70, 2.0.73) Complete uninstall/reinstall cycles Clearing all caches and credentials Different working directories
Root Cause: The %USERPROFILE%.claude.json configuration file was created/updated with a UTF-8 BOM (Byte Order Mark) during the re-authentication process.
Technical explanation: UTF-8 BOM (EF BB BF bytes) at file start prevented claude.exe from parsing JSON claude.exe printed error messages to stdout: "Claude configuration file not found..." or "Config file corrupted..." VS Code extension expects only valid JSON on stdout (via --output-format stream-json) Plaintext error messages contaminated the JSON stream VS Code attempted to parse "Claude con..." as JSON → parse error
Solution: Recreate .claude.json as UTF-8 without BOM containing only {} Restart VS Code after file recreation.
Prevention: This issue may occur when: .claude.json is manually edited with editors that add UTF-8 BOM by default (older Windows Notepad) Authentication process creates the file with incorrect encoding Config corruption during error handling
Recommendation: When manually editing .claude.json, ensure your editor saves as UTF-8 without BOM.
So Claude doesn't respect standards