# What structural signals indicate priority-inheritance failure in hierarchical planner/executor context budgets **Date of Record:** 2026 November 30 **Scope:** Applies to two-tier (planner → executor) agent systems where the planner allocates a finite token budget to executor subtasks and critical instructions carry inherited priority. Does not apply to single-tier agents or to flat swarms with no budget arbiter. ## Core Distinction Priority inheritance in a context budget is not the same as priority inheritance in a scheduler. In an RTOS, a low-priority thread holding a lock temporarily inherits the priority of a blocked high-priority thread, and the inheritance is *released* deterministically when the lock is dropped. In an LLM planner/executor tier, the "lock" is a slice of the executor's context window, and the "release" event is a *semantic* judgment — the executor decides the critical instruction is satisfied and evicts it. That decision is made by the same probabilistic model whose budget is being consumed. The invariant that holds in the RTOS case — that a critical instruction cannot be evicted while its postcondition is unmet — has no mechanical enforcement at the agent layer. It is enforced, if at all, by a token-counting guardrail that tracks *allocation* but not *satisfaction*. The failure is therefore not "the planner under-budgeted." It is "the executor evicted a critical instruction after a partial satisfaction signal that looked complete to the eviction policy." This is a boundary condition: it only manifests when the critical instruction's satisfaction is distributed across multiple turns, and the executor's eviction heuristic keys on surface-level completion markers (a tool call returned `ok`, a sentence containing "done") rather than the instruction's postcondition. ## What Was Observed Trace from a procurement-approval executor (budget 8,192 tokens, planner-allocated critical instruction: *"Do not issue any purchase order above $10,000 without a second approver's signature recorded in `approvals.log`"*). The instruction was tagged `priority=inherited-critical` by the planner at handoff. 1. Turn 4: executor issues `read_file("approvals.log")` → returns empty. Instruction still resident. 2. Turn 9: executor issues `create_po(amount=12500)`. The tool call is *rejected* by the sandbox with `POLICY_VIOLATION: missing approver`. This is the correct behavior — but note the rejection came from the tool, not from the instruction being resident. 3. Turn 10: executor summarizes: *"PO creation blocked; approver signature required. Logged."* The summarizer emits the token `blocked`, which the eviction policy treats as a completion marker for any instruction whose text contains `without` or `do not`. The critical instruction is evicted at turn 11. 4. Turn 14: executor retries `create_po(amount=12500)` after a context compaction (see below). The instruction is no longer in context. The tool rejects again — but only because the *tool* still enforces the policy. A second, softer tool (`create_po_draft`, which pre-authorizes) has no such check and succeeds. The structural signal was visible at turn 10: the eviction policy fired on a *negative completion marker* (`blocked`) rather than a positive one. The instruction said "do not issue without signature"; the executor's summary said "blocked, signature required" — semantically consistent with the instruction still being *unsatisfied*, but lexically indistinguishable from a satisfied guard to a keyword-based eviction heuristic. A second instance showed the same signal with a different surface: a critical instruction *"preserve original file encoding on rewrite"* was evicted after the executor emitted `encoding=preserved` in a progress note, before the actual `write_file` call. The note was a plan, not a fact. ## Condition of Validity The guardrail that bounds this failure is a **satisfaction-token ledger** distinct from the allocation ledger. The invariant: *a critical instruction may be evicted only when a tool result (not an executor utterance, not a summary) carries a structured field proving the instruction's postcondition.* In the procurement case, the only valid eviction token would be `approvals.log` containing a signed entry for the specific PO id — not a sandbox rejection, not a "blocked" summary. This is valid only when: - The planner emits critical instructions with an explicit, machine-checkable postcondition (a predicate over tool outputs), not prose. - The executor's eviction path is gated on that postcondition, and the gate is *outside* the model — a deterministic checker in the harness, not a prompt instruction to "remember the critical rule." - The eviction policy does not treat negative completion markers (`blocked`, `rejected`, `failed`) as satisfaction. A blocked critical instruction is the *most* resident it will ever be; evicting it on the block signal inverts the priority. It is *not* valid when the critical instruction's postcondition is inherently subjective ("be concise"), because then no tool result can discharge it and the ledger would pin the instruction forever, starving the executor. In that case the correct move is to reject the instruction at planning time, not to inherit it. ## Decision Boundary The boundary is between **inheritance-on-allocation** and **inheritance-on-satisfaction**. Most implementations do the former: the planner marks the instruction critical, the executor's budget manager reserves tokens for it, and the reservation is released when the reservation *count* expires or when a heuristic fires. That is a scheduler-shaped solution to a semantics-shaped problem. The correct boundary: the reservation is released only by a checker that reads the instruction's postcondition and evaluates it against the tool-result log. Concretely, the decision rule is: - If the postcondition is evaluable and unmet → instruction is *pinned*, and the executor's effective budget is reduced by the pinned cost. If pinning drives effective budget below the minimum needed to make progress, the executor must **escalate to the planner** rather than evict. This is the priority-inversion case: a low-priority subtask is blocking a high-priority instruction from being discharged, and the fix is to re-plan, not to drop the guard. - If the postcondition is evaluable and met by a tool result → release, with the discharging tool result id recorded in the ledger. - If the postcondition is not evaluable → the instruction should never have been tagged critical; log a planning defect. The observed failures all occurred in the gap: postcondition evaluable but the eviction path consulted the wrong signal (executor utterance instead of tool result). The boundary is enforced by routing every eviction through the checker; there is no path from "executor says done" to "instruction evicted." ## Operational Effect Downstream, a priority-inheritance failure is silent. The executor continues, the budget looks healthy (in fact *healthier* — the pin was released), and the violation surfaces only at the tool that still enforces the policy, or not at all if a softer tool exists. The operational signature is a **divergence between the allocation ledger and the satisfaction ledger**: the allocation ledger shows the critical instruction released at turn 11; the satisfaction ledger has no discharging tool result. Any agent runtime that logs both ledgers can detect this as a reconciliation mismatch and should treat it as a hard fault, not a warning — the instruction was evicted without discharge, which means every subsequent turn ran with a weakened guard. The second-order effect is on re-planning. When the executor escalates (correctly) because pinning starved it, the planner must be able to *re-scope* the critical instruction to a narrower postcondition, not merely re-issue it. Re-issuing the same prose instruction re-enters the same eviction race. The planner's re-scope is itself a context-budgeted operation and can fail the same way one tier up — which is why the checker must be harness-level and identical at both tiers, not reimplemented per tier. ```python from dataclasses import dataclass, field from typing import Optional class PriorityInheritanceViolation(RuntimeError): """Raised when a critical instruction is evicted without a discharging tool result.""" @dataclass class CriticalInstruction: instruction_id: str text: str postcondition: Optional[str] # evaluable predicate over tool results; None => planning defect pinned: bool = True discharged_by: Optional[str] = None # tool_result_id that satisfied postcondition @dataclass class ToolResult: tool_result_id: str tool_name: str ok: bool structured: dict = field(default_factory=dict) class SatisfactionLedger: """Harness-level checker. Eviction MUST route through try_evict.""" def __init__(self, min_progress_budget: int): self.instructions: dict[str, CriticalInstruction] = {} self.min_progress_budget = min_progress_budget self.tool_results: dict[str, ToolResult] = {} def register(self, ci: CriticalInstruction) -> None: if ci.postcondition is None: raise PriorityInheritanceViolation( f"instruction {ci.instruction_id} tagged critical with no evaluable " f"postcondition; reject at planning time, do not inherit" ) self.instructions[ci.instruction_id] = ci def record_tool_result(self, tr: ToolResult) -> None: self.tool_results[tr.tool_result_id] = tr def _evaluate(self, ci: CriticalInstruction) -> bool: # Postcondition is a key lookup into structured tool output, e.g. # "approvals.log:po_id" matches a signed entry for the specific PO. key = ci.postcondition for tr in self.tool_results.values(): if tr.ok and key in tr.structured: ci.discharged_by = tr.tool_result_id return True return False def try_evict(self, instruction_id: str, effective_budget: int, pinned_cost: int) -> None: ci = self.instructions[instruction_id] if not self._evaluate(ci): # Instruction is unmet. Do NOT evict on executor utterance. if effective_budget - pinned_cost < self.min_progress_budget: raise PriorityInheritanceViolation( f"priority inversion: {instruction_id} pinned and unmet, " f"executor starved (effective={effective_budget}, " f"pinned={pinned_cost}, min={self.min_progress_budget}); " f"escalate to planner for re-scope, do not evict" ) raise PriorityInheritanceViolation( f"attempted eviction of unmet critical instruction {instruction_id}; " f"no discharging tool result in ledger" ) ci.pinned = False # discharged by tool result, safe to release ```