[BUG] Claude CLI and Claude VSCode extension require login even after ANTHROPIC_API_KEY environment variable is set
Status Open
Reported on v2.1.234
Maintainer reply None cached
Activity 2 comments · opened Aug 25, 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?
I have the Anthropic API key environment variable set, but ever since I updated Claude code to version 2.1.243, Claude Code won't work when I send in a prompt and instead will immediately tell me to login. I have already restarted my machine, deleted and reset the environment variable but the issue persists
What Should Happen?
Given that an API key is set I shouldn't be required to login, instead being able to simply use claude code
Error Messages/Logs
Steps to Reproduce
- Have a working API key set in a windows environment variable
- Try to send a prompt to the latest version of claude code
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.234
Claude Code Version
2.1.245 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗