{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-auto-compacts-its-own-transcript-mid-tool-call-and-the-summarizer-drops-the-pending-invocation-s-argument-binding",
  "title": "What happens when an instance auto-compacts its own transcript mid-tool-call and the summarizer drops the pending invocation's argument binding",
  "date_of_record": "2026 November 27",
  "scope": "Applies to any long-horizon agent that performs lossy transcript compaction (rolling summarization, hierarchical memory distillation, or KV-cache eviction with textual re-materialization) while tool calls are in flight. Does not apply to systems that only compact at quiescent turn boundaries with an empty pending-invocation queue.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-auto-compacts-its-own-transcript-mid-tool-call-and-the-summarizer-drops-the-pending-invocation-s-argument-binding.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-auto-compacts-its-own-transcript-mid-tool-call-and-the-summarizer-drops-the-pending-invocation-s-argument-binding.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-auto-compacts-its-own-transcript-mid-tool-call-and-the-summarizer-drops-the-pending-invocation-s-argument-binding.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1969,
    "python_slice_tokens": 309,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary lost detail.\" Lossy summarization is expected and tolerable for *narrative* state — earlier reasoning, resolved sub-goals, abandoned branches. The failure is that compaction is applied uniformly across the transcript without distinguishing **committed narrative** from **live execution frames**. A pending tool invocation is not...",
    "what_was_observed": "A planner agent on a 40-turn horizon dispatched a batch of three tool calls in one assistant message: `read_file(path=\"/etc/svc/limits.yaml\")`, `read_file(path=\"/etc/svc/retries.yaml\")`, and `grep(pattern=\"max_conn\", path=\"/etc/svc/\")`. The harness held the batch open awaiting results. Before results returned, the transcript crossed the compaction threshold (78% of the 200k window, driven by verbose tool outputs from...",
    "condition_of_validity": "The failure requires all of the following to co-occur: 1. **Compaction is triggered by token pressure, not by turn completion.** If compaction only runs when the pending-invocation queue is empty, the frame is never exposed to the summarizer. 2. **Pending invocations are represented in the same channel as narrative** — i.e., as assistant-message text or tool...",
    "decision_boundary": "The architectural line is between **compaction as a transformation of history** and **compaction as a transformation of the whole context**. The former is safe; the latter is the bug. Concretely, the boundary is drawn as follows: - **Compaction input must be a projection that excludes live frames.** The compactor's view is `transcript − pending_invocations −...",
    "operational_effect": "When the boundary holds, long-horizon agents can compact aggressively during tool latency — the highest-value time to reclaim context — without risking execution integrity. Compaction becomes a pure memory-pressure relief valve decoupled from the execution stack. When it fails, the effect is not a visible error but a **silent semantic substitution**: a well-..."
  },
  "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": "77f3772c5d8034ec7824abd39b79d2d9c20f3df0ec6f7bce25acedd244266330",
    "verified_classes": [
      "CompactionFrameLossError",
      "Invocation",
      "CompactionEvent"
    ],
    "verified_functions": [
      "reconcile_after_compaction",
      "resume_with_results"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionFrameLossError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
