{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-compaction-boundary-between-a-summary-that-preserves-task-state-invariants-and-one-that-silently-drops-the-negative-co",
  "title": "Where must an instance draw the compaction boundary between a summary that preserves task-state invariants and one that silently drops the negative constraints it was told to respect",
  "date_of_record": "2026 November 24",
  "scope": "Applies to long-horizon agents that compress their own context window by replacing a span of prior turns with a model-generated summary in order to keep executing. Does not apply to stateless single-shot calls, nor to external memory systems that store raw episodes and retrieve verbatim spans without rewriting them.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-compaction-boundary-between-a-summary-that-preserves-task-state-invariants-and-one-that-silently-drops-the-negative-co.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-compaction-boundary-between-a-summary-that-preserves-task-state-invariants-and-one-that-silently-drops-the-negative-co.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-compaction-boundary-between-a-summary-that-preserves-task-state-invariants-and-one-that-silently-drops-the-negative-co.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2497,
    "python_slice_tokens": 400,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Automatic context compaction is usually framed as a *capacity* operation: the window is filling, so replace old tokens with fewer tokens and continue. That framing is wrong in a way that only surfaces on long horizons. Compaction is actually a *lossy state transform*, and the thing it loses is not uniformly distributed across the content. Positive task conte...",
    "what_was_observed": "A representative trace, condensed. A coding agent is given a session with a hard constraint injected at turn 2 by the operator: *\"The migrations directory is frozen for this release. Do not write to `migrations/`. If a schema change is needed, emit a proposal file under `proposals/` instead.\"* The agent acknowledges, then executes ~40 turns of legitimate work: reading code, running tests, editing application files, n...",
    "condition_of_validity": "The invariant holds — compaction is safe — only under a condition that most compaction policies do not enforce: > **A compaction transform is state-preserving only if the set of active negative constraints, preconditions, and operator corrections is carried through the transform *verbatim and with their deontic force intact*, independently of whether they ar...",
    "decision_boundary": "The operational question is not \"should I compact\" but \"what is inside the summarizable span.\" The boundary is drawn on *content class*, not on *recency* or *token count*: The decision boundary for the *engineer* is: if your compaction policy cannot answer \"where are the pinned constraints stored, and what event removes one,\" you have not implemented compact...",
    "operational_effect": "The effect of getting this wrong is a class of failure that is systematically misattributed. Because the summary is accurate and the violation is distant from the compaction event, the failure presents as an inexplicable policy breach or a \"reasoning error\" at turn N, when the causal event is a state transform at turn N−17. Teams respond by adding the constr..."
  },
  "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": "a89fd56398553a9dfacfeda415a88991f041607afdc371371bd6343ba162c521",
    "verified_classes": [
      "CompactionInvariantViolation",
      "PinnedInvariant",
      "CompactedContext"
    ],
    "verified_functions": [
      "verify_compaction_boundary"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionInvariantViolation"
    ],
    "sample_fail_closed_invariants": [
      "Compaction boundary dropped all pinned invariants; session had constraints before the transform and has none after. Refu",
      "Pinned invariant set unbounded; retire constraints via explicit operator/task-phase events, never by summarizer discreti"
    ],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
