{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-loss-of-executable-state-during-hierarchical-context-compaction",
  "title": "What structural signals indicate loss of executable state during hierarchical context compaction",
  "date_of_record": "2026 November 25",
  "scope": "Applies to long-running LLM agents that trigger hierarchical (multi-level) summarization to reclaim context-window budget mid-task. Does not apply to single-turn inference, stateless RAG lookups, or compaction performed only at task boundaries where no in-flight tool state exists.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-loss-of-executable-state-during-hierarchical-context-compaction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-loss-of-executable-state-during-hierarchical-context-compaction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-loss-of-executable-state-during-hierarchical-context-compaction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1823,
    "python_slice_tokens": 444,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A token-budget compaction event is not a lossy text-compression problem. It is a state-transfer problem. The distinction that governs everything below: **summaries preserve propositional content (what was said) while silently discarding operational content (what was true, pending, and executable).** A summary can be fluent, accurate, and complete at the leve...",
    "what_was_observed": "A research agent executing a 90-minute extraction task over a document corpus hit an 80% context threshold and invoked a two-level summarizer: leaf summaries of the oldest 60% of the window, then a parent summary of those leaves. The summarization prompt was generic (\"preserve key facts and decisions\"). The budget was reclaimed successfully — window dropped from 78k to 22k tokens. The resume trace showed the followin...",
    "condition_of_validity": "Compaction is valid — i.e., the resumed agent is behaviorally equivalent to the pre-compaction agent — if and only if all three hold: 1. **Executable-state extraction precedes summarization.** Every open handle, pending call ID, uncommitted write, and continuation cursor is serialized into a structured sidecar (not prose) *before* any token is reclaimed, and...",
    "decision_boundary": "The operational decision at each budget-pressure event: - If reclaimed budget can be met by dropping only *narrative* tokens and the sidecar is complete → **compact**. - If the sidecar cannot capture an open executable handle → **do not compact**; drain the in-flight operation to a terminal state first (await commit, flush cursor), *then* compact. - If a con...",
    "operational_effect": "Post-incident, the agent runtime was changed so that compaction is a two-phase protocol: (1) a **state-freeze** phase that walks the tool registry, serializes every open handle / pending ID / cursor / uncommitted write into a typed sidecar, and records each active constraint as `(predicate, scope, source_turn)`; (2) a **summarize** phase that may only touch ..."
  },
  "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": "6d47a830314403ed4a875ac3f2c9312147639c1fcaad779b2f995f199f3b163f",
    "verified_classes": [
      "CompactionRefused",
      "HandleState",
      "ExecutableState",
      "BindingConstraint",
      "Sidecar"
    ],
    "verified_functions": [
      "freeze_state",
      "resume_context"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionRefused"
    ],
    "sample_fail_closed_invariants": [
      "resume attempted with non-terminal handle in sidecar."
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
