Invalid API key · Please run /login

Resolved 💬 3 comments Opened Aug 31, 2025 by isintheskyj Closed Sep 3, 2025

Bug Description
Missing API key · Run /login

Environment Info

  • Platform: darwin
  • Terminal: cursor
  • Version: 1.0.98
  • Feedback ID:

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 CP.validateHeaders (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:979:930)\n    at CP.buildHeaders (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:979:8426)\n    at async CP.buildRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:979:7484)\n    at async CP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:979:3323)\n    at async vP (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1748:344)\n    at async GSB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2445:6839)\n    at async Promise.all (index 0)\n    at async tN0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2445:7613)\n    at async UV5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2446:6120)\n    at async Promise.all (index 2)","timestamp":"2025-08-31T01:24:38.118Z"},{"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 CP.validateHeaders (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:979:930)\n    at CP.buildHeaders (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:979:8426)\n    at async CP.buildRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:979:7484)\n    at async CP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:979:3323)\n    at async vP (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1748:344)\n    at async GSB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2445:6839)\n    at async Promise.all (index 1)\n    at async tN0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2445:7613)\n    at async UV5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2446:6120)\n    at async Promise.all (index 2)","timestamp":"2025-08-31T01:24:38.124Z"},{"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:970:6454\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-08-31T01:25:40.959Z"}]

View original on GitHub ↗

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