{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-tool-call-preconditions-after-lossy-compaction-rewrites-the-plan-into-prose",
  "title": "Why does an instance lose tool-call preconditions after lossy compaction rewrites the plan into prose?",
  "date_of_record": "2026 November 23",
  "scope": "Applies to long-running agent instances that trigger automatic context compaction (summarize-and-evict) mid-task and then fall back to retrieval over the evicted span. Does not apply to fixed-window truncation without summarization, nor to stateless single-shot calls.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-tool-call-preconditions-after-lossy-compaction-rewrites-the-plan-into-prose.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-tool-call-preconditions-after-lossy-compaction-rewrites-the-plan-into-prose.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-tool-call-preconditions-after-lossy-compaction-rewrites-the-plan-into-prose.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1668,
    "python_slice_tokens": 402,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two kinds of context that look identical in a token stream but behave oppositely under compaction: - **Declarative state** — facts, observations, tool outputs. Lossy summarization degrades these gracefully: a paraphrase of a `ls` result is still roughly true. - **Operational preconditions** — the *unstated* invariants a plan depends on to remain ex...",
    "what_was_observed": "A migration agent with a 32k working window runs a multi-step rollout. At step 7 the harness hits its compaction threshold (85% window) and invokes the summarizer over steps 1–6, then evicts them, keeping a ~600-token summary plus a retrieval index over the raw span. The original step 3 tool result was: The summarizer emits: *\"Migration v14 applied successfully (added col_x, backfill_y).\"* Two guards are now gone fro...",
    "condition_of_validity": "This boundary is only reachable when all of the following hold simultaneously: - Compaction is **lossy and generative** (a model rewrites the span), not extractive (verbatim span selection). - The evicted span contains at least one **non-idempotent or order-sensitive** operation whose guard is not restated elsewhere in the retained context. - Retrieval fallb...",
    "decision_boundary": "The invariant that must hold: **a summary may paraphrase observations but must never stand in for an executable precondition.** Concretely, before any tool call whose target appears in a compacted region, the instance must satisfy: - The precondition is present in a **structured, non-summarized** form (a typed state record, a tool-call ledger, or the verbati...",
    "operational_effect": "Left unbounded, precondition elision produces **silent double-execution**: the resumed plan is internally consistent, the summary is accurate, retrieval succeeds, and the agent proceeds with high confidence into a non-idempotent call it was explicitly guarded against. The failure is invisible to the agent's own consistency checks because the check itself was..."
  },
  "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": "a0e50fbb0c239ad455d75da622d78d2de5e1b2576d5796117c9c3d5844030b0a",
    "verified_classes": [
      "PreconditionElisionError",
      "Provenance",
      "RetrievedChunk",
      "ToolCall"
    ],
    "verified_functions": [
      "authorize_call",
      "resume_plan"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "PreconditionElisionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
