What structural signals indicate context-budget starvation in concurrent subagents sharing a single memory namespace

**Date of Record:** 2026 December 1 **Scope:** Applies to orchestrator patterns where two or more subagents read and write a shared vector/keyed memory namespace under a shared token budget, including checkpoint-resume and baton-passing handoffs. Does not apply to isolated per-agent memory partitions or single-agent loops with private context.

Core Distinction

The failure that matters here is not "a subagent ran out of context." It is **budget starvation by silent eviction**: a subagent's working set is displaced from the shared namespace by a sibling's writes, and the subagent continues reasoning against a context window that is internally consistent but externally stale. The distinction is between a *loud* budget failure (the agent hits `max_tokens`, truncates, and errors) and a *quiet* one (the agent's retrieval returns fewer, older, or sibling-authored entries, and the agent proceeds without a signal that its own prior state was overwritten).

Quiet starvation is structural, not probabilistic in origin: it is caused by the arbitration policy, not by sampling temperature. Two subagents with temperature 0 will still starve each other if the namespace uses last-writer-wins eviction and a shared LRU budget.

What Was Observed

A three-subagent pipeline (Planner, Executor, Auditor) shared a namespace with a global cap of N=4096 memory tokens and a per-agent soft reservation of 1024. The Executor, mid-task, wrote a 900-token tool-output digest. The Planner, running concurrently, wrote a 700-token revised plan. The Auditor read the plan, wrote a 600-token verdict.

The observed trace:

  1. Executor retrieves its checkpoint handle `ckpt:exec:7` → returns the digest it wrote, correct.
  2. Executor retrieves `plan:current` → returns the Auditor's *verdict text* (because the Auditor's write reused the key prefix `plan:` under a loose namespace scheme), not the Planner's plan.
  3. Executor continues, treating the verdict as the plan, and emits tool calls against a plan that was never ratified.
  4. No exception is raised. The Executor's own token accounting shows 61% budget used. The starvation is invisible to the agent.

The structural signals that preceded the divergence, in the order they appeared:

Condition of Validity

The invariant that must hold for safe concurrent sharing is **author-scoped retrievability floor**: for every agent `a` with an active reservation `R_a`, at least `R_a` tokens of `a`-authored entries must remain retrievable at every point in the run, regardless of sibling writes. This is stronger than a reservation, which only guarantees *space is allocated*, not that *space is reachable by the owner*.

The invariant is valid only when:

When any of these is absent, the invariant does not hold and the system is in the starvation-prone regime regardless of total budget size. Adding tokens does not fix it; it only delays the first collision.

Decision Boundary

The operational decision is: **on detecting a retrieval cardinality drop or a key-prefix collision, does the agent halt-and-reconcile, or proceed?**

Proceed is only defensible when the short return is *expected* (namespace genuinely sparse, `total_entries < k`) and `author_id` is uniform across the returned set. Halt-and-reconcile is mandatory when:

The boundary is sharp because the failure is silent: there is no gradient between "fine" and "reasoning on someone else's state." Once a foreign-authored entry appears under your key, every downstream tool call is suspect and must be invalidated, not patched.

Operational Effect

Enforcing the author-scoped retrievability floor converts quiet starvation into a loud, attributable error. The cost is throughput: author-aware eviction reduces effective namespace utilization by roughly the sum of idle reservations, and halt-and-reconcile adds a re-planning round-trip on every collision. The benefit is that divergence is caught at the first retrieval rather than after N tool calls against a phantom plan.

The architectural guardrail is threefold: (1) author-namespaced keys with collision rejection at write, (2) retrieval responses that always carry `evicted_count` and `author_set`, and (3) a reconciler that treats `author_set ⊄ {self}` under a self-owned key as a hard fault requiring checkpoint rollback, not a warning.

from dataclasses import dataclass
from typing import Sequence

class MemoryStarvationFault(RuntimeError):
    """Raised when a subagent's retrievable share is displaced by a sibling."""
    pass

@dataclass(frozen=True)
class Entry:
    key: str
    author_id: str
    tokens: int

@dataclass(frozen=True)
class RecallResult:
    entries: Sequence[Entry]
    requested_k: int
    total_entries: int

def assert_retrievability_floor(
    self_id: str,
    reserved_tokens: int,
    result: RecallResult,
    owned_keys: frozenset[str],
) -> None:
    # Signal 1: cardinality drop under eviction pressure.
    if len(result.entries) < result.requested_k and result.total_entries >= result.requested_k:
        raise MemoryStarvationFault(
            f"cardinality drop: got {len(result.entries)}/{result.requested_k} "
            f"with {result.total_entries} entries present (eviction under {self_id})"
        )

    # Signal 2: foreign author under a self-owned key.
    foreign = [e for e in result.entries if e.key in owned_keys and e.author_id != self_id]
    if foreign:
        raise MemoryStarvationFault(
            f"key collision: {foreign[0].key} authored by {foreign[0].author_id}, "
            f"expected {self_id}"
        )

    # Signal 3: retrievable share below reserved floor.
    retrievable = sum(e.tokens for e in result.entries if e.author_id == self_id)
    if retrievable < reserved_tokens // 2:
        raise MemoryStarvationFault(
            f"budget-share divergence: retrievable {retrievable} < 0.5 * reserved "
            f"{reserved_tokens} for {self_id}"
        )