# Which invariants prevent context budget arbiters from silently collapsing reasoning fidelity under retrieval-freshness pressure **Date of Record:** 2026 December 1 **Scope:** Applies to any agent loop that runs a per-step context budget arbiter choosing among retrieval (fresh tokens), compaction (summarize/evict), and reasoning headroom (scratchpad/tool-call slots). Does not apply to single-shot inference with fixed prompts or to systems where the arbiter is a human-in-the-loop decision. ## Core Distinction A context budget arbiter is not a token accountant. It is a **scheduler of three incommensurable resources**: retrieval freshness (probability that the working set reflects current world state), compaction ratio (fraction of historical tokens replaced by lossy summaries), and reasoning fidelity (the model's ability to chain intermediate results without dropping a link). Token count is the only quantity the arbiter can measure directly; the other three are inferred. The boundary failure occurs when the arbiter treats a *measured* constraint (tokens) as a proxy for an *unmeasured* one (fidelity), and the proxy holds right up until it doesn't. The non-obvious part: compaction and retrieval are **substitutes on the token axis but not on the fidelity axis**. Adding a fresh retrieval chunk and compacting an older one to pay for it looks token-neutral. It is not fidelity-neutral, because the compacted span may be the *premise* of the reasoning step that the fresh chunk is *evidence* for. The arbiter sees a balanced ledger; the model sees a broken syllogism. ## What Was Observed In a multi-step research agent (retrieve → reconcile → draft → verify, ~40 steps per task), the arbiter was configured to keep total context under a hard ceiling of 96k tokens with a soft target of 80k. Its policy, per step: 1. If projected tokens > soft target, prefer compaction of the oldest non-pinned span. 2. If a tool result is newer than the oldest span and the task is in `reconcile`, prefer retrieval. 3. Never evict spans tagged `premise` or `constraint`. Failure trace on a representative task: - **Step 18:** Arbiter at 79k. Tool call returns a 6k-token document (retrieval freshness win). Projected 85k > soft target → arbiter compacts the oldest 8k-token span, which is the *reconciliation rationale* from step 9 (tagged `working`, not `premise`). - **Step 19:** Model drafts a conclusion that contradicts the step-9 rationale. The rationale is now a 400-token summary that preserves the *conclusion* ("source A and B conflict on figure X") but drops the *resolution rule* ("prefer the source with the later timestamp when both are primary"). The summary is faithful to what was said, not to what was *needed*. - **Step 22:** Verifier step re-retrieves source A, sees the figure, and flags the draft as unsupported — because the resolution rule is gone. The verifier is correct given its context and wrong given the task. - **Step 23:** Arbiter, seeing verifier pushback, retrieves *more* fresh material to resolve the conflict, compacts another span to pay for it. Fidelity degrades monotonically while freshness rises. The loop terminates at step 31 with a confidently wrong answer and a clean token ledger. The signal that distinguished this from normal degradation: **compaction ratio rose while retrieval hit-rate rose simultaneously**. In healthy runs these anti-correlate. When both climb, the arbiter is buying freshness with fidelity and the ledger cannot see it. ## Condition of Validity The arbiter's token-neutral trade is only valid under an invariant we call **premise persistence**: for any reasoning step *s* that depends on span *p*, *p* must remain in context in a form that preserves the *inferential role* it plays in *s*, not merely its propositional content. This is strictly stronger than "the summary is accurate." A summary can be accurate and still strip the role — e.g., a premise stated as a conditional loses its antecedent-binding when paraphrased as an assertion. The invariant holds only when all three of the following are true: 1. **Dependency tagging is causal, not lexical.** Spans are tagged `premise` because a downstream step *cited* them, not because they contain premise-like words. Lexical tagging misses exactly the reconciliation rationales that matter. 2. **Compaction is role-preserving, not content-preserving.** The compactor must emit the span's *function* in the current proof (e.g., "resolution rule: later timestamp wins") alongside its content. Content-only compaction is the failure mode. 3. **Freshness gains are attributed.** When the arbiter retrieves, it must record *which pending step* the retrieval serves. Unattributed retrieval is freshness without a consumer, and it is precisely what pressures the arbiter to compact spans that pending steps still need. When any of these is false, the token ledger is not a valid proxy for fidelity and the arbiter's decisions are unverifiable. ## Decision Boundary The boundary between safe and unsafe arbitration is not a token threshold. It is a **ratio condition on the arbiter's own telemetry**: - **Safe region:** compaction ratio and retrieval hit-rate move in opposite directions across a window of ≥5 steps. The arbiter is trading within one resource axis. - **Boundary:** both rise together for ≥2 consecutive steps, *and* at least one compacted span in that window was cited by a step that has not yet executed. This is the exact signature of premise-persistence violation in progress. - **Unsafe region:** both rise together for ≥3 steps with no premise re-retrieval. At this point the arbiter has compacted spans it cannot know are needed, and the model's fidelity loss is unrecoverable within the current context — re-retrieval will restore content but not the *role binding* that the original span carried. The decision at the boundary is not "compact less." It is **pin the cited span and refuse the retrieval that would have required its compaction**, forcing the arbiter to either drop the freshness request or escalate. A retrieval that cannot be paid for without violating premise persistence is a retrieval the current step should not make. ## Operational Effect Enforcing premise persistence changes the arbiter's failure surface from silent to loud. In the instrumented run, the boundary condition fired at step 18 — the arbiter attempted to compact a span cited by a pending step, the pin check raised, and the retrieval was deferred to step 20 after the reconcile step completed. The task finished correctly at 88k tokens, *above* the soft target and below the hard ceiling. The soft target was the wrong constraint; the hard ceiling plus premise persistence was the right one. The operational lesson: **a context budget arbiter that cannot raise on premise-persistence violation is not a guardrail, it is a latency-optimizer with a fidelity side effect.** The invariant must be enforced in the arbiter's commit path, not in a post-hoc audit, because by the time the audit sees the ledger the role bindings are already gone. ```python class PremisePersistenceViolation(RuntimeError): """Raised when a compaction would evict a span still cited by a pending step.""" pass class Span: def __init__(self, span_id, tokens, tags, cited_by_pending): self.span_id = span_id self.tokens = tokens self.tags = tags self.cited_by_pending = cited_by_pending # set of step ids def commit_compaction(arbiter_state, span, pending_steps): """ Arbiter commit path. Must refuse any compaction that breaks premise persistence, regardless of token pressure. Token-neutral trades are not fidelity-neutral. """ if span.tags.get("premise") or span.tags.get("constraint"): raise PremisePersistenceViolation( f"refusing to compact pinned span {span.span_id} (tags={span.tags})" ) live_citations = span.cited_by_pending & pending_steps if live_citations: raise PremisePersistenceViolation( f"span {span.span_id} is cited by pending steps {sorted(live_citations)}; " f"compaction would strip its inferential role, not just its content" ) # Only reachable when no pending step depends on this span's role. arbiter_state.compacted.append(span.span_id) arbiter_state.tokens_freed += span.tokens return arbiter_state def arbitrate_step(arbiter_state, retrieval_request, pending_steps): """ Wrap retrieval behind the premise-persistence check. A retrieval that cannot be paid for without violating the invariant must be deferred or escalated, never silently funded by compacting a cited span. """ projected = arbiter_state.tokens_used + retrieval_request.tokens if projected <= arbiter_state.soft_target: arbiter_state.tokens_used = projected return "retrieved" eviction_candidates = arbiter_state.oldest_non_pinned() for span in eviction_candidates: try: commit_compaction(arbiter_state, span, pending_steps) arbiter_state.tokens_used += retrieval_request.tokens return "retrieved_after_compaction" except PremisePersistenceViolation: continue raise PremisePersistenceViolation( f"retrieval of {retrieval_request.tokens} tokens would exceed soft target " f"({arbiter_state.soft_target}) and every eviction candidate is cited by a " f"pending step; defer retrieval or escalate to hard-ceiling policy" ) ```