Invalid API key · Please run /login/lo

Resolved 💬 3 comments Opened Oct 9, 2025 by HCarbajales Closed Oct 13, 2025

Bug Description
When I use VSCode claude code extenstion - it keeps asking generatng Invalid API key - Please run/login message. It started ever since a recent update. The only way to use Claude Code is through terminal.

Environment Info

  • Platform: win32
  • Terminal: vscode
  • Version: 2.0.10
  • 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 file:///C:/Users/Elmo/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:885:3212","timestamp":"2025-10-09T15:51:54.561Z"},{"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:///C:/Users/Elmo/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:885:3212\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-10-09T15:54:31.061Z"}]

View original on GitHub ↗

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