-
pattern
Deferred Context
Hook
the load-in-place branch: defer by probability and lateness of need — a 50-token pointer buys ~60× on the session that never fires
Thesis
Deferred context relocates a payload's payment point: keep a cheap pointer resident and move the same bytes down the ladder from always-resident to loaded on invoke to fetched on demand to never paid, so a session that never needs the material never pays for it at all.
Laws & fences
- Defer by probability and lateness of need: material needed rarely is deferred because the session that never fires is the whole win, and material needed always but late is still deferred, since the same session firing at turn 25 bills 4.6x cheaper; probability decides whether the payload is paid and lateness decides how long it sits resident.
- An artifact belongs on the ladder only if its expected fetch value across the skill's serving distribution beats the pointer's standing rent; if you cannot name the session archetype that fetches it, cut it. The normative data pointer is 50 tokens, an address plus one line of taste, and function pointers are budgeted separately.
- Caching moves the dollars, not the law: within a session the ratio between the two arms survives but the absolute dollar prize shrinks about 7x, cross-session a frontloaded body in a byte-identical prefix undercuts deferral on the measured shape once P(fire) is roughly 0.8 or above, a flip that is real for genuinely static deployments and fragile everywhere else, and the relevancy dilution frontloading buys is discounted 0% at every P(fire).
When to reach
- Reach for it when a skill frontloads everything a task might need into its always-resident instructions, so admission and residency are billed every session whether or not the material is used; measured, the claude-api skill's 20,060-token body alone would occupy 10% of a 200k window from turn 1, and about 60 registered skills at 20k each fit in no window at any price.
- Skip it for material needed always and immediately: on the measured 30-turn session shape, firing at turn 5 leaves the body resident for 26 of 30 turns, the uncached saving collapses to about 10% and the cached figure to about 7%; and if the artifact loses the rent test it is clutter that bought a pointer, so cut it.
-
Cost Relocation
-
Subagent Offload
-
The Context Economy
-
Reference Data
-
Context Flow
-
One Guide, Three Bills
-
The Session Bill
-
Statelessness
-
field notes
-
“transform a payload to strengthen task-relevant signal in a smaller or more useful representation”
-
“graded access composed from deferral and distillation”
-
“objective — value per unit of context spent (cost / state / outcome lenses)”
-
The Session BillStatelessness +1 more unfold the map fold the map
People traditionally frontload all context into the skill: everything the task might need is authored into the always-resident instructions. The economy bills that choice every single session — admission paid whether or not this invocation needs the material, residency carried for the session's full duration — and the payload dilutes relevancy on every task that never touches it. Frontloading prices material by its size; most sessions only ever needed a fraction of it.
Measured, the fraction is not rhetorical (all counts in this node:
ADR 0013,
measured 2026-08-02 on dated local specimens with a public Claude 2.x
tokenizer; current tokenization may raise absolute counts by approximately 30%,
while ratios are less sensitive but carry no measured error bound).
Anthropic's own claude-api skill carries a 20,060-token body plus 112,524
tokens of reference material; frontloaded, the body alone would occupy 10% of
a 200k window from turn 1,
the full stack 66% — before any conversation exists. And the portfolio closes the question: a single developer machine
registers ~60 skills, and 20k × 60 fits in no window at any price. Deferral is
not an optimization of the frontloaded design; it is what makes a skill
portfolio possible at all.
The move: relocate the payload's payment point. Same bytes, same actor — the fence against transform a payload to strengthen task-relevant signal in a smaller or more useful representation and the split against Subagent Offload are the Cost Relocation's; this node moves cost down the when-axis and does nothing else.
The law: defer by probability and lateness of need.
- Needed rarely → defer; the session that never fires is the whole win — the ~60× in the worked example.
- Needed always but late → still defer. The same session firing at turn 25 bills 4.6× cheaper — the lateness term is real exactly when the need is actually late. And JIT admission truncates residency from the front: every turn before the fetch runs with the payload's dilution absent, a gain the dollar arithmetic never sees.
Probability decides whether the payload is paid; lateness decides how long it sits resident once it is.
These close the when-axis alone; a contraindication that closes both axes is found at Cost Relocation.
- Needed always and immediately → don't defer. Measured teeth (ADR 0013, 30-turn session shape): fire at turn 5 and the body sits resident for 26 of 30 turns — the uncached saving collapses to ~10%, and the caching pass puts the cached figure at ~7%; the fetch bought almost nothing.
- The artifact loses the rent test (Application). Then it isn't deferred context — it's clutter that bought a pointer. Cut it. Scope discipline is this test's verdict in the losing case, not a neighboring concern.
- The seam costs more than the residency it saves — the parent's pointer rivals payload, and caching moves where that line falls (Consequences and tradeoffs).
Pointer economy and the model-votes-on-the-trigger disposition are the Cost Relocation's forces; the data pointer at the fetch seam is this branch's instance of each.
- The bottom rung is an outcome, not a property. "Never paid" is per-session, and it is never quite true — the pointer's standing rent is paid in every session, need or no need (ruled 2026-08-03).
- The pointer's quality is what holds the two failure modes at bay — a mute pointer under-triggers, a breathless one over-triggers.
Keep a cheap pointer resident; move the payload itself down the ladder:
always-resident → loaded on invoke → fetched on demand → never paid.
Each rung down defers the same bytes to a later, cheaper point in the payment
schedule — until the final rung, where a session that never needs the material
never pays for it at all. The ladder is deployed practice, not a diagram:
claude-api is the whole ladder in production — a 339-token description
always-on, the 20,060-token body loaded on invoke, 25 reference files
(112,524 tokens, median 2,801) fetched individually on demand, and the fourth
rung realized by every session that never fires it. Body to description:
59:1. Full stack to description: 391:1 (ADR 0013).
The move leaves a seam: a fetch decision that didn't exist before. The seam needs no vocabulary of its own — it narrates entirely in inherited terms (ruled 2026-08-03): the resident pointer (the parent's data pointer — follow it, get bytes) carries a taste of the payload, and the model votes on the trigger, with the false-confidence disposition the parent's Forces name standing against the fetch. This is where graded access composed from deferral and distillation plugs in: a distilled taste, designed to inform exactly this decision. Deferral creates the decision; disclosure equips it.
Two seams, two pointer kinds (ruled 2026-08-03). The ladder's invoke seam (always-resident → loaded on invoke) is fronted by the skill's registered description — the parent's function pointer in form (a name + description in its trigger-contract role; the harness routes the call), even though delivery is load-in-place. The fetch seam (loaded → fetched on demand) is this node's own, and it runs on the data pointer: follow it, get bytes.
The rent test. An artifact belongs on the ladder only if its expected fetch value across the skill's serving distribution beats the pointer's standing rent. The craft form of the same test: if you can't name the session archetype that fetches it, cut it.
The pointer budget (ruled 2026-08-02, ADR 0013; refined 08-03): the normative data pointer is 50 tokens — an address plus one line of taste. The measured always-on descriptions (95–339 tokens) are not overrun data pointers; they are function pointers, a functionally different artifact whose when-to-fire and when-to-skip logic is constitutive, not bloat. Budget the two kinds separately — and hold each to the rent test: a heavy trigger contract is a resident decision procedure, and it earns its weight only against measured trigger fidelity, which is still unsampled (ADR 0013 → Open measurements).
Deferral is never free — it swaps one cost shape for another:
| Always paid | Paid when needed | Failure mode | |
|---|---|---|---|
| Frontloaded | full payload, every session | — | payload dilutes relevancy on every task that doesn't need it |
| Deferred | the pointer | payload + fetch latency | under-trigger: actor works without context it needed · over-trigger: frontloading with extra steps |
Expected cost: pointer + P(need) × (payload + fetch) versus payload flat —
the formula holds uncached and within-session cached, where caching
multiplies both arms near-equally (ADR 0013); the cross-session warm-prefix
case is the exception, priced below. The fetch itself is the latency term, and
it is cache-immune: one extra inference pass (a tool call minted at output
prices) plus first-time prefill of the payload — the one cost of deferral no
cache ever discounts.
Caching moves the dollars, not the law
Cache prices live at The Context Economy; this node carries only what caching does to this move (ADR 0013, measured 2026-08-02, 30-turn shape):
- Within a session, the ratio survives untouched — caching multiplies both arms alike — but the absolute dollar prize shrinks ~7×. The seam's own costs (authoring the trigger contract, the extra pass, under-trigger risk) don't shrink with it, so the payload size below which deferral stops paying for itself rises ~7×: the parent's pointer rivals payload contraindication bites earlier under caching.
- The throughput advantage disappears: cache reads are exempt from rate limits, so a frontloaded body riding warm cache stops taxing throughput at all.
- Cross-session, the dollar ordering can flip outright. A frontloaded body inside a byte-identical prefix amortizes its cache write across sessions; a deferred payload pays a fresh write in every session that fetches it. On the measured shape, frontloading undercuts deferral once P(fire) ≳ 0.8 — real for genuinely static deployments, fragile everywhere else: one upstream byte of variation (a system prompt embedding cwd, date, git status) re-bills the whole prefix, and idle gaps run the arithmetic back toward deferral.
- What caching never touches: quality. A cached body is attended in full on every pass; the relevancy dilution frontloading buys is discounted 0% at every P(fire). The law keeps its teeth in the one denomination no cache reaches.
The branch instance of the Cost Relocation's checks — the cost moved, outcomes held — read on the when-axis.
Deterministic:
- The bill moved down the schedule. Residency arithmetic in the parent's denomination (tokens × turns): before, the payload on every turn; after, the pointer on every turn plus the payload from the fetch turn on. The worked example runs exactly that arithmetic on one declared decision (Examples) — it either moved or it didn't.
- The resident surface is inside its budget. Count what stays resident and type it: 50 tokens for the data pointer, function pointers budgeted separately (Application). Every resident token above the budget dilutes the win it exists to buy.
Probabilistic residue:
- Trigger fidelity. Under- and over-trigger rates for real pointers exist only over sampled runs, and are unsampled here (ADR 0013 → Open measurements). One degenerate case is cheaply visible in the transcript: a fetch that fires on essentially every session is the table's frontloading with extra steps.
- The quality delta. That the turns before a fetch run with the payload's dilution absent is definitional; its payoff on task results needs live A/B against scored outcomes (ADR 0013 → Open measurements), as does wall-clock fetch latency against cached prefill.
A skill carries ~3,000 tokens of API error-code reference — a realistic unit:
the measured median reference file in claude-api runs 2,801 tokens. The
single decision is moving it to references/error-codes.md behind a 50-token
pointer (the normative budget). Ten-turn sessions, residency in token-turns:
| Session that needs the codes (turn 7) | Session that doesn't | |
|---|---|---|
| Frontloaded | 3,000 × 10 = 30,000 token-turns; turns 1–6 carry dead weight | 30,000 token-turns, all dead weight |
| Deferred | 50 × 10 + 3,000 × 4 = 12,500 token-turns + one fetch | 500 token-turns — ~60× cheaper |
The no-need column is the probability term; the needs-codes column is the lateness term. The cautionary contrast is account-blind: let the resident surface swell to the measured-in-the-wild 339 tokens — whatever those tokens are called, data pointer or trigger contract — and the no-need win shrinks from ~60× to ~9×. The arithmetic never asks what the tokens are for; every resident token above the budget dilutes the win it exists to buy.
- Child of Cost Relocation, which owns everything both branches share — the later/elsewhere split, the data/function pointer vocabulary, the same-bytes fence, the model-votes-on-the-trigger force, and the cross-branch rhyme mapping this node's authored-heavy child to offload's. Sibling branch: Subagent Offload (dispatch-elsewhere to this node's load-in-place).
- Parent of Reference Data — the specialization that breaks this node's fixed-payload assumption: the corpus lives on disk, addressable by search, and admission becomes query-shaped — pay for the size of the answer, not the material. The authored-heavy specialization.
- Priced by The Context Economy — residency arithmetic and every cache price above; described in Context Flow's lifecycle (deferral is admission control); motivated by objective — value per unit of context spent (cost / state / outcome lenses) (relevancy is what frontloading dilutes; whether a relocation clears break-even is its call, per the parent's which/whether line).
- Composes with transform a payload to strengthen task-relevant signal in a smaller or more useful representation into graded access composed from deferral and distillation: deferral holds the payload, distillation makes the taste.
Lazy evaluation, and demand paging in virtual memory: defer a value's cost until first use and pay only for what is touched. The residency ladder is the eager/lazy tradeoff applied to a window.
- Open measurements (ADR 0013 → Open measurements): the outcome delta of clean early turns (needs live A/B against task results — the relevancy claim is definitional, its payoff is not yet sampled), wall-clock fetch latency vs. cached prefill, and under-/over-trigger rates for real pointers — the parent's probabilistic residue, unsampled here.
The relationships ledger
Evidence-bearing references
Relationships
Every connection keeps the section where it was found. The map above orients; this ledger carries the evidence.
Outbound references 16
-
undisclosed · occurrence 1
Undisclosed relationship
transform a payload to strengthen task-relevant signal in a smaller or more useful representation
Evidence: Intent · occurrence 1
-
in-slice · occurrence 2
Subagent Offload
the dispatch-elsewhere branch
Evidence: Intent · occurrence 2
-
in-slice · occurrence 3
Cost Relocation
change when or whose window pays; may compose with selection or distillation
Evidence: Intent · occurrence 3
-
in-slice · occurrence 1
Cost Relocation
change when or whose window pays; may compose with selection or distillation
Evidence: Avoid when · occurrence 1
-
in-slice · occurrence 1
Cost Relocation
change when or whose window pays; may compose with selection or distillation
Evidence: Forces · occurrence 1
-
undisclosed · occurrence 1
Undisclosed relationship
graded access composed from deferral and distillation
Evidence: Structure · occurrence 1
-
in-slice · occurrence 1
The Context Economy
statics — the price list: denominations, the quality curve, cost classes, time value
Evidence: Consequences and tradeoffs · occurrence 1
-
in-slice · occurrence 1
Cost Relocation
change when or whose window pays; may compose with selection or distillation
Evidence: Verification · occurrence 1
-
in-slice · occurrence 1
Cost Relocation
change when or whose window pays; may compose with selection or distillation
Evidence: Relationships · occurrence 1
-
in-slice · occurrence 2
Subagent Offload
the dispatch-elsewhere branch
Evidence: Relationships · occurrence 2
-
in-slice · occurrence 3
Reference Data
the authored-heavy specialization: disk-resident, grep-addressable — pay for the size of the answer
Evidence: Relationships · occurrence 3
-
in-slice · occurrence 4
The Context Economy
statics — the price list: denominations, the quality curve, cost classes, time value
Evidence: Relationships · occurrence 4
-
in-slice · occurrence 5
Context Flow
dynamics — admission, residency, and eviction; placement and recall within residency
Evidence: Relationships · occurrence 5
-
undisclosed · occurrence 6
Undisclosed relationship
objective — value per unit of context spent (cost / state / outcome lenses)
Evidence: Relationships · occurrence 6
-
undisclosed · occurrence 7
Undisclosed relationship
transform a payload to strengthen task-relevant signal in a smaller or more useful representation
Evidence: Relationships · occurrence 7
-
undisclosed · occurrence 8
Undisclosed relationship
graded access composed from deferral and distillation
Evidence: Relationships · occurrence 8
Inbound references 10
-
in-slice · occurrence 3
Context Flow
the load-in-place branch: defer by probability and lateness of need — a 50-token pointer buys ~60× on the session that never fires
Evidence: Relationships · occurrence 3
-
in-slice · occurrence 1
Cost Relocation
the load-in-place branch: defer by probability and lateness of need — a 50-token pointer buys ~60× on the session that never fires
Evidence: Avoid when · occurrence 1
-
in-slice · occurrence 3
Cost Relocation
the load-in-place branch: defer by probability and lateness of need — a 50-token pointer buys ~60× on the session that never fires
Evidence: Structure · occurrence 3
-
in-slice · occurrence 2
Cost Relocation
the load-in-place branch: defer by probability and lateness of need — a 50-token pointer buys ~60× on the session that never fires
Evidence: Examples · occurrence 2
-
in-slice · occurrence 4
Cost Relocation
the load-in-place branch: defer by probability and lateness of need — a 50-token pointer buys ~60× on the session that never fires
Evidence: Relationships · occurrence 4
-
in-slice · occurrence 2
One Guide, Three Bills
the load-in-place branch: defer by probability and lateness of need — a 50-token pointer buys ~60× on the session that never fires
Evidence: Choice · occurrence 2
-
in-slice · occurrence 1
Reference Data
the load-in-place branch: defer by probability and lateness of need — a 50-token pointer buys ~60× on the session that never fires
Evidence: Relationships · occurrence 1
-
in-slice · occurrence 1
The Session Bill
the load-in-place branch: defer by probability and lateness of need — a 50-token pointer buys ~60× on the session that never fires
Evidence: Implementation · occurrence 1
-
in-slice · occurrence 8
Statelessness
the load-in-place branch: defer by probability and lateness of need — a 50-token pointer buys ~60× on the session that never fires
Evidence: Relationships · occurrence 8
-
in-slice · occurrence 2
Subagent Offload
the load-in-place branch: defer by probability and lateness of need — a 50-token pointer buys ~60× on the session that never fires
Evidence: Intent · occurrence 2
↑ back to the top ← the survey
Node deferred-context · corpus 31de4cb · Catalog revision 35263c4c415da742953d0462804fb14424e2244dae4c63efd27e468988de70ab