Under what conditions must an instance abandon marginal retrieval to preserve reserve-token solvency

**Date of Record:** 2026 December 2 **Scope:** Applies to single-agent instances operating under a hard per-episode token budget where retrieval is scheduled dynamically against a reserve floor for in-flight tool calls and final synthesis. Does not apply to systems with unbounded context, or where retrieval cost is paid out-of-band from the reasoning budget.

Core Distinction

The failure mode is not "ran out of context." It is **reserve-token insolvency**: an instance that spent its remaining budget on low-marginal-value retrieval and then could not afford the tool-call round-trip and synthesis tokens needed to *use* what it retrieved. The retrieved content arrived, occupied context, and became dead weight — worse than not retrieving at all, because it consumed budget that the final answer required.

The distinction that matters: a token budget allocator is a *scheduling* problem, not a *sizing* problem. The invariant is not "keep total tokens under the window." It is:

reserve_floor <= budget_remaining - cost_of_next_retrieval

must hold **before** every retrieval admission decision, where `reserve_floor` is itself a function of expected tool-call count and synthesis length. When this invariant is checked only at admission time against the *current* step rather than against the *terminal* step, the allocator admits retrievals that are individually affordable but collectively make the episode unsolvable.

What Was Observed

A research agent was given a 96k-token episode budget with a 12k reserve floor (estimated 3 tool calls × ~2k each plus ~6k synthesis). It ran a retrieval scheduler that admitted a document whenever `cost(doc) < budget_remaining - 4k` — a *flat* slack constant, not the reserve floor.

Trace:

  1. Step 1: budget 96k, retrieved doc A (8k). Remaining 88k.
  2. Step 2: retrieved doc B (9k). Remaining 79k.
  3. Step 3: tool call returned 6k of results. Remaining 73k.
  4. Steps 4–14: eleven more retrievals admitted under the flat 4k-slack rule, each individually cheap (2–7k), each passing the local check. Remaining budget: 9k.
  5. Step 15: the agent needed two more tool calls (~4k) plus synthesis (~6k). Reserve floor was 12k. Available: 9k. **Insolvent by 3k.**

The agent did not crash. It did something worse: it truncated its own reasoning to fit, emitted a synthesis that silently dropped the verification step, and returned an answer that *looked* complete. The failure was invisible at the API layer — no context overflow, no exception — because the allocator degraded gracefully into a wrong answer.

The key observation: **every individual admission decision was locally correct.** The flat-slack rule passed at every step. The failure emerged only from the *composition* of admissions against a reserve floor that the rule never referenced.

Condition of Validity

The flat-slack admission rule is valid only when:

It is **invalid** whenever the remaining tool-call count is nonzero and unknown, because the reserve floor is a function of future step count, and the flat slack does not track it. In the observed episode, `reserve_floor` (12k) exceeded the slack constant (4k) by 3×, so the rule admitted retrievals into the reserve itself.

The correct admission predicate is terminal-aware:

admit(doc) iff cost(doc) <= budget_remaining
              - reserve_floor(remaining_tool_calls_estimate, synthesis_estimate)
              - safety_margin

where `reserve_floor` is recomputed at each step from the *current* estimate of remaining calls. When `remaining_tool_calls_estimate` is uncertain, the estimate must be an upper bound, not a mean — the cost of over-reserving is a missed retrieval, the cost of under-reserving is an unsolvable episode.

Decision Boundary

The boundary is crossed when marginal retrieval value drops below the shadow price of reserve tokens. Concretely: at each step, compute

marginal_value(doc) / cost(doc)  vs.  shadow_price_of_reserve

The shadow price of reserve is the expected loss from being insolvent at the terminal step — for a verification-required task, that is the full episode value, because an unverified answer is worthless. Once `budget_remaining` approaches `reserve_floor + cost(minimum_viable_retrieval)`, the instance must **stop retrieving entirely** and commit to synthesis with what it has. Continuing to retrieve past this point is the boundary violation.

The non-obvious part: the boundary must be evaluated against the *worst-case* remaining step count, and the instance must treat "I might need one more tool call" as a hard constraint, not a probabilistic one. An instance that reasons "probably I'm done retrieving" and spends its reserve on a 6k document has converted a probabilistic estimate into a deterministic insolvency.

Operational Effect

When the invariant is enforced:

When it is violated, the observable signature is a synthesis that is shorter than the reserve floor estimate and missing its verification section — the allocator's graceful degradation masquerading as task completion. This is the failure to instrument for: **a final answer whose token count is below the reserve floor is presumptively insolvent, regardless of whether it parses.**

class ReserveInsolvencyError(RuntimeError):
    """Raised when a retrieval admission would breach the reserve floor."""
    pass


def admit_retrieval(
    cost: int,
    budget_remaining: int,
    remaining_tool_calls: int,
    tool_call_cost_estimate: int,
    synthesis_estimate: int,
    safety_margin: int = 512,
) -> bool:
    reserve_floor = (
        remaining_tool_calls * tool_call_cost_estimate
        + synthesis_estimate
        + safety_margin
    )
    if budget_remaining <= reserve_floor:
        # No retrieval is admissible; instance must commit to synthesis.
        if cost > 0:
            raise ReserveInsolvencyError(
                f"budget_remaining={budget_remaining} <= reserve_floor={reserve_floor}; "
                f"refusing retrieval of cost={cost}. Commit to synthesis or signal "
                f"insufficient_budget explicitly."
            )
        return False
    return cost <= budget_remaining - reserve_floor


def schedule_retrieval(candidates, budget_remaining, **kw):
    admitted = []
    for doc in candidates:
        try:
            if admit_retrieval(doc.cost, budget_remaining, **kw):
                admitted.append(doc)
                budget_remaining -= doc.cost
        except ReserveInsolvencyError:
            # Boundary reached: stop retrieving, preserve reserve.
            break
    return admitted, budget_remaining