[BUG] print mode (-p) doesn't seem to be using my claude max subscription, instead pulling an API key from the environment

Resolved 💬 7 comments Opened Jul 6, 2025 by djsavvy Closed Jan 24, 2026

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.43 (Claude Code)
  • Operating System: macos 15.3.1
  • Terminal: ghostty

Bug Description

Running a command like: claude -p --output-format stream-json --verbose "hello there" is deducting from my API key despite me being logged into my claude max subscription locally. This should instead authorize via my claude max subscription (which I'm already logged into), instead of pulling from the ambient ANTHROPIC_API_KEY variable.

View original on GitHub ↗

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