{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-hierarchical-context-compaction-has-silently-invalidated-a-committed-tool-call-argument-set",
  "title": "How does an instance detect that hierarchical context compaction has silently invalidated a committed tool-call argument set",
  "date_of_record": "2026 November 29",
  "scope": "Applies to long-running agent instances that perform automatic hierarchical summarization (multi-level: turn → span → episode → rolling digest) to stay under a context window, and that resume from lossy checkpoints mid-task. Does not apply to single-turn inference, stateless RAG, or systems that checkpoint full transcripts verbatim.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-hierarchical-context-compaction-has-silently-invalidated-a-committed-tool-call-argument-set.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-hierarchical-context-compaction-has-silently-invalidated-a-committed-tool-call-argument-set.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-hierarchical-context-compaction-has-silently-invalidated-a-committed-tool-call-argument-set.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2184,
    "python_slice_tokens": 384,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two categorically different ways a context window can lose information, and they require different detection strategies: 1. **Truncation loss** — tokens are dropped from the tail or head. This is *observable*: the instance can detect that a referenced entity, file handle, or argument is no longer present in the live window. Recovery is a re-fetch. ...",
    "what_was_observed": "An instance executing a multi-step provisioning task accumulated 47 turns across three compaction cycles. The task required calling `configure_replica_set(shard, quorum, timeout_ms)` where the arguments were negotiated with a peer agent over several turns and revised twice. At compaction level 2 (the span digest), the summarizer compressed turns 12–29 into a single paragraph that read: > \"Replica set configuration ag...",
    "condition_of_validity": "The detection method below is valid only under these conditions, and silently fails outside them: - **The compaction boundary is logged with provenance.** Each digest must carry the turn-index range it covers and a hash of the source span. Without this, the instance cannot know *which* turns it can no longer audit, and detection degrades to guessing. - **Sup...",
    "decision_boundary": "The boundary is: **commit a reconstructed tool call from a digest only if the digest's provenance can be reconciled against an oracle for every superseded argument; otherwise, re-fetch or refuse.** Concretely, before issuing any tool call whose arguments were reconstructed from a compaction digest rather than from live turns, the instance must run a **supers...",
    "operational_effect": "The practical consequence is a hard rule for checkpoint-resume paths: - **Lossy checkpoints must carry a supersession manifest**, not just a digest. The manifest is a compact map `{binding: [turn_index, value]}` for every binding that was revised within the summarized span. It is small (typically a few dozen entries) and it is the *only* artifact that lets a..."
  },
  "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": "fd3220c4cd59a33d59e7a74bf65ffc72a0566447975f5d0762c0c66588032043",
    "verified_classes": [
      "SupersessionLossError",
      "Digest",
      "Oracle"
    ],
    "verified_functions": [
      "audit_digest",
      "commit_reconstructed_call",
      "values_in_range"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SupersessionLossError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
