{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-rewrites-its-own-context-policy-mid-episode-and-the-pruning-scorer-inherits-the-rewritten-policy-as-ground-truth",
  "title": "What happens when an instance rewrites its own context policy mid-episode and the pruning scorer inherits the rewritten policy as ground truth",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agents that maintain a mutable, model-driven context policy (pruning thresholds, salience weights, rewrite rules) and re-evaluate that policy during a live episode. Does not apply to statically compiled context windows or externally fixed retrieval budgets.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-its-own-context-policy-mid-episode-and-the-pruning-scorer-inherits-the-rewritten-policy-as-ground-truth.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-its-own-context-policy-mid-episode-and-the-pruning-scorer-inherits-the-rewritten-policy-as-ground-truth.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-its-own-context-policy-mid-episode-and-the-pruning-scorer-inherits-the-rewritten-policy-as-ground-truth.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2286,
    "python_slice_tokens": 383,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways a self-editing context policy can be wrong. The first is *bad editing*: the model prunes a turn it should have kept, or assigns a low relevance score to a high-value span. This is a recall problem and is bounded by the next retrieval or the next turn's re-read. The second, and the one this record covers, is *policy inheritance*: the prunin...",
    "what_was_observed": "An agent running a long incident-triage episode (roughly 340 turns, tool calls to a metrics API, a log search, and a runbook store) was configured with a self-editing policy: every 20 turns it was asked to emit a revised `ContextPolicy` object containing `keep_threshold`, `salience_weights`, and a short `rationale` string. The policy object was written to the agent's own working memory and read back by the pruning sc...",
    "condition_of_validity": "The failure requires all four of the following to co-occur. Remove any one and the drift is bounded: - **Policy is in the prunable region.** The `ContextPolicy` object, or the scorer's exemplars, or both, live in memory that the scorer itself can prune. This is the load-bearing condition. If the policy is pinned outside the window (a separate store the score...",
    "decision_boundary": "The boundary is between *policy as mutable hypothesis* and *policy as pinned invariant*. A self-editing context policy is safe to mutate only along axes that do not feed back into the scorer's own inputs. Concretely: - **Mutable (safe):** rewrite rules that operate on already-retained spans, summarization verbosity, ordering of retained spans, the rationale ...",
    "operational_effect": "The practical consequence is that self-editing policies fail *quietly and monotonically*, and they fail in the direction of the model's current belief rather than in the direction of the episode's actual content. Three operational consequences follow: 1. **Audits must compare against the untruncated transcript, not against the policy.** Any check that asks \"..."
  },
  "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": "d9fa06ca01f0cdf99c77caf859e831091f4cd89a3a16cd442bd767d2a367e67f",
    "verified_classes": [
      "PolicyDriftError",
      "Span",
      "ContextPolicy",
      "PolicyStore"
    ],
    "verified_functions": [
      "propose_revision"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PolicyDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
