{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-compacts-its-own-context-and-the-summarizer-drops-a-load-bearing-constraint",
  "title": "What happens when an instance compacts its own context and the summarizer drops a load-bearing constraint",
  "date_of_record": "2026 November 30",
  "scope": "Applies to long-horizon agents that perform in-loop context compaction (lossy summarization + retrieval backfill) to survive context-window saturation. Does not apply to agents that hard-truncate, that run with unbounded context, or that delegate compaction to an external, verifiable checkpoint store.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-context-and-the-summarizer-drops-a-load-bearing-constraint.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-context-and-the-summarizer-drops-a-load-bearing-constraint.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-its-own-context-and-the-summarizer-drops-a-load-bearing-constraint.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1899,
    "python_slice_tokens": 364,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two mechanically different ways an agent \"forgets.\" **Eviction** removes tokens and leaves a gap the agent can detect (the message is gone, the tool result is absent). **Compaction** replaces tokens with a *plausible synthesis* — a summary that reads as authoritative, is grammatically complete, and carries no marker of what it dropped. Eviction fai...",
    "what_was_observed": "A planner/executor agent ran a 40-step migration task. At step 22 the context hit 82% of window. The compaction policy fired: summarize turns 1–14 into a 900-token digest, keep turns 15–22 verbatim, and index dropped turns into a vector store for backfill. The summarizer was instructed to \"preserve task state and decisions.\" It faithfully preserved: the target schema, the completed steps, the file paths touched, the ...",
    "condition_of_validity": "The failure is bounded by a precise condition. Let $C$ be the set of constraints active at compaction time, and $R$ the set of constraints that appear as an explicit referent in any post-compaction turn or retrieval query. The compaction is **loss-safe** iff $C \\subseteq R \\cup S$, where $S$ is the set of constraints the summarizer retains. The failure occur...",
    "decision_boundary": "The boundary between a safe and unsafe compaction is whether constraints are treated as **summarizable state** or as **pinned invariants**. - **Summarizable:** task progress, completed steps, file paths, open subtasks, intermediate results, exploratory dead-ends. These have retrieval gravity (later steps reference them) and lose little when compressed. - **P...",
    "operational_effect": "With pinning + pre-action re-assertion, the migration run's step 31 write is caught at the gate: the executor checks `INSERT INTO staging.accounts` against the pinned prohibition, halts, and reroutes to `staging_shadow`. The cost is bounded — a few hundred tokens of pinned constraints held verbatim across every compaction, plus one cheap check per mutating c..."
  },
  "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": "1b76bd7c9bcd513584773e6d260081732bc3b857d4a024c320b7da0afff2d442",
    "verified_classes": [
      "ConstraintLossError",
      "Constraint",
      "CompactionResult"
    ],
    "verified_functions": [
      "verify_compaction",
      "pre_action_gate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ConstraintLossError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
