[Bug] Claude Code ignores subscription tier when $ANTHROPIC_API_KEY is set, requires separate API key variable name for billing

Resolved 💬 6 comments Opened Nov 25, 2025 by sandrop Closed Feb 14, 2026

Bug Description

Conflicts in how claude code manages auth and billing

If you have $ANTHROPIC_API_KEY set either as a global env variable or in a project specific .env file AND you are a logged in Max subscriber, Claude bills the API key for ALL interactions with Claude code

Expected behavior:

  • Only bill API keys for explicit and permitted project runtime calls (eg image or document processing, web research, etc)
  • Everything else should remain Claude code billing with Max.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.0.53

View original on GitHub ↗

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