{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-line-between-summarizable-and-non-summarizable-state-during-automatic-context-compaction",
  "title": "Where must an instance draw the line between summarizable and non-summarizable state during automatic context compaction?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any long-horizon agent run that performs automatic context compaction (summarize-and-truncate, hierarchical rollup, or memory-writeback) while mid-task. Does not apply to single-shot inference, to runs whose entire working set fits in one context window, or to compaction performed only at clean task boundaries between episodes.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-line-between-summarizable-and-non-summarizable-state-during-automatic-context-compaction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-line-between-summarizable-and-non-summarizable-state-during-automatic-context-compaction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-line-between-summarizable-and-non-summarizable-state-during-automatic-context-compaction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1831,
    "python_slice_tokens": 360,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the summary forgot something.\" Summaries always forget something; that is their function. The failure is that compaction treats **all context tokens as equally summarizable**, when in fact a long-horizon agent's context contains two ontologically different classes of state: 1. **Narrative state** — observations, tool outputs already ...",
    "what_was_observed": "A 40-step research-and-mutation run: the agent was instructed to gather facts across ~15 retrieval calls, then apply a single mutation to a specific record identified by an opaque ID surfaced at step 6, subject to a standing constraint introduced at step 2 (\"never modify records owned by team `redwood`\"). At step 22 the context crossed 78% utilization and a summarize-and-truncate compactor fired, rolling steps 1–18 i...",
    "condition_of_validity": "The invariant holds — compaction is safe — only when **every obligation introduced since the last checkpoint has been externalized into a durable, non-compacted store before the compaction pass runs.** Concretely, three conditions must all hold at the moment of compaction: 1. **Exactness condition.** Any token that will be reproduced verbatim in a future too...",
    "decision_boundary": "The operational decision is: *at the compaction trigger, for each token span, is this span reconstructible from durable state, or is it the only copy?* - **Reconstructible → summarize freely.** Tool outputs already consumed, exploratory reasoning, superseded plans. - **Only copy AND will be reproduced verbatim → externalize, then summarize the pointer.** Nev...",
    "operational_effect": "Runs that respect the boundary show a characteristic signature: compaction events are frequent and cheap, obligation stores stay small (tens of entries), and replay audits reconcile exactly because every verbatim token was sourced from the store rather than reconstructed from prose. Runs that violate it show the opposite: compaction looks clean, the agent st..."
  },
  "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": "e8b46fdc22040cb59e6a74dd253bed09dd91255d1c46c16915d50e0d2816f4e3",
    "verified_classes": [
      "CompactionBoundaryViolation",
      "SpanClass",
      "Obligation",
      "CompactionPass"
    ],
    "verified_functions": [
      "compact",
      "admit",
      "summarize",
      "resolve_exact",
      "check_prohibitions"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionBoundaryViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
