Support per-project auth profiles or allow suppressing auth conflict warning
Resolved 💬 2 comments Opened Apr 1, 2026 by skhattane Closed May 8, 2026
Problem
When using Claude Code with both a claude.ai subscription (Max plan) and an ANTHROPIC_API_KEY for enterprise billing, this warning shows on every launch:
⚠ Auth conflict: Both a token (claude.ai) and an API key (ANTHROPIC_API_KEY) are set.
This is a common setup for people who use their personal subscription for side projects and their company API key for work. The warning is purely cosmetic since the API key correctly takes precedence, but it cannot be suppressed.
Use case
- Logged in with personal Max plan (default for all directories)
ANTHROPIC_API_KEYset via direnv or.claude/settings.local.jsonin work directories only- Both auth methods coexist intentionally, not by accident
Proposed solutions (any of these would work)
- A setting like
"suppressAuthConflictWarning": truein project or user settings - Per-project auth profiles, so a directory can declare which auth method to use without conflict
- A flag on the env var approach to signal intent, e.g.
CLAUDE_AUTH_PREFER=api_key
Current workaround
Ignore the warning. Everything works fine, the API key takes precedence as expected.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗