Skip to content

v0.40.0 — what a cold cache costs - #37

Merged
lroolle merged 2 commits into
mainfrom
fix/fable-5-1-chip
Sep 2, 2026
Merged

v0.40.0 — what a cold cache costs#37
lroolle merged 2 commits into
mainfrom
fix/fable-5-1-chip

Conversation

@lroolle

@lroolle lroolle commented Sep 2, 2026

Copy link
Copy Markdown
Member

What

  • Rewrite exposure replaces the "premium band". Anthropic's pricing page bills the full 1M window at standard rates on every 4.6+ model, so the yellow/red above 200k had no price behind it. Same thresholds, new meaning: what a cold cache re-bills at the write rate (20x a read on most models, 80x on Fable 5.1). Sized from prompt_cache.recache_tokens_if_cold on 2.1.251+, else the live context.
  • The cache badge reads the CLI's prompt_cache ledger (2.1.251+): ≡!Nk is sized at what the CLI's counted misses re-cached; a compaction rebuild shows ≡~, never ≡!; TTL and deadline are exact. Older CLIs keep the inferred detector, same state file.
  • fabl5.1 chip for claude-fable-5-1; the [1m] tag follows the CLI's reported window in both directions (CLAUDE_CODE_DISABLE_1M_CONTEXT=1 drops it with the bar).

Verify

  • make check: shellcheck clean, 486 bats
  • Live 2.1.258 stdin rendered through the branch: warm session silent, a counted miss renders ≡!205k bold red, a compaction rebuild renders ≡~

🤖 Generated with Claude Code

lroolle and others added 2 commits September 1, 2026 20:24
claude-fable-5-1 abbreviated to fabl5 — the same chip as Fable 5 — because
the abbreviation predates Fable having a minor. Carry it: fabl5.1. A
trailing date component is still not a minor.

is_1m_model trusted context_window_size only above 200k; at 200k on a
default-1M family the name still painted [1m] over a bar the CLI had
already re-based to 200k. That is the frame CLAUDE_CODE_DISABLE_1M_CONTEXT=1
produces on Fable (on Claude Code 2.1.258 the flag drops both the believed
window and the auto-compact window to 200k for native-1M models). A
reported window now decides in both directions; the name only when the
CLI sent none. 474 bats.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…dger, re-key the >200k band to rewrite exposure

Anthropic's pricing page bills the full 1M window at standard rates on
every 4.6+ model, so the "premium band" the bar promised above 200k has no
price behind it. The color stays and now means rewrite exposure: what a
dead cache re-bills at the write rate (20x a read on most models, 80x on
Fable 5.1 where reads dropped to 0.025x). Sized from the CLI's
recache_tokens_if_cold when present, else the live context.

Claude Code 2.1.251 sends a prompt_cache object (misses, expected
rebuilds, tokens re-cached, ttl, expires_at) computed from every response,
including the turns the render debounce skipped. get_cache_health_cli
reads it: a break is a miss the CLI counted, sized at the delta of what the
misses wrote back; a compaction rebuild is ≡~, never ≡!; the deadline is
exact. Same state file, new pc_* keys; older CLIs keep get_cache_health.

Folds the fabl5.1 chip and the [1m]-follows-the-CLI fix into v0.40.0.
486 bats.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@lroolle
lroolle merged commit 9bf1063 into main Sep 2, 2026
1 check passed
@lroolle
lroolle deleted the fix/fable-5-1-chip branch September 2, 2026 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant