PSA: an API key in .env silently switches Claude Code to API billing
The brief
A user lost $187 because Claude Code read ANTHROPIC_API_KEY from a project .env meant for another server and silently billed the API instead of the subscription.
Key points
- Anthropic confirmed this is intentional behavior.
Sources
- r/ClaudeAIreddit.com