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

Resolved 💬 1 comment Opened Jul 10, 2025 by williamC888 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: darwin
  • Terminal: Apple_Terminal
  • Version: 1.0.44
  • Feedback ID: 1e5bba03-4988-4a51-b0a9-5ee5a90a2ebc

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:882:11)\n    at execSync (node:child_process:954:15)\n    at wD (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:702:3921)\n    at file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:9350\n    at Q (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:13327)\n    at uC (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:8496)\n    at hC (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:7361)\n    at wB (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:11970)","timestamp":"2025-07-10T00:58:12.416Z"},{"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:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1304:12612)\n    at gq.makeStatusError (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n    at gq.makeRequest (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1321:5311)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-10T00:58:12.856Z"},{"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:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1304:12612)\n    at gq.makeStatusError (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n    at gq.makeRequest (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1321:5311)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-10T00:58:16.067Z"},{"error":"SyntaxError: Unexpected token 'A', \"API Error:\"... is not valid JSON\n    at JSON.parse (<anonymous>)\n    at file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:618:9971\n    at Q (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:13327)\n    at Lw2 (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1337:10306)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-10T00:58:16.068Z"},{"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:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1304:12612)\n    at gq.makeStatusError (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n    at gq.makeRequest (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1321:5311)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async fA1.showErrors (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1690:23214)\n    at async fA1 (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1690:12720)\n    at async aR2 (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1690:23062)\n    at async file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1690:18138\n    at async Y0A (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1690:5121)\n    at async Vc (file:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1690:18108)","timestamp":"2025-07-10T00:58:16.303Z"},{"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:///Users/angry-mac/.claude/local/node_modules/@anthropic-ai/claude-c

Note: Error logs were truncated.

View original on GitHub ↗

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