SyntaxError: Unexpected token — page 2
A parse failed, most often on config or a truncated JSON response.
698 issues · 30 open · 668 resolved (96%) · first seen Feb 25, 2025
First response · local
What to do now
Most likely: The local Claude Code process crashed while parsing or executing.
- Record the Claude Code version and the first stack frame before restarting.
- Try a fresh session with the same minimal input to distinguish corrupted state from a repeatable crash.
- Preserve logs and compare reports from the same version before downgrading.
These are conservative triage steps, not an official Anthropic fix. Use the issue and workaround evidence below before making a destructive configuration change.
Is this getting better or worse?
This class of problem is converging. 43 new reports in the last 90 days vs 162 in the 90 before — -73%. The open backlog peaked at 129 in 2025-12 and sits at 30 today.
Derived by counting each matching issue from its creation date until it closed. First-party
computation over the anthropics/claude-code tracker — the trend is not published
anywhere upstream.
Which builds report this
301 of these reports name the Claude Code build they were running, spanning 102 releases. Heaviest reporters:
- Claude Code v2.0.76
- Claude Code v2.1.31
- Claude Code v2.1.20
- Claude Code v2.1.104
- Claude Code v2.1.29
- Claude Code v2.1.7
- Claude Code v2.1.119
- Claude Code v2.1.107
Report volume, not a defect count: an issue can mention a build without that build having caused the failure. Versions come from the version string in the bug-report template, matched against real published tags.
Do these get fixed?
Median time to close is 4 days across 668 closures. Of the 668 closures with a recorded reason, 19% were closed as completed and 541 as not-planned or duplicate. The most recent completed fix landed in 2026-08.
Workarounds reported by the community
69 of these issues post a workaround someone says worked. The highest-engagement ones:
- API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation. - [Bug] Anthropic API Error: Unexpected 400 Bad Request Response
- …67 (my report) 8887 8893 8894 8895 8897 8903 EDIT (Oct 14): Workaround for tool use/tool result 400 errors: A research-backed solution was posted on Oct 10: Add the provided instructions to your global CLAUDE.md (~/.clau…
Found in the thread of #8763 · resolved - [Bug] Anthropic API Error: Tool Use Concurrency Limitation
- I tried many workaround without success. In my case, it was a specific PDF file causing the issue. Once unreferenced, it works.
Found in the thread of #9002 · resolved - [BUG] Terminal Paste Corruption from Bracketed Paste Mode
- …Copy/paste any text Expected vs Actual Expected : Actual : Workarounds - - - Restart terminal Technical Details Claude Code leaves terminal in corrupted bracketed paste mode. The / characters are escape sequences ( / )…
Found in the description of #3134 · resolved - [BUG] Cowork Edit/Write tools silently truncate files via byte-conservation buffer cap (deterministic, fires at all file sizes)
- …ull correct content while the file on disk was corrupt. The workaround holds. Every reporter who moved all writes to bash reports zero further loss. No counterexamples in the thread. What is not settled: the mechanism Th…
Found in the description of #53940 · still open - [BUG] awsAuthRefresh is not working properly after upgrade to claude code 2.0
- …ms to want that to be json, which it isn't. I've tried some work arounds, like "aws sso login --profile profile-name --output json" or "aws sso login --profile pofile-name 1 /dev/null". The first one does nothing, the se…
Found in the thread of #8447 · resolved
Excerpts are quoted from the linked issue so you can judge relevance before opening it. Threads that only ask for a workaround, or report that there is none, are excluded. These are community suggestions, not official guidance from Anthropic — read the full thread before applying one.
Matching issues 101–200
Ranked by community engagement (reactions weighted over comments). Listing the top 300 of 698 matches; the statistics above cover all 698.
- Terminal Image Paste Causes Session Interruption and Error
- API Request Failure After Recent Update
- [BUG] Claude.ai and mcp-remote ignore `registration_endpoint` from OAuth discovery document, calling hardcoded `/register` instead of `/oauth/register`
- Shell snapshot generates invalid bash: empty if/then/fi when rg is already installed
- [FEATURE] /curly option: context-aware curly/straight character handling in Write/Edit
- [Bug] Anthropic API Error: Internal server error (500)
- [Bug] Incomplete text output with excessive spacing in Claude Code CLI display
- [BUG] Setting DISABLE_PROMPT_CACHING Environment Variable Causes 401 Unauthorized Errors
- [BUG] Shell snapshot injection persists in native Windows installation v1.0.107
- Context Persistence Broken: Ctrl+R Fails to Fully Restore Previous Interaction State
- Bug Report
- session usage jumped 30% per prompt in less then 1 minute of entering the prompt
- [Bug] virtiofs mount serves truncated file contents to sandboxed environment while host files are clean
- generalized error 500 API Error: 500...
- [BUG] Skill tool fails with 'Invalid regular expression: unmatched parentheses' in getPromptForCommand
- [BUG] Unsupported (?) model in agent config silently fails instead of erroring
- API Error: 500 {"type":"error","error":{"type":"api_error","...
- nothing is working: API Error: 500...
- [BUG] Official Greptile plugin fails with "Cannot POST /register" error
- You've hit your limit · resets 6pm (Asia/Bangkok)
- [Bug] /context output flashes too quickly, content unreadable
- API Error: Connection error.
- Output is coming line by line instead of sentence
- [BUG] /clear command automatically switches model to Opus
- [Bug] Sonnet 4.5: Decreased Code Generation Quality and Completeness
- [Bug] Anthropic API: Unexpected Usage Depletion on MAX20 Plan
- [Bug] Violation of User Instructions and Project Boundaries
- [BUG] `AbortError` is defined in TypeScript definitions but not exported at runtime in SDK
- [Bug] Authentication Failure: API Key Not Persisting After Login
- [Bug] Token Generation Progress Indicator Missing
- Async Sub-Agent Delegation Breaks Context Tracking
- String Replacement Failure in Claude Code CLI
- [BUG] claude plugin list --json --available truncates stdout at 65536 bytes when piped (process.exit before pipe drains)
- [BUG] Auto mode missing from VS Code extension picker on Linux despite canEnterAuto=true (works in terminal CLI and Windows extension)
- [BUG] Windows: model is told Shell=PowerShell while hooks execute under bash — cross-shell foot-gun for hook authors
- ...
- [BUG] VS Code "Manage Plugins" shows "No plugins available" after adding second marketplace (e.g. anthropic-agent-skills)
- [Bug] Unexpected token usage depletion exceeding expected limit
- API Error: Connection error.
- If I reach the limit can't send bugreport
- Constant flickering.
- Are you able to read that directory for the menu items?
- [Bug] Anthropic API Error: Missing Tool Result Block
- [Bug] Stop Hook Provides Stale Transcript Path
- [Bug] Sonnet 4 model degradation: Generating Python Scripts with Syntax Errors
- [Bug] Unhandled Exception Causing Full Application Crash
- api error: 401{"type" ; "error": {"type":...
- Bug Report
- [BUG] Partial output when using the non-interactive mode
- oauth error occurs
- Invalid Tool Parameters in Write Operation
- [Bug] Unexpected token consumption without user interaction or API calls
- [BUG] mcp headersHelper not re-invoked when access token expires on long-lived HTTP transport
- You've hit your limit · resets 8pm (Asia/Seoul)
- Bash tool: shell-quote mangles { }, heredoc markers, and $ in piped commands
- Faster rate-limit 2.0.x
- [Bug] Compaction fails with multiple sub-agents
- [Bug] High CPU usage when opening menu list with "/"
- [Bug] Anthropic API Error: Cannot modify thinking blocks in assistant messages
- [BUG] SyntaxError: Unexpected token 'C', "Claude con"... is not valid JSON Troubleshooting resources
- [Bug] Anthropic API Error: Internal Server Error (500)
- [Bug] Plan mode doesn't auto-switch between Sonnet 4.5 and Haiku 4.5
- Claude code losing conversations - conversation GONE after exit and relaunch!
- 503 upstream connect error or disconnect/reset before...
- [BUG] Can not install and run claude in WSL
- I have executed "/login" and it prompts "Login successful",...
- Sometimes it will refuse to connect to VSCode
- Bug Report
- API Error: 401 {"type":"error","error":{"type":"authenticati...
- Configurable Build Script Timeout and Clearer Timeout Message
- [BUG] headersHelper not re-run on mid-session 401 (2.1.197): client falls into OAuth /register fallback and stays wedged until manual /mcp reconnect
- [BUG] Claude Code CLI Harness Shell Snapshot overriding attempted fixes in bashrc to solve the inability for Claude to run shall commands in WSL2
- [BUG] Bash calls fail when Windows PATH environment variable contains parentheses
- You've hit your limit · resets 11am (America/Los_Angeles) .... in 30 seconds with 5 one liner prompts
- when i say to claude code tu use a plugin y have this error...
- ⎿ API Error: 500 {"type":"error","error":{"type":"api_err...
- API Error: 500 {"type":"error","error":{"type":"api_error","...
- [BUG] HTTP/SSE MCP transport fails for non-OAuth servers (e.g., Jenkins) — OAuth discovery is mandatory and breaks Basic auth
- MCP OAuth credentials repeatedly lost: discoveryState bloats keychain entry causing JSON truncation and parse failure on restart
- Code blocks in terminal output add leading spaces that break Python copy/paste
- [BUG] SyntaxError: Too many arguments (65535 limit) on restart after session crash - Node.js v22.22.0
- API Error: 500 {"type":"error","error":{"type":"api_error","...
- 70% util on web dashboard, hitting limits only in claude code
- Not a single command work anymore
- [Bug] Plugin menu closes when pressing 'n' key, blocking searches starting with 'n'
- You've hit your limit · resets Jan 29 at 8pm (America/New_York)
- [Feature Request] Add keyboard shortcut to copy last message output to clipboard
- [Bug] Chrome profile selection inconsistent and fails to detect open instances
- Premature Context Loss in 200k Token Window (at 85% Usage)
- [Bug] Chrome extension fails to launch browser tab on macOS
- [Bug] Anthropic API Error: 500 Internal Server Error during multiple planning iterations followed by error in compaction
- [Bug] Claude Code process hangs or processes extremely slowly
- [BUG] Agent SDK crashes with "Unterminated string in JSON" when tool output contains U+2028/U+2029 characters
- [Bug] Auto-response sends message when only image is submitted without text
- [BUG] Claude Code - Persistent JSON Parse Error on Windows (versions 2.0.62-2.0.73)
- [Bug] Context tracking not updated after compression/compact commands
- [Bug] Compact issue persists after reboot on fresh session
- [Bug] Anthropic API Error: Internal server error (500) FAILING AGAIN!!!!!!!!!!!!!
- UI get this after trying to login to my Claude PRO account...
- [Bug] Anthropic API Error: Internal server error (500) with session blocking