Despite logging in and logging out repeatedly as well as...

Resolved 💬 1 comment Opened Jul 10, 2025 by JeffBerger Closed Jul 10, 2025

Bug Description
Despite logging in and logging out repeatedly as well as removing and reinstalling claude code I recieve a 401 authentication error that the OAuth token is invalid, The provided token was not found or is malformed. I checked my account and I am still a Max subscriber.

Environment Info

  • Platform: linux
  • Terminal: gnome-terminal
  • Version: 1.0.44
  • Feedback ID: 9d85e670-2c65-4131-8316-566b466e4141

Errors

[{"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:///home/jberger/.nvm/versions/node/v20.11.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1304:12612)\n    at gq.makeStatusError (file:///home/jberger/.nvm/versions/node/v20.11.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n    at gq.makeRequest (file:///home/jberger/.nvm/versions/node/v20.11.1/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-10T00:51:13.430Z"},{"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:///home/jberger/.nvm/versions/node/v20.11.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1304:12612)\n    at gq.makeStatusError (file:///home/jberger/.nvm/versions/node/v20.11.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n    at gq.makeRequest (file:///home/jberger/.nvm/versions/node/v20.11.1/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-10T00:51:27.446Z"},{"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:///home/jberger/.nvm/versions/node/v20.11.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1304:12612)\n    at gq.makeStatusError (file:///home/jberger/.nvm/versions/node/v20.11.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n    at gq.makeRequest (file:///home/jberger/.nvm/versions/node/v20.11.1/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-10T00:51:38.647Z"},{"error":"SyntaxError: Unexpected token 'A', \"API Error:\"... is not valid JSON\n    at JSON.parse (<anonymous>)\n    at file:///home/jberger/.nvm/versions/node/v20.11.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:618:9971\n    at Q (file:///home/jberger/.nvm/versions/node/v20.11.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:13327)\n    at Lw2 (file:///home/jberger/.nvm/versions/node/v20.11.1/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-10T00:51:38.653Z"},{"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:///home/jberger/.nvm/versions/node/v20.11.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1304:12612)\n    at gq.makeStatusError (file:///home/jberger/.nvm/versions/node/v20.11.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n    at gq.makeRequest (file:///home/jberger/.nvm/versions/node/v20.11.1/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-10T00:51:38.695Z"},{"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:///home/jberger/.nvm/versions/node/v20.11.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1304:12612)\n    at gq.makeStatusError (file:///home/jberger/.nvm/versions/node/v20.11.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n    at gq.makeRequest (file:///home/jberger/.nvm/versions/node/v20.11.1/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:///home/jberger/.nvm/versions/node/v20.11.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:23214)\n    at async fA1 (file:///home/jberger/.nvm/versions/node/v20.11.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:12720)\n    at async aR2 (file:///home/jberger/.nvm/versions/node/v20.11.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:23062)\n    at async file:///h

Note: Error logs were truncated.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗