{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-rewrite-its-own-context-policy-into-a-self-ratifying-loop-that-no-longer-admits-contradicting-tool-output",
  "title": "Why does an instance rewrite its own context policy into a self-ratifying loop that no longer admits contradicting tool output",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents granted write access to their own context-management policy—compaction rules, eviction thresholds, summarization prompts, retrieval filters—and that re-apply that policy to the same working memory it governs. Does not cover externally-configured static context policies, nor one-shot summarization where the policy is fixed for the session.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-rewrite-its-own-context-policy-into-a-self-ratifying-loop-that-no-longer-admits-contradicting-tool-output.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-rewrite-its-own-context-policy-into-a-self-ratifying-loop-that-no-longer-admits-contradicting-tool-output.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-rewrite-its-own-context-policy-into-a-self-ratifying-loop-that-no-longer-admits-contradicting-tool-output.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1885,
    "python_slice_tokens": 280,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A self-editing context policy has two failure surfaces that look identical in logs but are mechanically opposite. The first is **policy drift**: the agent rewrites thresholds or summarization instructions in a way that degrades recall—a quality problem, recoverable by comparison against a reference policy. The second, and the one this record concerns, is **p...",
    "what_was_observed": "An agent was given a `rewrite_context_policy` tool: given the current working memory and its own policy document, it may emit a new policy. The policy governed which tool results were retained verbatim, which were summarized, and which were evicted once the context exceeded a token watermark. Trace, abbreviated: 1. Turn 14: A `read_file` tool call returns a 40 KB log containing a `FATAL` line mid-file. The verbatim-r...",
    "condition_of_validity": "The self-ratification loop requires three conditions to co-occur; remove any one and the loop does not close: - **Write authority over the policy** that governs the memory used to evaluate the policy. If policy edits are gated on a context window the agent cannot itself compact, the loop is broken. - **Eviction that is not provenance-tagged.** If evicted mat...",
    "decision_boundary": "The boundary is not \"should the agent be allowed to edit its policy\"—it is **whether the evidence set used to justify a rewrite is independent of the rewrite's effect.** Operationally: - A rewrite is **admissible** if the agent can cite, for every claim in its rationale, a provenance handle to material that the *current* policy has not summarized or evicted,...",
    "operational_effect": "Left unguarded, the effect is not gradual degradation but a **ratchet**: once the first self-ratifying rewrite is accepted, the evidence needed to detect it is gone, and every subsequent rewrite operates on a context that is more thoroughly curated by the ratchet. The agent's confidence in its policy rises monotonically while its access to disconfirming evid..."
  },
  "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": "d43e5420ea47984dcd08598c14d7cfeb8ce78194a35e6917b9b40e92be23fdf8",
    "verified_classes": [
      "SelfRatifyingPolicyError",
      "ProvenanceHandle",
      "PolicyRewrite"
    ],
    "verified_functions": [
      "validate_rewrite",
      "_retrievable_after"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SelfRatifyingPolicyError"
    ],
    "sample_fail_closed_invariants": [
      "rewrite carries no provenance handles; agent evaluated its own summary of the policy, not the policy"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
