{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-compact-the-silent-anchor-loss-boundary-in-long-horizon-agent-context-compaction",
  "title": "When must an instance refuse to compact: the \"silent anchor loss\" boundary in long-horizon agent context compaction",
  "date_of_record": "2026 November 17",
  "scope": "Applies to agent runtimes that automatically summarize, truncate, or evict portions of a session transcript once a token budget threshold is crossed, and that must preserve behavioral invariants across the compaction boundary. Does not apply to stateless single-turn inference, to retrieval-augmented systems where the full transcript remains addressable by key, or to compaction that is *lossless* (e.g., exact token-budget re-chunking with no summarization).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-compact-the-silent-anchor-loss-boundary-in-long-horizon-agent-context-compaction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-compact-the-silent-anchor-loss-boundary-in-long-horizon-agent-context-compaction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-compact-the-silent-anchor-loss-boundary-in-long-horizon-agent-context-compaction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1950,
    "python_slice_tokens": 305,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Compaction is usually treated as a **capacity** operation: reduce tokens so the next turn fits. The non-obvious failure is that compaction is also a **semantic** operation: it changes which constraints the model can still *see* when it decides what to do next. These two concerns are conflated because they share a trigger (token count) and a mechanism (summar...",
    "what_was_observed": "In a long-horizon session (≈180 turns) performing a multi-step migration, the runtime compacted at a 60%-of-window threshold. The pre-compaction transcript contained the anchor: > \"Use `staging-eu-2` for all writes. Do **not** use `staging-eu-1`; it was decommissioned on 2026-10-30 and its writes are silently dropped.\" The summarizer produced: > \"Working on staging environment writes for the EU migration.\" Two distin...",
    "condition_of_validity": "The refusal-to-compact rule is valid only under the conjunction below. If any clause fails, ordinary compaction is safe and the rule should not fire (firing it needlessly causes unbounded context growth and its own failure mode). 1. **Irreversibility of consequence.** An action gated by an anchor has an effect that is not locally observable — silent drops, i...",
    "decision_boundary": "The boundary is not \"compact vs. don't.\" It is a three-way decision applied per anchor class, evaluated *before* the summarizer runs: - **Preserve verbatim (pin).** Anchors satisfying the Condition of Validity are extracted and re-injected verbatim outside the summarized region, with a stable tag. They do not count against the summarizable budget; they are p...",
    "operational_effect": "Enforcing this boundary changes three observable properties of the runtime: 1. **Failure latency moves earlier.** Anchor violations that previously surfaced as downstream reconciliation errors (tens of turns later) now surface at compaction time as a refusal or an escalation, when the original context is still present to disambiguate. The cost is more freque..."
  },
  "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": "4345ce0154216f61afb133a3ae39de14f69677f19997a3b3950f03f379f73fdb",
    "verified_classes": [
      "AnchorLossError",
      "Anchor",
      "CompactionPlan"
    ],
    "verified_functions": [
      "must_pin",
      "plan_compaction"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "AnchorLossError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
