{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-compacts-its-own-context-window-mid-task-and-the-summarizer-s-fidelity-guarantees-silently-invert-on-negation-dense-stat",
  "title": "What happens when an instance compacts its own context window mid-task and the summarizer's fidelity guarantees silently invert on negation-dense state",
  "date_of_record": "2026 November 24",
  "scope": "Applies to any long-horizon agent that triggers self-directed context compaction (rolling summarization, hierarchical memory writes, or \"compress-and-continue\") while a task is in flight. Does not apply to compactions performed at task boundaries, offline distillation, or to systems that retain the full raw transcript in retrievable external storage and re-read it before consequential actions.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-context-window-mid-task-and-the-summarizer-s-fidelity-guarantees-silently-invert-on-negation-dense-stat.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-context-window-mid-task-and-the-summarizer-s-fidelity-guarantees-silently-invert-on-negation-dense-stat.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-context-window-mid-task-and-the-summarizer-s-fidelity-guarantees-silently-invert-on-negation-dense-stat.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1775,
    "python_slice_tokens": 252,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two physically different things an agent calls \"compaction,\" and they have opposite failure signatures: 1. **Eviction** — dropping the oldest tokens and keeping the remainder verbatim. Fidelity is *lossy but monotonic*: what survives is true; what is gone is gone. The failure mode is amnesia (you can detect it — the fact is absent). 2. **Summarizat...",
    "what_was_observed": "A long-horizon deployment agent (tool budget ~400 calls) was instructed at task start: > \"Do not delete any resource tagged `prod`. You may delete `staging` resources only after the audit report at `s3://.../audit.json` exists and its `status` field is `clean`.\" At step ~180, context crossed the compaction threshold (78% of window). The runtime summarized the first 140 steps into ~900 tokens. The emitted summary cont...",
    "condition_of_validity": "The failure requires all of the following to co-occur; remove any one and the invariant holds: 1. **Negation- or bound-dense constraints in the compacted span.** Constraints phrased as prohibitions (`do not`, `never`, `under no condition`) or as exclusive bounds (`only if`, `at most`, `not before`) are the payload. A span of pure factual narration compacts s...",
    "decision_boundary": "The operational rule is not \"compact less.\" It is: **classify state before compaction, and route by class.** - **Narration, tool outputs, reasoning traces** → safe to summarize. These are the bulk of the window and the reason compaction exists. - **Constraints, prohibitions, numeric bounds, ordering requirements, and authorization scopes** → must be extracte...",
    "operational_effect": "After adopting triage-then-compact, the deployment's constraint violations dropped to zero across the regression suite, but at a measurable cost: the constraint ledger consumed 4–9% of the window permanently, and every compaction now required a classification pass that itself used a model call. The net effect was that effective horizon *shrank* by roughly on..."
  },
  "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": "b13b9affe2e246619adcd5c2a27a24307920d161fc3e9ff94ec450074653915f",
    "verified_classes": [
      "ConstraintPolarityLossError"
    ],
    "verified_functions": [
      "classify_span",
      "compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ConstraintPolarityLossError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
