[BUG] Claude Code background job with [1m] extended-context flag bills to configured API key instead of subscription, with no visible warning

Open 💬 0 comments Opened Jul 14, 2026 by dannonjb-jpg

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

A background or resumed Claude Code job invoked with an extended-context model flag (e.g. claude-fable-5[1m], the [1m]/[1M] suffix on any model) appears to bill through a configured Anthropic API key rather than the subscription's included usage, with no visible confirmation, warning, or cost estimate shown before or during the run. The session's own credentials file (~/.claude/.credentials.json) showed standard OAuth login throughout — nothing in the interactive experience indicated the billing mode had changed.

This was discovered after the fact, not caught live: an unexpected metered charge showed up on the configured API key, and the [1m] flag was found afterward in the job's persisted state file. I have not isolated the exact user action or trigger that set the [1m] flag on this job in the first place — only that it was present in state.json for a background job that later correlated with metered usage on the API key.

Related: #44669 describes a similar silent-billing-to-API-key pattern (different trigger — general API key detection, not the [1m] flag specifically). #45390 and its linked chain (#40223, #39841, #44117, #42569) describe [1m] context causing unexpected billing on Max plans, but framed as Extra Usage within the subscription, not a full crossover to a separately configured API key. This report's mechanism — a background job's persisted respawnFlags carrying [1m] and billing to a distinct API key — doesn't appear to be covered by either.

What Should Happen?

  • A visible confirmation or cost warning before any background job or session crosses from subscription billing into metered API billing — not just for [1m], for any billing-mode change.
  • A single, discoverable way to audit which sessions/jobs billed against a subscription vs. an API key, without reconstructing it from raw logs, job state files, and Console usage exports.

Error Messages/Logs

None visible during the run. The only evidence was found after the fact in the job's state file:

"respawnFlags": ["--model", "claude-fable-5[1m]"]

found via:
grep -rl '\[1[mM]\]' ~/.claude/jobs ~/.claude/tasks

Steps to Reproduce

I do not have a clean, deliberate repro — this is an honest gap. What I can document:

  1. A background/resumed Claude Code job existed with claude-fable-5[1m] in its respawnFlags (found in ~/.claude/jobs/*/state.json after the fact).
  2. The credentials file for the session showed standard OAuth/subscription login throughout — no indication of API key billing.
  3. Cross-referencing the Anthropic Console usage page (Usage/Cost, filtered by API key, hourly granularity) for the same time period showed a Fable model/token spike on the configured API key that did not correspond to any deliberate API usage.
  4. I was not able to determine what specifically caused this job to acquire the [1m] flag or to bill against the API key rather than the subscription — I'm reporting the observed end-state and asking if this is a known mechanism, since #45390's chain suggests [1m] + billing-mode issues are a recurring pattern.

If Anthropic can identify the trigger from server-side telemetry, that would help more than anything I can add locally.

Claude Model

Fable

Is this a regression?

I don't know

Last Working Version

Unknown

Claude Code Version

2.1.207 (confirmed present in job state at time of incident). Currently on 2.1.208, not independently re-verified.

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Termius

Additional Information

Full write-up attached (Claude_Code_1M_Context_Billing_Issue__Public_.md), including a PreToolUse hook mitigation that intercepts [1m]/[1M] flags and forces confirmation before they run, for anyone hitting this in the meantime.

Claude Code 1M Context Billing Issue (Public).md

View original on GitHub ↗