SyntaxError: Unexpected token
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 1–100
Ranked by community engagement (reactions weighted over comments). Listing the top 300 of 698 matches; the statistics above cover all 698.
- API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation. - [Bug] Anthropic API Error: Unexpected 400 Bad Request Response
- [Bug] Anthropic API Error: Tool Use Concurrency Limitation
- API Error: 401 {"type":"error","error":{"type":"authenticati...
- [Bug] Error: No Assistant Message Found
- [BUG] Terminal Paste Corruption from Bracketed Paste Mode
- [Bug] Anthropic API: Credit consumption rate increased 3-5x after January 1st
- API Error: 401 {"type":"error","error":{"type":"authenticati...
- [BUG] Cowork Edit/Write tools silently truncate files via byte-conservation buffer cap (deterministic, fires at all file sizes)
- [BUG] awsAuthRefresh is not working properly after upgrade to claude code 2.0
- [BUG] SyntaxError: Unexpected token 'S', "[SandboxDeb"... is not valid JSON Troubleshooting resources
- I keep getting 401 errors about Oauth authentication after...
- [Bug] Auto-update fails with npm ENOTEMPTY rename error
- [BUG] Claude Code Configuration File Corruption
- API Error: 401 {"type":"error","error":{"type":"authenticati...
- [BUG] Shell script occasionally fails due to crazy escaping
- API Error: 401 {"type":"error","error":{"type":"authenticati...
- [BUG] Claude Code CLI JSON Response Truncation Issue
- Custom Subagents Cannot Access Project-Scoped MCP Servers (Hallucinate Instead)
- [Bug] Anthropic API Error: Internal Server Error (500)
- [BUG] Unable to Start Claude - Started 2 hour ago. On going sessions still work fine
- [Bug] Unexpected Model Switching Between Terminal Sessions
- API Error (503 upstream connect error or disconnect/reset...
- claude code corrupts ~/.claude.json on mac while running 5 concurrent sessions
- Requests are failing. API Error: 500...
- API Error (Internet connection is unreliable)
- Anthropic API 500 Internal Server Error During Request
- ⎿ API Error: 500 {"type":"error","error":{"type":"api_err...
- [Feature Request] Add automatic cost reporting on session exit
- [Bug] Anthropic API Error: Internal Server Error (500)
- [FEATURE] Per-Subagent Token Usage Tracking
- [Bug] Anthropic API Error: Internal Server Error (500)
- [BUG] MCP server with SSE/HTTP transport fails with OAuth discovery error — no way to disable OAuth
- [BUG] Native Windows binary fails on every prompt — EEXIST in OAuth token path
- [BUG] input_schema does not support oneOf, allOf, or anyOf at the top level
- API Error: 401
- [BUG] - Fails to read memories (claude.md) unless explicitly added to every prompt
- [BUG] Unexpected token usage spike and continued consumption while Claude Code is inactive
- Requests failing: API Error: 500...
- Claude Code MAX — Web Fetch returns 401 API Error: “OAuth authentication is currently not supported.”
- [BUG] Complex bash syntax fails with preprocessing (reproducible, workaround exists but inconsistent)
- ⎿ API Error: 500 {"type":"error","error":{"type":"api_error...
- [Bug] Anthropic API Error: Internal Server Error (500)
- 500 error with all actions
- [Bug] Opt+T keyboard shortcut conflicts with Turkish keyboard layout (₺ symbol)
- [BUG] Claude won't start "SandboxDEB is not valid JSON" error
- relogin many time but : "API Error: 401...
- You've hit your limit · resets 8pm (Europe/Berlin)
- Workflow tool triggers on any message mentioning "workflow" — trigger is too broad
- Constantly receiving API ERROR 503
- Invalid API key · Please run /login
- Context Memory Loss After Auto Compact Summary
- Unexpected Execution Halt During Code Generation Process
- Web Search and Fetch Tools Returning No Results Unexpectedly
- [BILLING] Medium effort default (effort=85) causing excessive token burn and unexpected extra usage costs
- api Errors: 500
- Claude Code: Regression in Code Generation and Task Execution Capabilities
- OAuth token revoked · Please run /login
- [Bug] Degraded code generation quality and increased correction rate
- [Bug] Input cancelled when pressing N key
- [Bug] Code Quality Regression: Reduced Instruction Adherence in 2.1.x
- Login worked, but it’s still returning a 401 error:
- [Bug] Anthropic API Error: HTTP 500 Internal Server Error
- [Bug] Complete system freeze when running 2+ GoLand IDE instances with Claude Code
- API Error: 500 ...
- 401 error oauth not supported
- ⎿ API Error: Unable to connect to API...
- [BUG] Bash tool corrupts commands with multi-line + pipe, and $() in pipes
- [Bug] CLI output formatting broken - unreadable text rendering
- [Bug] Anthropic API Error: chatParticipant must be declared in package.json
- [Bug] Unclear Time Limit Warning with Insufficient Reset Information
- Invalid API key · Please run /login
- API Error: 401 {"type":"error","error":{"type":"authenticat...
- Not running: SyntaxError: Unexpected token '='
- : Getting API Error: 500, I am completly dead in the water
- Feature Request: Enhance `/doctor` to show specific JSON parsing errors in settings files
- Internal Server Error in API Response
- I am getting a 401 error with the message Invalid OAuth token.
- OAuth Callback Failure: Localhost Port Unreachable on Safari
- Credit balance is too low
- SyntaxError: Unexpected token '=' on running claude
- [BUG] Claude Code sends repeated requests hundreds of times without stopping
- Shell snapshot generates empty if-body causing bash syntax error on every command
- [Bug] Plan mode modifies files despite planning mode being enabled
- Hi Team,
- [Bug] /context command non-functional or displays incorrectly
- [Feature Request] Option+Backspace should delete whole word
- API Error: Connection error.
- Claude Code is using massive amounts of memory and heating up my computer.
- Constant flickering.
- Unreadable Text Color in Light Theme for /cost and /model Commands
- Asana MCP Integration: 400 error, Property keys should match pattern.
- [BUG] Cowork: skill upload truncates files >99 KB and leaves null-byte tail on re-upload
- MCP OAuth SDK sends empty User-Agent, causing 403 from WAF/Cloudflare-protected servers
- [BUG] HTTP MCP server without auth triggers OAuth probe in VS Code extension, fails with 404
- headersHelper silently ignored since v2.1.85 — Claude Code skips to OAuth discovery instead
- [Bug] Excessive token consumption and slow performance
- [Bug] Compact command fails with "Conversation too long" error
- [Bug] Skill autocomplete not displaying user skills when typing slash command
- [Bug] Slash Commands Fail to Execute Properly
- i receved this erro: ⎿ API Error: 401...