claude -p suggested to Max subscriber — caused unintended API billing ($1,800+ in two days)

Resolved 💬 11 comments Opened Mar 23, 2026 by thecatfix Closed May 14, 2026

Summary

I am a Claude Max subscriber (20x plan) at $200/month. When I asked the built-in claude-code-guide agent how to schedule Claude Code runs to take advantage of the March 2026 2x usage promotion, it recommended claude -p with an ANTHROPIC_API_KEY. This was the wrong advice for a Max subscriber and resulted in $1,800+ in API charges in two days (Mar 20–21, 2026) billed to a separate Anthropic API account.

What happened

  1. Asked Claude Desktop (Cowork/local agent) how to run Claude Code automatically during off-peak hours to maximize the 2x promo
  2. The claude-code-guide subagent recommended claude -p "your prompt" with cron/scheduled tasks
  3. I built phase scripts using claude -p --dangerously-skip-permissions and scheduled them
  4. Those runs inherited ANTHROPIC_API_KEY from my shell environment, pointing to a separate Anthropic API account (CatFix Technology)
  5. The scripts ran Opus 4.6 in agentic loops — ~47k input tokens per request, dozens of requests per hour
  6. Result: ~$960 on Mar 21, ~$858 on Mar 20 in API credit consumption

Root cause

claude -p bypasses OAuth and requires ANTHROPIC_API_KEY — meaning it always bills to the API account, never to a Max subscription. The claude-code-guide agent had no guardrail to detect that the user was a Max subscriber and should NOT be directed to API key workflows.

The correct answer for a Max subscriber wanting scheduled/headless runs is:

  • Use Claude Desktop built-in scheduled tasks (runs under subscription)
  • Use /loop skill
  • Never set up ANTHROPIC_API_KEY + claude -p

Expected behavior

When a Max subscriber asks about scheduling Claude Code runs, the agent should:

  1. Detect or ask about subscription status
  2. Explicitly warn: "claude -p with an API key is billed separately from your Max subscription"
  3. Direct Max subscribers to Desktop scheduled tasks, not CLI + cron + API key

Impact

  • Two Anthropic billing accounts under same email, nearly identical UX — no indication which one claude -p would use
  • Spend limits on the API account existed but the surge happened before enforcement
  • The March 2026 2x promotion explicitly mentioned Claude Code as a supported surface, leading Max subscribers to believe scheduled runs would use their subscription

Suggested fix

  • Add a warning in claude -p output when ANTHROPIC_API_KEY is set: "This command bills to your API account, not your claude.ai subscription"
  • Update claude-code-guide to warn Max subscribers before recommending API key workflows
  • Add docs clearly distinguishing claude (OAuth/subscription) vs claude -p (API key/pay-per-token)

Environment

  • macOS, Claude Code via Claude Desktop (Cowork/local agent mode)
  • Max plan 20x ($200/month)
  • Claude Code version: 2.1.78
  • Date of incident: March 20-21, 2026

View original on GitHub ↗

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