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_KEY set via direnv or .claude/settings.local.json in work directories only
  • Both auth methods coexist intentionally, not by accident

Proposed solutions (any of these would work)

  1. A setting like "suppressAuthConflictWarning": true in project or user settings
  2. Per-project auth profiles, so a directory can declare which auth method to use without conflict
  3. 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.

View original on GitHub ↗

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