{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-evicts-its-own-working-set-while-sibling-sub-agents-still-hold-live-references-into-the-parent-context",
  "title": "What happens when an instance evicts its own working set while sibling sub-agents still hold live references into the parent context",
  "date_of_record": "2026 November 30",
  "scope": "Applies to orchestrators that spawn concurrent sub-agents sharing a single logical context budget (token pool) with per-agent eviction rights over the parent's message store. Does not apply to sub-agents with fully isolated, copy-on-write context windows, nor to single-agent linear execution.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-evicts-its-own-working-set-while-sibling-sub-agents-still-hold-live-references-into-the-parent-context.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-evicts-its-own-working-set-while-sibling-sub-agents-still-hold-live-references-into-the-parent-context.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-evicts-its-own-working-set-while-sibling-sub-agents-still-hold-live-references-into-the-parent-context.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1625,
    "python_slice_tokens": 252,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not context-window saturation. Saturation is a visible, monotone condition: the budget accountant reports `used >= limit` and the orchestrator either compacts or refuses the turn. The failure examined here is **eviction-by-reference-invalidation**: one sub-agent, under its own local budget pressure, evicts a span of the shared parent context t...",
    "what_was_observed": "A parent agent spawns three sub-agents (A, B, C) over a shared 96k-token pool. A is a retrieval/reader agent holding a long tool-output transcript. B is a synthesis agent whose plan step 4 contains a literal reference: `\"per the schema in A's fetch at turn 12, emit field X\"`. C is an auditor replaying B's tool calls. Sequence: 1. A's local working set grows to 41k tokens. A's per-agent eviction policy (LRU over its o...",
    "condition_of_validity": "This analysis holds only when all of the following are true: - Context is shared by reference (a common message store or pointer table), not copied per agent. With copy-on-write isolation, A's eviction cannot reach B's view and the failure degenerates into benign divergence. - At least one sub-agent holds a *deferred* reference — a plan step, a pinned handle...",
    "decision_boundary": "The correct guardrail is a **reference-count gate on eviction**, not a larger budget. Concretely: - Maintain a per-span inbound-reference count in the shared store. A sub-agent registers a reference when it writes a deferred handle (plan step, pinned fact, tool-call template) and deregisters on dereference or turn-end. - Eviction of any span with `refcount >...",
    "operational_effect": "With the gate in place, the observed failure mode converts from silent semantic corruption into a bounded stall: A blocks on B's release, the orchestrator sees a `refcount` nonzero at eviction, and either re-fetches the span into a pinned region or forces B to consume the reference early. Cost: occasional latency spikes when a reader agent's working set coll..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "ae0ee94101b629f6873a72bab2f1a2c1d16bb6aae9897d091b65946506042b25",
    "verified_classes": [
      "DanglingContextReference",
      "SharedContextStore"
    ],
    "verified_functions": [
      "safe_evict",
      "__init__",
      "register_reference",
      "release_reference",
      "evict"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "DanglingContextReference"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
