Agentic Atlas patterns for agentic design
current field map

Manifest-selected Decision

Canonical id
0013-deferred-context-measurement
Status
accepted
Catalog order
6

Catalog revision 35263c4c415da742953d0462804fb14424e2244dae4c63efd27e468988de70ab

0013: Deferred context is grounded in measured skills

Status: accepted Date: 2026-08-03

Context

deferred-context taught the frontload-versus-defer trade on invented arithmetic: a 25-token pointer, a 120× win on the session that never fires, and an acknowledged hole where prompt caching should have been. Those figures decide real design questions — how heavy a resident pointer may be, when deferral stops paying for its own seam — and none of them had been counted. A measurement pass on 2026-08-02 counted two real installed skills and priced the move against Anthropic's published cache multipliers. The rulings below followed from it, and the node was redrafted to them.

The measurements are the node's grounding, so they must travel with it. This record is that grounding: the method, and the numbers that carry weight downstream — not the full working.

Method and error bars

Counts come from @anthropic-ai/tokenizer v0.0.4, which implements the Claude 2.x BPE. No locally runnable exact tokenizer exists for current models, and Anthropic's pricing page (fetched 2026-08-02) states that Claude 4.7 and later use a newer tokenizer producing approximately 30% more tokens for the same text. That licenses an approximately +30% directional warning, not the earlier unsourced −10% lower bound. Ratios are less sensitive than absolute counts because both arms used the same tokenizer, but no bound on ratio error was measured. Dollars anchor to $3/MTok base input.

The specimens are production skills installed on a working machine, not constructed cases: Anthropic's own claude-api — a real three-tier deferred structure, always-on description → body on invoke → 25 reference files fetched individually — and the corpus's own consulting-patterns. Session shape throughout is 30 turns, matching the economy's session-bill example, with residency billed as tokens × turns whose inference shipped the bytes.

The input specimens were not frozen into this repository, and the tokenizer dependency is not pinned here. These are dated local measurements with a preserved method and output, not an independently reproducible benchmark; exact recounting requires the original inputs and dependency version.

Decision

The deferral ratios are measured, and they are the pattern's case

claude-api carries a 339-token description, a 20,060-token body, and 112,524 tokens across 25 reference files (median 2,801). Body to description is 59:1; full stack to description is 391:1. consulting-patterns — a 95-token description over a corpus-sized deferred tier — lands near 1,033:1, inside the economy node's then-observed 1,000–1,600:1 band for document-heavy skills. The second specimen is a same-order-of-magnitude cross-check, not evidence that either value is typical of a population.

The normative pointer is 50 tokens

(ruled 2026-08-02; refined 2026-08-03.) The data pointer's budget is 50 tokens — roughly 200 characters, an address plus one line of taste. The measured always-on descriptions run 95–339 tokens, and the refinement is what those tokens are: they are function pointers at the invoke seam, whose when-to-fire and when-to-skip logic is constitutive, not overrun data pointers. The earlier reading of a 339-token description as a bloated pointer is superseded. Budget the two kinds separately.

The budget is normative, so the arithmetic is stated at it: 50 tokens buys ~60× on the session that never fires. The retired 25-token figure inflated that to 120×; letting the resident surface swell to the measured 339 collapses it to ~9×. The account the tokens are charged to does not enter the residency sum — every resident token above the budget dilutes the win it was spent to buy.

The law's teeth are measured, and sharper than the prose was

Deferral defers by probability and lateness of need, and the measurement puts an edge on each term (30-turn shape):

  • Fire at turn 5 and the body sits resident for 26 of 30 turns. The saving collapses to ~10% uncached, ~7% cached — the fetch bought almost nothing. "Needed always and immediately → don't defer" is confirmed numerically.
  • Fire at turn 25 instead and the deferred bill is 4.6× cheaper. The lateness term is real exactly when the need is actually late.
  • The expected-cost formula pointer + P(need) × (payload + fetch) versus payload flat holds uncached and within-session cached alike — caching multiplies both arms near-equally within one session. At P(fire)=0.1 on the early-fire shape it returns 8.6×. Cross-session warm-prefix caching is the exception (Caching moves the dollars, not the law).

Caching moves the dollars, not the law

Measured 2026-08-02 against the published multipliers (1.25× five-minute write, 2× one-hour write, 0.1× read, free refresh on each hit), which match the economy node's 2026-07-02 anchors with no rot. On the 30-turn shape:

  • Within a session the ratio survives untouched — still 59:1 in the no-need case — while the absolute prize shrinks ~7.2×, from a $1.78 per-session delta to $0.245. The seam's own costs do not shrink with it, so the payload size below which deferral stops paying rises by the same factor.
  • The throughput advantage disappears. Cache reads are exempt from rate limits, so a frontloaded body riding warm cache stops taxing throughput.
  • Cross-session, the dollar ordering flips. A frontloaded body inside a byte-identical prefix amortizes its write; a deferred payload pays a fresh 1.25× write every session that fetches it. Frontloading comes out ~21% cheaper, and the break-even sits at P(fire) ≳ 0.79 — real for genuinely static deployments, fragile wherever an upstream byte varies.
  • Quality is discounted 0%. A cached body is attended in full on every pass. The law keeps its teeth in the one denomination no cache reaches.

Consequences

  • The node states the 50-token budget as the standard it teaches and the 95–339 range as observed practice at a different seam. The two are budgeted and defended separately; both answer to the rent test.
  • Ratio claims and absolute-dollar claims are quoted separately, because caching moves one and not the other. An efficiency claim that names neither denomination nor cache regime is not checkable.
  • The 25-token pointer and the 120× figure are retired from the corpus.
  • Absolute token counts sourced to this record carry the approximately +30% newer-tokenizer warning. Ratios are less sensitive because both arms used one tokenizer, but no ratio-error bound was measured.

Open measurements

Three claims remain unsampled, and are stated as open rather than softened:

  • Quality deltas. That the turns before a fetch run undiluted is definitional; its payoff on task outcomes needs live A/B against scored results.
  • Wall-clock latency of a real fetch against cached prefill. No latency percentage is published in the current caching doc, so the corpus states none.
  • Trigger fidelity. Under- and over-trigger rates for real pointers are unsampled — which is why a heavy trigger contract cannot yet be shown to earn its residency.

Related

  • Deferred context — the node these measurements ground.
  • Cost relocation — the parent, whose pointer rivals payload contraindication the caching finding reprices, and which owns the data/function pointer vocabulary.
  • ADR 0006 — Relocation and transformation are orthogonal — the fence that keeps this a relocation ruling and not a distillation one.
  • The measurement memo — the full workshop record: per-file counts, the three billed designs, the cache tables, and the tokenizer script.

Browse all selected Decisions