Fetching from the wire…
Public story · 2026-07-08 · high
Anthropic's docs recommend a clear_at_least floor, like 5,000 tokens, to skip clears that cost more than they save.
Why now: As of July 8, Anthropic's docs are the only place this clear_at_least tradeoff is spelled out.
Claude's context-editing beta clears stale tool results out of a conversation automatically, per Anthropic's docs. One documented example drops from 70,000 tokens to 25,000, a real difference for anyone running long agent sessions with a token bill attached.
The same docs warn that clearing also erases your cached prefix. Prompt caching only pays off if that prefix survives across calls, so an automatic clear can trade a token discount for a cache-rebuild bill.
The setting to manage that tradeoff is clear_at_least. It sets a floor on how many tokens have to be reclaimable before Claude bothers clearing anything. Set it to 5,000 tokens, and clears too small to justify rebuilding the cache get skipped instead of firing automatically.
Anthropic's docs don't say what clear_at_least defaults to if it's left unset, or how often teams get burned by the gap. Anyone running long agent loops with context editing and prompt caching on should set that floor themselves, not assume the defaults handle it.
Each link below shares sources, entities, or timing with this story.
Anthropic released Claude / Shared entity: CLAUDE / Shared topic / Earlier coverage / Tension
Linked by a graph relationship (Anthropic released Claude); both cover CLAUDE; overlapping topics (claude, documented, token).
Anthropic released Claude / Shared entity: Claude / Shared topic / Earlier coverage
Linked by a graph relationship (Anthropic released Claude); both cover Claude; overlapping topics (actually, claude, cost, token).
Anthropic released Claude / Shared entity: CLAUDE / Shared topic / Earlier coverage / Tension
Linked by a graph relationship (Anthropic released Claude); both cover CLAUDE; overlapping topics (claude, cost).