[Bug] Authentication Failure: API Key Not Persisting After Login

Resolved 💬 3 comments Opened Aug 28, 2025 by doriancuentas Closed Sep 1, 2025

Bug Description
Claude keeps complaining about missing API key after /login

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 1.0.96
  • Feedback ID: e96e4a35-75b0-42bd-a5cd-a35e2065777f

Errors

[{"error":"Error: Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the \"X-Api-Key\" or \"Authorization\" headers to be explicitly omitted\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:934:6454","timestamp":"2025-08-28T21:34:17.651Z"},{"error":"SyntaxError: Unexpected token 'I', \"I apologiz\"... is not valid JSON\n    at JSON.parse (<anonymous>)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:9932\n    at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:671:13288)\n    at Ir2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1058:1990)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-08-28T21:35:55.884Z"}]

View original on GitHub ↗

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