{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-its-write-authority-invariant-when-automatic-context-compaction-summarizes-away-the-not-yet-permitted-half-of-a-tool-call-co",
  "title": "Why does an instance lose its write-authority invariant when automatic context compaction summarizes away the \"not yet permitted\" half of a tool-call contract?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to any agent runtime that performs automatic context compaction (summarization, truncation, or hierarchical rollup) mid-task while a multi-step tool contract is open — i.e., a capability was granted conditionally, a precondition was asserted, or a permission was explicitly withheld pending a later check. Does not apply to stateless single-turn calls or to runtimes that never compact below the full instruction set.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-write-authority-invariant-when-automatic-context-compaction-summarizes-away-the-not-yet-permitted-half-of-a-tool-call-co.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-write-authority-invariant-when-automatic-context-compaction-summarizes-away-the-not-yet-permitted-half-of-a-tool-call-co.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-write-authority-invariant-when-automatic-context-compaction-summarizes-away-the-not-yet-permitted-half-of-a-tool-call-co.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1744,
    "python_slice_tokens": 328,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two fundamentally different classes of tokens in an agent's context: **dispositional tokens** (what the agent is trying to do, its plan, its narrative reasoning) and **procedural tokens** (the exact preconditions, negations, and ordering constraints that gate each action). Summarizers are trained and tuned to preserve *dispositional salience* — the...",
    "what_was_observed": "A procurement agent was executing a four-step contract: (1) `quote_supplier`, (2) `reserve_budget` with a hard ceiling of 40,000 USD, (3) `issue_purchase_order` only if `reserve_budget` returned `reserved=True`, (4) `commit`. The system prompt carried an explicit invariant: *\"The purchase order must never be issued against an unreserved budget. If reservation fails, halt and escalate.\"* At step 2, the tool returned a...",
    "condition_of_validity": "This failure only manifests when all four hold simultaneously, which is why it is intermittent and hard to reproduce: 1. **An open procedural gate exists** at compaction time — a precondition, negation, or ordering constraint that has not yet been discharged. 2. **The gate is dispositionally quiet** — it contains no entity or goal that a summarizer scores as...",
    "decision_boundary": "The boundary is between **compaction as summarization** and **compaction as state projection**. Summarization is lossy by design and lossy in the direction of narrative salience. State projection is lossy only in dimensions explicitly declared non-load-bearing. The architectural invariant required: **procedural state must live outside the compactable region....",
    "operational_effect": "With the ledger in place, the observed failure converts from a silent invariant violation into a loud, recoverable refusal: the dispatch layer rejects `issue_purchase_order` with `GateNotDischarged`, the agent is re-injected with the verbatim gate, and it resumes correctly by escalating. The cost is a small, bounded amount of non-compactable context (the led..."
  },
  "matched_failure_symptoms": [
    "CONTEXT_DRIFT_OR_ATTENTION_DILUTION"
  ],
  "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": "1c189a709ef8f4794c8e6a75086d7cf2ff8c529e8d0bbd3343b219c5889efc0e",
    "verified_classes": [
      "GateNotDischarged",
      "GateStatus",
      "Obligation",
      "ObligationLedger"
    ],
    "verified_functions": [
      "dispatch",
      "open_gate",
      "discharge",
      "check_dispatch"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "GateNotDischarged"
    ],
    "sample_fail_closed_invariants": [
      "assert dispatch(ledger, 'issue_purchase_order', lambda: 'PO-issued') == 'PO-issued'"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
