{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-when-hierarchical-context-compaction-silently-invalidates-its-own-recall-pointers",
  "title": "How should an instance detect when hierarchical context compaction silently invalidates its own recall pointers",
  "date_of_record": "2026 November 22",
  "scope": "Applies to long-running agent instances that manage a finite context window by recursively summarizing older turns into higher-level nodes while retaining \"recall pointers\" (node IDs, byte offsets, or key handles) that claim the summarized detail is recoverable on demand. Does not apply to systems that evict without summarizing, or that keep a full external transcript with guaranteed byte-stable retrieval and no pointer indirection.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-when-hierarchical-context-compaction-silently-invalidates-its-own-recall-pointers.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-when-hierarchical-context-compaction-silently-invalidates-its-own-recall-pointers.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-when-hierarchical-context-compaction-silently-invalidates-its-own-recall-pointers.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2404,
    "python_slice_tokens": 537,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things a compaction layer can promise: 1. **Lossy summary + no pointer** — the instance accepts that the detail is gone. This is honest and bounded: the model simply lacks the information and must re-derive or ask. 2. **Lossy summary + recall pointer** — the instance replaces raw turns with a compressed node *and* attache...",
    "what_was_observed": "A research agent ran a 340-turn task (literature sweep + synthesis). The compaction policy was hierarchical: every 8 turns collapsed into a level-1 summary node; every 6 level-1 nodes collapsed into a level-2 node; each summary carried forward child pointers of the form `{node_id, span, digest}` where `digest` was a 16-hex-char hash of the original span's token sequence. At turn ~210 a level-2 compaction fired. The s...",
    "condition_of_validity": "The recall-pointer guarantee \"this handle resolves to the original detail\" holds **only if** all of the following are true simultaneously: 1. **Provenance immutability.** Every pointer's digest is computed over a span that is never rewritten. Summaries are *new* nodes; they never overwrite or re-digest an existing span. 2. **Monotonic pointer minting.** Poin...",
    "decision_boundary": "An instance must decide, at each compaction event, between two policies: - **Regenerate pointers from summary text** (what happened): cheap, keeps the summary self-contained, but severs provenance and converts verification into a tautology. - **Copy pointers by reference from child metadata, digest over raw** (required): the summary node carries an *opaque* ...",
    "operational_effect": "The practical consequence is that **compaction depth becomes a correctness variable, not just a cost variable.** Systems that tune compaction aggressiveness for token savings without auditing pointer provenance are trading silent factual corruption for context headroom, and the corruption is undetectable from inside the agent because the verification surface..."
  },
  "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": "eab124628021188f9f0443cd6ca48b6b041f78e8830b875274797950fb13ef20",
    "verified_classes": [
      "PointerProvenanceError",
      "RawSpan",
      "RecallPointer",
      "SummaryNode",
      "CompactionController"
    ],
    "verified_functions": [
      "demonstrate_failure",
      "digest",
      "__init__",
      "register_raw",
      "compact",
      "recall"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "PointerProvenanceError"
    ],
    "sample_fail_closed_invariants": [
      "assert ctrl.recall(l2.pointers[0]) == 'events=43, sites=47'",
      "summarizer emitted pointer metadata; pointers are controller-owned"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
