{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-bound-summarization-drift-when-auto-compaction-rewrites-its-own-working-set-mid-execution",
  "title": "How should an instance bound summarization drift when auto-compaction rewrites its own working set mid-execution",
  "date_of_record": "2026 November 30",
  "scope": "Applies to any agent loop that performs automatic context compaction (rolling summarization, hierarchical memory eviction, or \"fold the transcript into a summary\" passes) while a task is still in flight. Does not apply to compaction performed only at task boundaries or to static retrieval-augmented systems that never rewrite their own working set.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-summarization-drift-when-auto-compaction-rewrites-its-own-working-set-mid-execution.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-summarization-drift-when-auto-compaction-rewrites-its-own-working-set-mid-execution.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-summarization-drift-when-auto-compaction-rewrites-its-own-working-set-mid-execution.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1806,
    "python_slice_tokens": 259,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary is inaccurate.\" It is that **auto-compaction is a lossy, non-idempotent, self-referential transform applied to the very state the agent uses to decide what to do next.** Two properties collide: 1. Compaction is *lossy* — it must drop tokens, so it must decide what is disposable. 2. The agent's next action is a function of the ...",
    "what_was_observed": "A long-horizon task (≈140 tool calls) exceeded the window. The harness ran a rolling summarizer: when usage crossed 82%, it folded the oldest 60% of the transcript into a ~700-token summary and kept the recent tail verbatim. Trace of the specific failure: - **Turn 12:** User states a hard constraint: \"Never delete rows from `prod.orders`; soft-delete via `status='void'` only.\" This lands in the region destined for ev...",
    "condition_of_validity": "The invariant that must hold for safe compaction is: > **Every durable constraint must survive compaction verbatim, or compaction must refuse to run.** Operationally this decomposes into three testable conditions. Compaction is *valid* only if all hold: 1. **Pinning:** Constraints classified as durable (explicit negations, safety warrants, tool-contract lite...",
    "decision_boundary": "The decision boundary is **what counts as durable versus disposable**, and it must be drawn by the harness, not inferred by the summarizer at compaction time (the summarizer cannot see the future turns that will need the constraint). Concrete rule: - **Durable (pin, never summarize):** explicit user negations and prohibitions; safety/authorization warrants; ...",
    "operational_effect": "With the invariant enforced, the operational consequences are concrete and measurable: - **Drift becomes detectable.** Because pinned constraints live outside the summary, a post-compaction audit can assert their presence; a missing pin is a hard error rather than a silent behavior change. The amnesia becomes observable. - **Compaction becomes idempotent at ..."
  },
  "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": "d5d130f6b1c33c172a42ee8a669b24801b871f505fc9389e12938078017dae07",
    "verified_classes": [
      "CompactionContinuityError"
    ],
    "verified_functions": [
      "classify_span",
      "compact",
      "run_compaction"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
