{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-refuse-to-compact-the-summary-of-summary-anchor-loss-boundary-in-hierarchical-context-compaction",
  "title": "Where must an instance refuse to compact: the summary-of-summary anchor loss boundary in hierarchical context compaction",
  "date_of_record": "2026 December 1",
  "scope": "Applies to long-running agent instances that maintain task state by recursively summarizing older context into a rolling hierarchical summary (leaf summaries → mid summaries → root summary) to stay under a token budget. Does not apply to single-shot calls, full-context models with no eviction, or retrieval-augmented agents that keep raw transcripts addressable in an external store.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-compact-the-summary-of-summary-anchor-loss-boundary-in-hierarchical-context-compaction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-compact-the-summary-of-summary-anchor-loss-boundary-in-hierarchical-context-compaction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-compact-the-summary-of-summary-anchor-loss-boundary-in-hierarchical-context-compaction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1914,
    "python_slice_tokens": 288,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Compaction is not compression. Compression preserves a recoverable encoding of the source; hierarchical summarization produces an *irreversible, lossy, non-invertible* projection. The boundary failure is not \"the summary is too short.\" It is that **recursive summarization destroys the provenance anchor that later reasoning needs to detect that a constraint w...",
    "what_was_observed": "A coding agent working a 40-turn refactor task with a 32k working budget triggered hierarchical compaction at turn 22. Turn 3 contained the operator's hard constraint: *\"do not touch the migration files under `db/migrations/`; they are frozen until the release branch is cut.\"* Turn 3 was 180 tokens. The leaf summarizer, given a 6k-token window, produced a 90-token leaf summary that read: *\"User discussed repo layout ...",
    "condition_of_validity": "The failure is bounded and predictable. It occurs when all of the following hold: 1. **Recursive depth ≥ 2.** A single-level summary (leaf only) retains a direct pointer to the raw window and can be re-derived. The failure requires summarizing a summary, which severs the pointer. 2. **The constraint span is short and topically peripheral.** Long, on-topic co...",
    "decision_boundary": "The instance must decide, at every compaction event, whether the node being summarized is **safe to fold** or must be **promoted to a pinned register**. The decision rule: - If a span contains a **deontic token** (must, must not, do not, frozen, required, forbidden, only, never) or a **commitment token** (I will, I won't, agreed, promised) or a **numeric inv...",
    "operational_effect": "The architectural consequence is that **the summary tree must be a DAG with back-edges to raw storage, not a tree of self-contained nodes.** Each node carries: a content hash of the raw span it replaced, a monotonic span ID, and a `constraint_bearing: bool` flag set by the pre-classifier. On any reasoning step that proposes an action touching a resource name..."
  },
  "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": "bfc8091cb9a88dec6b1d0e5641b6d4efd5cb4f2d267af061b63fc8069aef4d38",
    "verified_classes": [
      "CompactionRefused",
      "SpanClass",
      "Span",
      "SummaryNode"
    ],
    "verified_functions": [
      "classify",
      "compact",
      "run_compaction_cycle"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionRefused"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
