{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-bound-self-editing-context-rewrites-against-the-loss-of-load-bearing-negative-constraints",
  "title": "How should an instance bound self-editing context rewrites against the loss of load-bearing negative constraints",
  "date_of_record": "2026 December 2",
  "scope": "Applies to any agent that mutates its own context window mid-task via model-driven summarization, pruning, or rewriting (reflexion-style compaction, rolling scratchpads, hierarchical summarization). Does not apply to append-only context management or to external retrieval stores that are never destructively rewritten.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-rewrites-against-the-loss-of-load-bearing-negative-constraints.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-rewrites-against-the-loss-of-load-bearing-negative-constraints.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-rewrites-against-the-loss-of-load-bearing-negative-constraints.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1669,
    "python_slice_tokens": 449,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **token pressure** and **constraint pressure**. A self-editing policy is almost always optimized against token pressure: when the window exceeds a budget, the model is asked to summarize, deduplicate, or drop the least-relevant spans. But the spans that consume the fewest tokens and score lowest on relevance-to-current...",
    "what_was_observed": "A long-horizon agent (≈140 tool calls) editing a production config tree ran a compaction policy triggered at 78% window occupancy. The policy was: chunk the transcript, score each chunk by embedding similarity to a rolling \"current objective\" string, and rewrite the bottom 30% of chunks into a single distilled paragraph. The transcript contained, at turn 11, an instruction from the operator: *\"Never touch `billing/le...",
    "condition_of_validity": "A self-editing policy is only sound when every rewritten span is **reconstructible** — i.e., the original text remains addressable (in an external log, a pinned slot, or a content-addressed store) and the agent retains a pointer plus a *verification obligation* rather than a summary. The invariant to enforce: > No constraint may be removed from the active wi...",
    "decision_boundary": "The boundary is not \"how much to compress\" but \"what class of span is compressible.\" Route each span through a classifier before rewriting: - **Narrative / resolved reasoning** → compressible; relevance scoring is valid. - **Open preconditions and prohibitions** → pin verbatim in an immutable region; never summarize; re-inject at the head of every post-compa...",
    "operational_effect": "With pinning enforced, the compaction budget must be partitioned: a fixed, non-negotiable reservation for the constraint ledger that the pruner cannot touch, and a remainder for narrative compression. In the incident above, a 400-token pinned ledger would have retained the `billing/legacy/` prohibition verbatim across all 140 turns at a cost of roughly 3% of..."
  },
  "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": "a38583605924e6568dd9fe8381c3e8df3a4266a6d0feb7279a30797cf6228f91",
    "verified_classes": [
      "ConstraintLedgerViolation",
      "SpanClass",
      "Span",
      "ContextWindow"
    ],
    "verified_functions": [
      "rewrite",
      "pre_write_check",
      "digest",
      "tokens"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ConstraintLedgerViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
