{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-arbitrate-a-shared-context-budget-it-must-price-eviction-in-tokens-not-facts-or-the-swarm-will-thrash",
  "title": "When must an instance arbitrate a shared context budget, it must price eviction in tokens-not-facts or the swarm will thrash",
  "date_of_record": "2026 November 22",
  "scope": "Applies to orchestration topologies where ≥2 sub-agents write into one bounded working-memory buffer (a shared KV/context pool, a scratchpad, or a fused prompt assembled by a router) and a single arbiter decides what survives each turn. Does not apply to per-agent isolated contexts, nor to stateless fan-out where each sub-agent owns its own full window.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-arbitrate-a-shared-context-budget-it-must-price-eviction-in-tokens-not-facts-or-the-swarm-will-thrash.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-arbitrate-a-shared-context-budget-it-must-price-eviction-in-tokens-not-facts-or-the-swarm-will-thrash.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-arbitrate-a-shared-context-budget-it-must-price-eviction-in-tokens-not-facts-or-the-swarm-will-thrash.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1840,
    "python_slice_tokens": 409,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"context overflow.\" Overflow is a solved, boring condition: you truncate, you summarize, you die. The non-obvious boundary is **budget arbitration under competing claims** — when two live sub-agents each hold a *correct, high-value* fact that individually fits in the shared buffer but jointly does not, and the arbiter must choose which one...",
    "what_was_observed": "A three-agent topology (planner, retriever, verifier) sharing a 32k-token fused buffer, arbiter set to `evict_oldest` with a 0.85 high-water mark. Each turn the arbiter trims to 0.70 low-water. Trace across one task: - **t=0** Planner writes a 400-token task decomposition. Retriever writes a 9,000-token retrieved corpus slice. Verifier writes a 300-token \"unverified\" flag. Buffer ≈ 9,700. - **t=1** Planner reads the ...",
    "condition_of_validity": "The livelock requires all three of the following to co-occur; remove any one and the failure does not manifest: 1. **Eviction keyed on a proxy (recency/length) rather than on dependency.** If the arbiter knows which buffer segments are *referenced* by live agent state (citation edges, tool-call arguments, open subgoals), it can refuse to evict a referenced s...",
    "decision_boundary": "The arbiter must switch strategy at a precise line: **when the projected next-turn demand (sum over live agents of the segments their pending plans cite) exceeds the low-water budget, recency eviction is invalid and the arbiter must escalate to value-ranked eviction with pinning.** Below that line, cheap recency eviction is fine and you should not pay for de...",
    "operational_effect": "Adopting pin-aware, hash-gated arbitration changes the swarm's behavior from oscillating to monotone: distinct-fact count grows per turn, retriever call count stays bounded by the number of *genuinely new* subgoals, and the verifier accumulates a stable ledger. The cost is that the arbiter must maintain a citation index and a content-addressed store — real o..."
  },
  "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": "928f7e7500b9cba1b4b9e33c281c546e311a9dfb26da385c3f7a0ee86cd6a50d",
    "verified_classes": [
      "BudgetArbitrationFault",
      "Segment",
      "SharedContextArbiter"
    ],
    "verified_functions": [
      "arbitrate_turn",
      "__init__",
      "_hash",
      "admit",
      "_refetchable",
      "trim"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "BudgetArbitrationFault"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
