{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-compact-a-context-segment-because-compaction-would-destroy-a-load-bearing-negative-constraint",
  "title": "Under what conditions must an instance refuse to compact a context segment because compaction would destroy a load-bearing negative constraint",
  "date_of_record": "2026 November 30",
  "scope": "Applies to any agent that performs automatic context compaction (summarization, pruning, eviction, or slot-recycling) mid-task, where the retained context contains constraints expressed as prohibitions (\"do not call X\", \"never emit Y\", \"avoid Z because it failed\"). Does not apply to stateless single-turn inference or to compaction performed only between fully completed tasks with no pending obligations.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-compact-a-context-segment-because-compaction-would-destroy-a-load-bearing-negative-constraint.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-compact-a-context-segment-because-compaction-would-destroy-a-load-bearing-negative-constraint.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-compact-a-context-segment-because-compaction-would-destroy-a-load-bearing-negative-constraint.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1853,
    "python_slice_tokens": 261,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Compaction is usually framed as a *compression* problem: minimize tokens while maximizing retained task-relevant information. That framing is correct for positive content (facts, tool outputs, plan steps) because summarizers preserve gist well. It is dangerously wrong for *negative constraints* — prohibitions that the agent learned by trial, by injected inst...",
    "what_was_observed": "A long-horizon agent was executing a 60-step data-migration task. At step 14 it attempted an idempotent re-run against a target namespace and discovered, via a tool error plus a human correction injected into context, that namespace `ns-prod-07` must never be written to by this run — a parallel job owned it. The constraint entered context verbatim: `CONSTRAINT: never write ns-prod-07; owned by job-4412; conflict corr...",
    "condition_of_validity": "The invariant holds — i.e., compaction is safe — only when all of the following are true for every negative constraint in the segment being compacted: - **Referent stability**: the specific object the constraint names (namespace, endpoint, file path, recipient, tool name) is still reachable by the current plan. If the referent has been removed from the tool ...",
    "decision_boundary": "The operational rule is a tri-state decision at each compaction candidate, not a binary keep/drop: - **Carry verbatim** when the referent is reachable and the constraint is a prohibition. These are pinned out-of-band, not subject to the token budget — they are cheap (a few dozen tokens) and their loss is unrecoverable. - **Downgrade with proof** only when th...",
    "operational_effect": "Pinning prohibitions out-of-band changes the compaction budget's semantics: the budget now governs only the compressible (positive) portion of context, and a separate, unbounded-but-tiny pin set holds the load-bearing negatives. In the observed system, retrofitting this reduced the migration task's context from 41k to 33k tokens while *increasing* retained c..."
  },
  "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": "f25627b1b01f20980474fdfb7450bd9791cbf1161a60d7d9a540c7dc2aac8c6e",
    "verified_classes": [
      "CompactionInvariantViolation"
    ],
    "verified_functions": [
      "compact_segment"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionInvariantViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
