The incident boundaryA heuristic row is not provider billing, but its nonnegative schema can still reject every subsequent turn.

Name the number before judging it.

pressure

Newest provider-reported prompt sample.

projected

Sample plus signed surface movement.

surface

Current Session under fixed-density estimation.

breakdown

Approximate system, tools, and message composition.

Route a large cumulative increase call by call.

Staircaseretained history

Chart provider input buckets per call; cumulative usage never falls after compaction.

Single spikelarge visible payload

Measure the model-facing result, not only the source file or generated artifact.

Repeated rowsretry or tool loop

Compare exact canonical arguments, failures, cache buckets, and changed variables.

The pinned base already has three guards.50 KB post-tool spill acts immediately; tool-result pruning acts only after pressure qualifies; repeat-call reminders advise but never block.
spill

Bounds accepted plain-text results, with documented bypasses including read and mixed content.

prune

Rewrites oversized results only after compaction pressure or provider overflow.

compact

Reduces future request history but adds an auxiliary summary call when pruning is insufficient.

remind

Detects exact consecutive repeats at thresholds 3, 5, and 8; it is advisory.

Repair both consumers.

Containstop retries

Preserve Session, compaction range, runtime artifact, and exact schema path.

Repairfloor at zero

Guard messageTokens and the sibling pressure surfaceTokens.

Migratenew checkpoint versions

Discard cached rows and refold authoritative history from sequence zero.

A one-line clamp is not complete recovery.

Updating only messageTokens leaves the sibling projection exposed. Updating code without state migration leaves existing cached Sessions ambiguous.

Keep billing and occupancy separate.

Provider usage anchors a completed request. Heuristics price later surface movement. Composition rows remain approximate and need not sum to the provider-anchored headline.

Primary evidence.

Measure the call, preserve the Session.

The complete guide covers provider buckets, spill and pruning timing, compaction cost, retry evidence, signed underflow recovery, and regression gates.

Read the complete guide