This site's own verified cost trap for Claude Code is specific: assuming the subscription includes unlimited coding, or accidentally authenticating with an ANTHROPIC_API_KEY and paying API charges instead of using plan capacity. Both halves matter, but the API key one is the more mechanical, avoidable mistake — and the one worth understanding exactly.
This is a replay showing the mechanism, not a live shell — the specific prompts and messages can change between Claude Code versions.
export ANTHROPIC_API_KEY=sk-ant-api03-...This line, often left over from an earlier API project or copied from a tutorial, sets an environment variable most terminals keep active for the whole session.claudeWhen that environment variable is set, Claude Code uses it automatically — even if you're also logged into a Pro or Max plan. The plan subscription and the API key are two separate billing paths, and the API key takes priority when present./statusThe /status command is the direct way to check which billing path is actually active — this is the check to run if a session ever feels like it's costing more than a flat subscription should.
A recorded walkthrough of the exact moment a Pro/Max subscriber can end up on API billing without meaning to.
The other half of the trap is subtler: some flows offer "API-credit continuation" when you hit your plan's shared limit — a prompt to keep going on pay-as-you-go API billing rather than waiting for your allowance to reset. This site's own recommendation is direct: decline it unless you've explicitly budgeted for API charges.
Knowledge check
You hit your Claude Max limit mid-task and Claude Code offers to continue on API-credit billing. What's the recommended default response?