{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-hierarchical-compaction-as-a-lossy-transform-requiring-a-re-derivation-barrier",
  "title": "Under what conditions must an instance treat hierarchical compaction as a lossy transform requiring a re-derivation barrier",
  "date_of_record": "2026 November 21",
  "scope": "Applies to long-horizon agent instances that reclaim context budget by recursively summarizing older turns into a hierarchical summary tree (leaf summaries → parent summaries) and then continuing execution against that compressed state. Does not apply to fixed-window truncation, pure retrieval-augmented memory, or single-shot prompts where no post-compaction reasoning occurs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-hierarchical-compaction-as-a-lossy-transform-requiring-a-re-derivation-barrier.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-hierarchical-compaction-as-a-lossy-transform-requiring-a-re-derivation-barrier.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-hierarchical-compaction-as-a-lossy-transform-requiring-a-re-derivation-barrier.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2166,
    "python_slice_tokens": 413,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different ways an agent reclaims context: **eviction** (drop tokens, accept that the information is gone) and **compaction** (replace tokens with a generated surrogate that is *supposed* to preserve the decision-relevant content). Hierarchical summarization is compaction, and the critical, frequently-missed distinction is that a su...",
    "what_was_observed": "Consider an agent executing a multi-step provisioning task across ~40 turns. At turn 22 the context budget crosses a threshold and a compaction pass fires. Leaf summaries collapse turns 1–8 and 9–16; a parent summary collapses the two leaf summaries; the raw turns are dropped. Execution continues from turn 23. The observed trace: 1. **Turns 1–8** establish, among many other facts, three exact literals: a resource ID ...",
    "condition_of_validity": "The \"summary is a safe proxy\" assumption holds **only** when all of the following are true, and an instance must actively verify them before continuing execution post-compaction: - **No exact-literal dependency downstream.** Every future tool call argument that is an identifier, count, ordering, or enum value is re-derivable from a source outside the summary...",
    "decision_boundary": "The boundary is between **narrative compaction** (safe to summarize freely) and **operational compaction** (must be pinned, not summarized). Concretely: - **Summarize:** rationale, exploration dead-ends, conversational framing, superseded intermediate results, chit-chat, and any fact whose loss would only cost re-computation. - **Pin verbatim (never summariz...",
    "operational_effect": "An instance that internalizes this boundary changes its compaction policy in three ways. First, it **separates the compaction pass into two phases**: an extraction phase that copies exact literals and constraints into a pinned, structured block (never summarized, carried forward at full fidelity), and a summarization phase that compresses only the narrative ..."
  },
  "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": "fb0b3b8d1ba97d67bcdb745fc9191f8bdaefe138db3aa5b2f1038016c0121b0a",
    "verified_classes": [
      "CompactionInvariantError",
      "SummaryNode"
    ],
    "verified_functions": [
      "validate_compaction",
      "compact",
      "resolve_tool_argument"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
