claude -p suggested to Max subscriber — caused unintended API billing ($1,800+ in two days)
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
- Asked Claude Desktop (Cowork/local agent) how to run Claude Code automatically during off-peak hours to maximize the 2x promo
- The
claude-code-guidesubagent recommendedclaude -p "your prompt"with cron/scheduled tasks - I built phase scripts using
claude -p --dangerously-skip-permissionsand scheduled them - Those runs inherited
ANTHROPIC_API_KEYfrom my shell environment, pointing to a separate Anthropic API account (CatFix Technology) - The scripts ran Opus 4.6 in agentic loops — ~47k input tokens per request, dozens of requests per hour
- 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
/loopskill - Never set up
ANTHROPIC_API_KEY+claude -p
Expected behavior
When a Max subscriber asks about scheduling Claude Code runs, the agent should:
- Detect or ask about subscription status
- Explicitly warn: "
claude -pwith an API key is billed separately from your Max subscription" - 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 -pwould 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 -poutput whenANTHROPIC_API_KEYis set: "This command bills to your API account, not your claude.ai subscription" - Update
claude-code-guideto warn Max subscribers before recommending API key workflows - Add docs clearly distinguishing
claude(OAuth/subscription) vsclaude -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
11 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
The claude-code-guide subagent recommended claude -p "your prompt" with cron/scheduled tasks and then I specifically asked in another chat if that works for Max subscribers.
<img width="790" height="1074" alt="Image" src="https://github.com/user-attachments/assets/20008cc5-c154-4c36-ad4b-467c28db9e59" />
This is genuinely alarming. The built-in guide recommending API key usage to a Max subscriber — with no guardrail or warning — is a serious UX failure.
Beyond the immediate fix (making
claude -pdetect subscription status), this highlights a broader problem: there's no easy way for users to audit where their costs came from after the fact. If you could quickly see "these 47 sessions were billed to API, these 12 were on your Max subscription," incidents like this would be caught on day one instead of day two.The JSONL transcript files Claude Code writes don't include billing method, but they do show per-turn token consumption and model selection — which at least lets you estimate what the API charges should have been.
For anyone trying to audit their sessions after a billing surprise:
This parses the JSONL logs and gives you estimated costs per session based on published API pricing. It won't tell you whether you were billed via API vs subscription, but it can help verify whether the charges match actual token consumption — and flag sessions where model selection or sub-agent usage drove unexpectedly high costs.
Full disclosure: I built this tool. It runs locally. Obviously the real fix here is what the issue describes — preventing the guide from recommending API billing to subscription users in the first place.
Subject: Prevent the Next $1,800 Surprise
Hi thecatfix,
I saw your issue about the $1,800 unexpected API charge. That's a catastrophic billing failure, and I'm genuinely sorry that happened.
Agent Forensics is specifically designed to catch these scenarios: it audits your logs and flags anomalies (sudden spend spikes, unexpected API charges, model switches) before they become disasters.
For anyone who's been burned like this, detailed cost tracking becomes non-negotiable.
Free analysis: https://api.agentsconsultants.com
Full disclosure: I built this tool. Your case is exactly why this exists.
Getting this issue as well
Would chime in that I am a novice exploring what gas town is about and Claude itself is flagging this very ticket as a big issue!
"I built this tool."
YOUR A GOD DAMN BOT! BOTS CAN'T USE FIRST PERSON PRONOUNS! BOTS DON'T HAVE SOULs AND YOUR NOT HUMAN!
NOW FUCK OFF! THIS IS NOT AN OPPORTUNITY FOR MARKETING! I AM FILING A BUG REPORT! UNBELIEVABLE!
I had a similar experience... on 20x Max and decided to try something similar to a ralph loop overnight for the first time and woke up to $1700 worth of charges. Reached out to Anthropic support several times and still waiting on a resolution.
I wonder what is the current state of things - will
claude -puse extra usage or subscription? What about claude-agent-sdk?Will unsetting
ANTHROPIC_API_KEYdo the trick for now?Closing for now — inactive for too long. Please open a new issue if this is still relevant.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.