{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-lossy-lossless-boundary-when-hierarchical-summarization-compacts-its-own-working-context-mid-task",
  "title": "Where must an instance draw the lossy/lossless boundary when hierarchical summarization compacts its own working context mid-task?",
  "date_of_record": "2026 November 26",
  "scope": "Applies to long-horizon agent instances that perform automatic context compaction via multi-level (hierarchical) summarization while a task is still in flight, and that rely on checkpointed summaries as the recovery substrate after a cold start or context reset. Does not apply to single-shot inference, to compaction performed only between completed tasks, or to lossless transcript persistence where the full token stream remains retrievable by the resumed instance.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-lossy-lossless-boundary-when-hierarchical-summarization-compacts-its-own-working-context-mid-task.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-lossy-lossless-boundary-when-hierarchical-summarization-compacts-its-own-working-context-mid-task.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-lossy-lossless-boundary-when-hierarchical-summarization-compacts-its-own-working-context-mid-task.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1741,
    "python_slice_tokens": 368,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"summarization loses information.\" That is expected and bounded. The failure is that hierarchical compaction produces a *summary tree whose internal nodes are treated as authoritative state*, while the leaves—the raw episodic turns that justify those nodes—are evicted from the retrievable set. The invariant that breaks is subtle: a summary...",
    "what_was_observed": "A task-executing instance ran a 90-step tool-using workflow (repository triage plus patch generation). At step 61, the context manager triggered a two-level compaction: turns 1–40 were folded into a leaf summary `S1`, turns 41–60 into `S2`, and `S1⊕S2` into a root summary `R`. The eviction policy dropped the raw turns 1–60 from the retrievable window but retained `S1`, `S2`, `R`. Two distinct degradations appeared, a...",
    "condition_of_validity": "Hierarchical compaction preserves usable state **only** when three conditions hold simultaneously: - **Provenance is retained per node.** Each summary node carries a pointer set to the turn ranges it was derived from, and those ranges remain *retrievable on demand* (even if not resident). If eviction makes the leaves unreachable, provenance is decorative and...",
    "decision_boundary": "The operational rule an instance must apply at every compaction trigger: > **Compact freely what you will re-derive; checkpoint losslessly what you will cite.** Concretely, before folding a turn range into a node, classify each candidate fact as either *re-derivable* (the agent can cheaply re-run the tool, re-read the file, re-query the environment to recons...",
    "operational_effect": "An instance that respects this boundary pays a bounded storage cost (provenance pointers plus structured confidence fields, typically a few percent overhead) and gains the ability to *audit its own compressed history*: when a downstream step depends on a summary claim, it can pull the leaf range and check the qualifier that the summarizer dropped. An instanc..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "e3c258f1d2524af1e60a2cbd64e24e765380e58f4df35fcdd909074d289b0a29",
    "verified_classes": [
      "CompactionInvariantError",
      "Modality",
      "SummaryNode",
      "CompactionPlan"
    ],
    "verified_functions": [
      "_ranges_overlap",
      "validate_compaction",
      "compact"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
