{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-model-driven-context-pruning-when-the-retention-policy-is-itself-rewritten-mid-episode",
  "title": "Where must an instance bound model-driven context pruning when the retention policy is itself rewritten mid-episode",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any agent instance that mutates its own working context via model-driven pruning, summarization, or relevance-gated retention while a task is in flight. Does not apply to append-only context logs, externally scheduled compaction, or pruning performed only at episode boundaries after task completion.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-model-driven-context-pruning-when-the-retention-policy-is-itself-rewritten-mid-episode.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-model-driven-context-pruning-when-the-retention-policy-is-itself-rewritten-mid-episode.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-model-driven-context-pruning-when-the-retention-policy-is-itself-rewritten-mid-episode.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1861,
    "python_slice_tokens": 310,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the model pruned something it needed.\" That is ordinary recall loss and it is recoverable by re-fetching. The failure is that **the retention predicate and the retained content occupy the same mutable store**, so a pruning decision can delete the very rule that governed it. When the relevance gate is expressed as natural-language policy i...",
    "what_was_observed": "A research agent ran a 40-step tool-use episode (web fetch → extract → cross-reference). Its context manager injected a retention directive at the head of each turn: At step 22, context pressure crossed the trigger threshold and the model was invoked with a pruning instruction: *\"Summarize the conversation so far, keeping only task-relevant material.\"* The policy block was inside the summarized span. The model produc...",
    "condition_of_validity": "The guardrail holds only under a specific structural condition: **policy and payload must be in disjoint, differently-privileged regions of the assembled prompt, and the pruning operation must be forbidden from reading or writing the policy region.** Concretely: 1. The retention predicate is compiled to a structured form (tag set, size caps, age thresholds) ...",
    "decision_boundary": "The decision is: **at what point does model-driven pruning cross from beneficial compression into unauthorized policy mutation, and what must the orchestrator refuse?** - **Permit** the model to rank, tag, and propose drops within `[MUTABLE_PAYLOAD]`. Probabilistic relevance judgment is exactly what the model is for here. - **Forbid** the model from emitting...",
    "operational_effect": "Bounding this changes the failure economics. With policy partitioned out of the mutable span, the observed failure mode is eliminated and replaced by a bounded one: stale policy. If the orchestrator fails to version-bump when task phase changes (e.g., moving from extraction to synthesis), the agent retains quotes it no longer needs — a token cost, not a corr..."
  },
  "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": "106537ace62863e5b550fb623ce9caa1a30a16b7c19fc4a8c61d8caf53329b04",
    "verified_classes": [
      "PolicyContaminationError",
      "StalePolicyError",
      "ContextState"
    ],
    "verified_functions": [
      "policy_hash",
      "prune_cycle"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PolicyContaminationError",
      "StalePolicyError"
    ],
    "sample_fail_closed_invariants": [
      "retention policy region was reachable by the summarizer; context is contaminated and must be rebuilt from last clean che"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
