API Error: 401 {"type":"error","error":{"type":"authenticat...

Resolved 💬 6 comments Opened Jul 10, 2025 by blacklotus1231211 Closed Jul 10, 2025

Bug Description
 API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"Invalid OAuth token. The provided token was not found or is malformed."}}

Environment Info

  • Platform: linux
  • Terminal: xterm-256color
  • Version: 1.0.44
  • Feedback ID: 87f30487-c05d-4994-aef4-a0c16e9c4437

Errors

[{"error":"AbortError: The operation was aborted\n    at abortChildProcess (node:child_process:725:27)\n    at EventTarget.onAbortListener (node:child_process:795:7)\n    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:820:20)\n    at EventTarget.dispatchEvent (node:internal/event_target:755:26)\n    at abortSignal (node:internal/abort_controller:370:10)\n    at AbortController.abort (node:internal/abort_controller:392:5)\n    at Timeout._onTimeout (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:2584:7784)\n    at listOnTimeout (node:internal/timers:581:17)\n    at process.processTimers (node:internal/timers:519:7)","timestamp":"2025-07-10T01:03:19.405Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"Invalid OAuth token. The provided token was not found or is malformed.\"}}\n    at D6.generate (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1304:12612)\n    at gq.makeStatusError (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n    at gq.makeRequest (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:5311)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-07-10T01:05:19.228Z"},{"error":"SyntaxError: Unexpected token 'A', \"API Error:\"... is not valid JSON\n    at JSON.parse (<anonymous>)\n    at file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:618:9971\n    at Q (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:13327)\n    at Lw2 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1337:10306)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-07-10T01:05:19.239Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"Invalid OAuth token. The provided token was not found or is malformed.\"}}\n    at D6.generate (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1304:12612)\n    at gq.makeStatusError (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n    at gq.makeRequest (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:5311)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async fA1.showErrors (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:23214)\n    at async fA1 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:12720)\n    at async aR2 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:23062)\n    at async file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:18138\n    at async Y0A (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:5121)\n    at async Vc (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:18108)","timestamp":"2025-07-10T01:05:19.537Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"Invalid OAuth token. The provided token was not found or is malformed.\"}}\n    at D6.generate (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1304:12612)\n    at gq.makeStatusError (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n    at gq.makeRequest (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:5311)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-07-10T01:06:44.279Z"}]

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗