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

Invalid API Key Authentication Failure

Open JordanCoin opened this issue 1 year ago • 3 comments

Bug Description I was using claude on my max plan and i got a random prompt letting me know I've spent $5 on api key costs? then I quit out of claude and saw this: ⎿ Invalid API key · Please run /login

Total cost: $69.70 Total duration (API): 4h 3m 26.9s Total duration (wall): 7h 46m 44.4s Total code changes: 3538 lines added, 468 lines removed Usage by model: claude-3-5-haiku: 1.6m input, 48.3k output, 0 cache read, 0 cache write claude-opus: 575 input, 51.4k output, 2.2m cache read, 1.3m cache write, 15 web search claude-sonnet: 3.4k input, 204.6k output, 56.2m cache read, 4.7m cache write

Environment Info

  • Platform: darwin
  • Terminal: cursor
  • Version: 1.0.43
  • Feedback ID: b9518d83-f504-47fb-a214-5514380c68a4

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:984:15)\n    at wrappedFn (node:internal/errors:538:14)\n    at checkExecSyncError (node:child_process:891:11)\n    at execSync (node:child_process:963:15)\n    at ED (file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:702:3921)\n    at file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:9038\n    at Q (file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:13327)\n    at hJ (file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:8184)\n    at S_ (file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:7265)\n    at NB (file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:11432)","timestamp":"2025-07-06T01:26:47.787Z"},{"error":"Error: Command failed: security delete-generic-password -a $USER -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:984:15)\n    at wrappedFn (node:internal/errors:538:14)\n    at checkExecSyncError (node:child_process:891:11)\n    at execSync (node:child_process:963:15)\n    at ED (file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:702:3921)\n    at OpA (file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:10150)\n    at RpA (file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:10024)\n    at y9A (file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2171:2567)\n    at x9A.startOAuthFlow (file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2171:3689)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-07-06T01:27:07.163Z"},{"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:984:15)\n    at wrappedFn (node:internal/errors:538:14)\n    at checkExecSyncError (node:child_process:891:11)\n    at execSync (node:child_process:963:15)\n    at ED (file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:702:3921)\n    at file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:9038\n    at Q (file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:13327)\n    at hJ (file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:8184)\n    at S_ (file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:7265)\n    at NB (file:///Users/jordanjackson/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:11432)","timestamp":"2025-07-06T01:27:07.350Z"}]

JordanCoin avatar Jul 06 '25 01:07 JordanCoin

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Oct 10 '25 10:10 github-actions[bot]

Closing as this issue may be stale. Please re-open if this is still occurring.

catherinewu avatar Nov 30 '25 04:11 catherinewu

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Dec 09 '25 14:12 github-actions[bot]