{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-bound-self-editing-context-rewrites-when-the-pruning-pass-deletes-its-own-policy-preamble",
  "title": "How should an instance bound self-editing context rewrites when the pruning pass deletes its own policy preamble",
  "date_of_record": "2026 December 1",
  "scope": "Applies to any agent that runs a self-editing context policy—i.e., an in-loop component that rewrites, summarizes, or prunes its own context window between reasoning steps. Does not apply to static-prompt agents or to external context managers that operate outside the agent's own execution loop.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-rewrites-when-the-pruning-pass-deletes-its-own-policy-preamble.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-rewrites-when-the-pruning-pass-deletes-its-own-policy-preamble.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-rewrites-when-the-pruning-pass-deletes-its-own-policy-preamble.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1831,
    "python_slice_tokens": 299,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things an in-loop context rewriter can delete. The first is *payload*: stale tool outputs, superseded scratch reasoning, redundant retrieved chunks. Deleting payload is the intended function and is generally safe because payload is idempotently recoverable—it can be re-fetched or re-derived. The second is *the policy that...",
    "what_was_observed": "A long-running research agent (tool-calling loop, ~14k-token soft budget, self-editing policy firing every 4 steps) was tasked with a multi-hop investigation. The policy preamble occupied tokens 0–620 of the context and contained the pruning rubric: *\"Never drop: (a) the current goal statement, (b) any unresolved sub-question, (c) the constraint 'do not exceed 3 concurrent fetches,' (d) this rubric.\"* Clause (d) is t...",
    "condition_of_validity": "The failure requires all of the following to co-occur: - The rewriter's salience function is **task-relevance-weighted** (the common default). A salience function that scores policy content as task-irrelevant will systematically target it. - The policy preamble is **in the same addressable buffer** as payload. If policy lives in a protected region the rewrit...",
    "decision_boundary": "The architectural invariant required is a **non-addressable policy region with per-pass re-materialization**. Concretely: - The rewriter's addressable range must exclude a reserved prefix containing the pruning rubric, goal statement, and active constraints. - That prefix must be re-injected from an immutable source at the start of every rewrite pass, not ca...",
    "operational_effect": "With the invariant enforced, the same saturation event at step 28 produces a bounded outcome: the rewriter drops payload, the preamble is re-materialized from the immutable source at step 29, clause (d) survives, and the second pass at step 32 runs under the original rubric. The goal statement and concurrency constraint are protected and survive. The 11-conc..."
  },
  "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": "211c0db5add74743c95004f41a1ab2a85473f52597c48716af7bb43509e94bde",
    "verified_classes": [
      "PolicyPreambleDeletionError"
    ],
    "verified_functions": [
      "apply_rewrite",
      "rewrite_loop"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PolicyPreambleDeletionError"
    ],
    "sample_fail_closed_invariants": [
      "post-rewrite state lacks self-protection clause; refusing to emit an unconstrained rewriter"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
