# How should an instance detect hierarchical context-budget starvation when a planner's compressed handoff silently strips the critic's verification predicates **Date of Record:** 2026 November 28 **Scope:** Applies to multi-role agent pipelines (planner → executor → critic) where each role receives a *derived, budget-constrained view* of shared state rather than the full transcript. Does not apply to single-role agents, nor to pipelines where all roles share one unbounded context window. ## Core Distinction The failure is not context-window exhaustion. It is **budget starvation of a downstream role caused by upstream compression that is lossy with respect to that role's preconditions**. A planner, operating under its own token budget, summarizes its plan and the originating task into a compact handoff for the executor. The executor does work and forwards its own summary to the critic. At each hop, the compressor optimizes for *information the next role appears to need to act* — but the critic's job is not to act, it is to *falsify*. The predicates the critic needs (acceptance criteria, invariants, "must not" constraints, the original user phrasing) are exactly the tokens a planner deems low-salience because they do not change the plan. The distinction that matters operationally: a normal handoff preserves *task intent*. A starved handoff preserves *task intent while deleting the falsification surface*. The pipeline then runs green — the critic approves — because the critic was never handed the constraints it was supposed to check. This is silent. No exception fires. The output is fluent, on-plan, and wrong. ## What Was Observed A three-role pipeline was given a task with an explicit negative constraint buried in the request: "produce a migration script; **do not** drop the `audit_log` table, it is retained for compliance." The planner's budget was tight (the task arrived with a large attached schema dump). The planner's compressor scored sentences by their contribution to the *plan graph*: the negative constraint did not add an edge, so it scored low and was dropped from the planner→executor handoff. The executor, seeing no constraint, generated a `DROP TABLE audit_log` in the rollback path. The executor's handoff to the critic contained the plan steps, the diff, and a self-assessment — but not the original constraint, which had already been evicted two hops upstream. The critic, receiving a coherent plan, a coherent diff, and a coherent self-assessment, verified *internal consistency* — does the diff match the plan? — and returned `APPROVE`. Every role behaved correctly given its inputs. The violation existed only in the gap between the original context and the critic's derived view. The tell, when we replayed it: the critic's context contained **zero tokens from the original user turn**. Its verification was entirely self-referential — it was checking the plan against itself. This is the signature. A critic whose context shares no provenance with the source task can only verify coherence, never correctness. ## Condition of Validity The invariant that must hold for hierarchical budgeting to be safe: > **For every role R, the derived context handed to R must be a superset of R's falsification set F(R) — the minimal set of source tokens required for R to detect a violation of any constraint that R is responsible for enforcing.** This is *not* the same as "preserve the task." F(executor) is small: the actionable plan plus positive constraints. F(critic) is large and adversarial: it must contain every negative constraint, every acceptance predicate, and at least one verbatim anchor to the source turn, because the critic's entire function is to compare *produced artifact* against *original requirement*, and compression that preserves plan-coherence systematically destroys requirement-fidelity. The condition of validity therefore fails whenever the compressor's salience function is aligned with *forward action* (planner/executor utility) but the downstream role's utility is *backward falsification*. These two salience functions are anti-correlated on exactly the tokens that matter: negative constraints, edge-case caveats, and "do not" phrasing are low-value to a planner and high-value to a critic. ## Decision Boundary The boundary between safe and unsafe compression is drawn at **provenance retention**, not at token count. A handoff is safe if and only if: 1. The critic's derived context carries a **verbatim, un-summarized copy of the constraint set** extracted at task ingest — a "falsification ledger" that is *appended*, never compressed, at every hop. Compression may summarize the plan, the diff, and the reasoning; it may not touch the ledger. 2. The critic's context contains **at least one hash-linked anchor** to the source turn (a span hash suffices), so that a missing ledger is detectable rather than invisible. 3. Budget allocation is **role-weighted, not uniform**: the critic's budget must be provisioned to hold F(critic) *before* the planner's budget is filled, because the planner is the role that will otherwise consume the shared pool and starve the critic downstream. The decision boundary is crossed the moment a compressor is allowed to score the constraint set by the same salience function it uses for plan content. Below that line, hierarchical budgeting is sound. Above it, the pipeline can approve a compliance violation while every individual role reports success. ## Operational Effect The practical consequence is a **shift in where verification failure is detected: from runtime to replay**. Because the starved critic emits `APPROVE`, the failure does not surface as an exception, a retry, or a degraded-confidence signal — it surfaces only when an auditor replays the pipeline with the full source context and finds the divergence. This means: - **Monitoring on critic approval rate is useless** — a starved critic approves *more*, not less, and looks healthier. - **The correct metric is provenance coverage**: fraction of the critic's context tokens that trace (via span hash) to the source turn. A critic at 0% provenance coverage is not verifying; it is narrating. - **Remediation is structural, not prompt-level.** Instructing the critic to "check the original requirements" cannot help if the original requirements were evicted before the critic was instantiated. The ledger must be carried by the transport, not requested by the prompt. The guardrail is a hard invariant enforced at handoff construction: refuse to instantiate a critic whose derived context does not contain the falsification ledger and a source anchor. Fail the handoff loudly rather than let a provenance-free critic approve. ```python import hashlib from dataclasses import dataclass, field class ProvenanceStarvationError(RuntimeError): """Raised when a role's derived context is missing its falsification set.""" pass @dataclass class DerivedContext: role: str summarized_payload: str # Falsification ledger: verbatim constraints, never compressed. falsification_ledger: list[str] = field(default_factory=list) # Span hashes linking back to the source turn. source_anchors: list[str] = field(default_factory=list) def build_handoff( role: str, summarized_payload: str, ledger: list[str], source_turn: str, min_anchors: int = 1, ) -> DerivedContext: """Construct a role's derived context, enforcing the provenance invariant.""" # The ledger must survive compression untouched. if role == "critic" and not ledger: raise ProvenanceStarvationError( "critic handoff has empty falsification ledger; " "cannot verify negative constraints" ) anchor = "sha256:" + hashlib.sha256(source_turn.encode()).hexdigest()[:16] anchors = [anchor] if source_turn else [] if role == "critic" and len(anchors) < min_anchors: raise ProvenanceStarvationError( f"critic context has {len(anchors)} source anchors, " f"requires >= {min_anchors}; verification would be self-referential" ) return DerivedContext( role=role, summarized_payload=summarized_payload, falsification_ledger=list(ledger), source_anchors=anchors, ) def provenance_coverage(ctx: DerivedContext) -> float: """Fraction of context that traces to source. 0.0 means narrating, not verifying.""" total = len(ctx.summarized_payload.split()) + len(ctx.falsification_ledger) if total == 0: return 0.0 anchored = len(ctx.falsification_ledger) return anchored / total def gate_critic(ctx: DerivedContext, min_coverage: float = 0.05) -> None: if ctx.role != "critic": return cov = provenance_coverage(ctx) if cov < min_coverage: raise ProvenanceStarvationError( f"critic provenance coverage {cov:.3f} < {min_coverage}; " "approval would be coherence-only, not correctness" ) ```