[BUG] Persistent "Invalid API key" despite all troubleshooting on Windows 10/11

Resolved 💬 3 comments Opened Jan 25, 2026 by crudo0-arch Closed Jan 29, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Hello,
I am experiencing a persistent issue with the "Claude Code" extension on Windows. The extension consistently displays "Invalid API key" or fails to load correctly after authentication, despite trying every available troubleshooting step.
I have performed a full clean install multiple times.

Steps Taken (Troubleshooting Performed):

Attempted /login via the chat interface (failed with "Invalid API key").
Manually deleted the %USERPROFILE%\.claude\ folder.
Set the ANTHROPIC_API_KEY system environment variable and rebooted the PC (verified via CMD echo command).
Uninstalled and reinstalled the extension completely.
Downgraded the extension to older 1.x.x versions (issue persists).
Disabled Windows Firewall temporarily (issue persists).
Ran VS Code in --disable-extensions mode (issue persists).
Checked for conflicts with Copilot (issue persists).

What Should Happen?

I should log in and use it

Error Messages/Logs

Error Logs from Developer Console:
Here are the critical errors observed in the VS Code Developer Tools Console (Help -> Toggle Developer Tools):

Error: ENOENT: no such file or directory, scandir 'C:\Users\Alberto\.claude\projects\C--Users-Alberto'
log.ts:460   ERR chatParticipant must be declared in package.json: claude-code
log.ts:460   ERR Failed to fetch MCP registry providers Server returned 404
webviewElement.ts:409 Unrecognized feature: 'local-network-access'.
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('<URL>') does not match the recipient window's origin ('null').

Steps to Reproduce

Just try to use the extension...

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.19

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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