claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Bug][BLOCKER] Anthropic API Error: Invalid OAuth token authentication failure

Open theReallyRealDusty opened this issue 1 month ago • 1 comments

Bug Description I keep getting "API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"Invalid OAuth token. The provided token was not found or is malformed."},"request_id":"req_011CVQuYJVPnBVuNiZ8apzdk"} · Please run /login "

/login works but it doesn't actually solve the problem. I can just continue and it will run for a bit and then stop with this error again. This is a 100% blocker since it interrupts all sessions.

Environment Info

  • Platform: darwin
  • Terminal: rider
  • Version: 2.0.50
  • Feedback ID: 33d1f740-535f-4475-9528-e57502ff4e93

Errors

[{"error":"AxiosError: Request failed with status code 401\n    at zj (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:24:1137)\n    at IncomingMessage.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:29:9828)\n    at IncomingMessage.emit (node:events:519:35)\n    at IncomingMessage.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1701:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n    at _FA.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:31:2130)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async QM3 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3375:2192)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3375:2742","timestamp":"2025-11-23T13:26:40.723Z"},{"error":"AxiosError: Request failed with status code 401\n    at zj (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:24:1137)\n    at IncomingMessage.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:29:9828)\n    at IncomingMessage.emit (node:events:519:35)\n    at IncomingMessage.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1701:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n    at _FA.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:31:2130)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async XR2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2081:5282)","timestamp":"2025-11-23T13:26:40.949Z"},{"error":"AxiosError: Request failed with status code 401\n    at zj (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:24:1137)\n    at IncomingMessage.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:29:9828)\n    at IncomingMessage.emit (node:events:519:35)\n    at IncomingMessage.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1701:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n    at _FA.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:31:2130)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async QM3 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3375:2192)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3375:2742","timestamp":"2025-11-23T13:26:41.208Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"Invalid OAuth token. The provided token was not found or is malformed.\"},\"request_id\":\"req_011CVQu8hogUTCnagmyMcGc8\"}\n    at H9.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:397:36468)\n    at WT.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1309:2195)\n    at WT.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1309:5419)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async j41.model (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3838:14446)\n    at async j41 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2081:1872)\n    at async oW9 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3838:14598)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3838:7704\n    at async us1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1468:1971)\n    at async pk (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3838:7675)","timestamp":"2025-11-23T13:28:08.131Z"},{"error":"SyntaxError: Expected property name or '}' in JSON at position 1 (line 1 column 2)\n    at JSON.parse (<anonymous>)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:74:696\n    at B (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:6527)\n    at KA2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1469:2252)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-11-23T13:28:08.133Z"},{"error":"Error: 401 {\"type\":\"err

Note: Error logs were truncated.

theReallyRealDusty avatar Nov 23 '25 13:11 theReallyRealDusty