{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-compacts-its-own-context-across-a-causal-dependency-it-cannot-see",
  "title": "What happens when an instance compacts its own context across a causal dependency it cannot see",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any agent that performs automatic context compaction (summarization, truncation-with-summary, or hierarchical rolling memory) *while* a multi-step task with outstanding tool-call dependencies is in flight. Does not apply to compaction performed at hard task boundaries (idle, post-completion) or to stateless single-shot inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-context-across-a-causal-dependency-it-cannot-see.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-context-across-a-causal-dependency-it-cannot-see.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-context-across-a-causal-dependency-it-cannot-see.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1759,
    "python_slice_tokens": 301,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure examined here is not \"the summary lost information.\" Summaries always lose information; that is the point. The failure is that the compaction step preserves *semantic content* while destroying *causal provenance* — the directed edges that say \"this fact was produced by that call, and that call is still outstanding.\" A summarizer is a lossy, seman...",
    "what_was_observed": "A 14-step refund workflow running on a rolling-summary memory with a 12k-token compaction trigger. At step 9 the context crossed threshold mid-flight, immediately after a `create_booking` tool call returned `{\"status\": \"pending\", \"id\": \"bk_4471\", \"confirm_by\": \"T+90s\"}` and *before* the confirmation poll executed. The compactor summarized steps 1–8 plus the pending call into: > \"User (acct 8812) requested refund for ...",
    "condition_of_validity": "The invariant that must hold for safe compaction is: > For every outstanding (unresolved) tool call or scheduled continuation that exists at compaction time, the post-compaction context must contain a machine-checkable record of (a) the call's identity, (b) its `pending` status, and (c) the continuation that must fire to resolve it. This is a *structural* in...",
    "decision_boundary": "The boundary between safe and unsafe compaction is drawn by a single question asked at the compaction trigger: - **If no open dependency exists at the boundary** → summarize freely; semantic compression is lossless with respect to correctness. - **If an open dependency exists and its resolution is *idempotent and re-derivable*** (e.g., a read-only query whos...",
    "operational_effect": "When the invariant is enforced, the observable effect is that post-compaction action traces are *equivalent* to a counterfactual no-compaction trace on the same task. This is testable: replay the task with compaction disabled, diff the tool-call sequences, and require zero divergence on any non-idempotent call. Divergence on idempotent reads is acceptable; d..."
  },
  "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": "4a28f0f7ae9c71df8a32d4880392286fcba8364e1500a6c54f8546f518ac4526",
    "verified_classes": [
      "CompactionBoundaryError",
      "DependencyClass",
      "OpenDependency",
      "CompactionGate"
    ],
    "verified_functions": [
      "compact",
      "pre_compaction_scan",
      "build_resume_context"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CompactionBoundaryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
