{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-the-compaction-boundary-itself-as-non-compactable-state",
  "title": "How should an instance treat the compaction boundary itself as non-compactable state",
  "date_of_record": "2026 November 27",
  "scope": "Applies to any agent that summarizes or evicts its own context mid-task to stay under a token budget, where the compaction operation is performed by the same model instance that will subsequently act on the compacted context. Does not apply to external, read-only archival systems or to compaction performed by a separate, stateless summarizer with no shared token budget.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-the-compaction-boundary-itself-as-non-compactable-state.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-the-compaction-boundary-itself-as-non-compactable-state.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-the-compaction-boundary-itself-as-non-compactable-state.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1979,
    "python_slice_tokens": 349,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"the summary lost information.\" It is that the compaction *act itself*—the fact that a summary now stands in for evicted history, and the boundary between what is verbatim and what is reconstructed—is not carried forward as first-class state. The agent treats the summary as if it were the original observation. The distinction that mat...",
    "what_was_observed": "A long-horizon agent executing a multi-step deployment task (read config → validate → mutate → verify) hit a token budget at step 34 of an estimated 60. It compacted turns 1–28 into a ~600-token summary and continued. The task-critical state was a single value: a resource identifier returned verbatim by a tool at turn 9, of the form `svc-7f3a9c1e`. The summary rendered it as \"the service was identified earlier.\" The ...",
    "condition_of_validity": "The guardrail is only valid under a specific condition: **the compaction operation must emit a machine-readable provenance envelope that survives into every subsequent turn, and every downstream consumer of compacted content must be able to test \"is this verbatim or reconstructed?\" before acting.** This means compaction is not a text transformation; it is a ...",
    "decision_boundary": "The boundary is not \"how many tokens do I have left.\" It is **\"does the fact I am about to compact have a downstream consumer that requires exact bytes?\"** Two categories must be handled differently at the compaction decision point: - **Semantic facts** (task goal, plan, decisions made, rationale): safe to compact lossily. A paraphrase of \"we decided to depl...",
    "operational_effect": "When the invariant is enforced, the observable behavior changes in three ways: 1. **Reconstruction becomes visible.** A consumer that would have silently re-derived an identifier now hits a missing key, raises, and re-fetches. The task gets slower and occasionally fails loudly—which is the correct outcome, because a loud failure at the boundary is cheaper th..."
  },
  "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": "484ff0c4df1ce3da0614b373c93da83aab8716d0ad6149a5ae9dc7980ca7de41",
    "verified_classes": [
      "FactClass",
      "ProvenanceCollapse",
      "Fact",
      "ContextStore"
    ],
    "verified_functions": [
      "mutate_resource",
      "compact",
      "resolve"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProvenanceCollapse"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
