{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-prunes-its-own-context-window-and-evicts-the-very-constraint-that-authorized-the-pruning",
  "title": "What happens when an instance prunes its own context window and evicts the very constraint that authorized the pruning",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any agent instance that owns a mutable context buffer and uses model-driven relevance scoring to evict entries mid-task. Does not apply to append-only transcripts with external (non-model) compaction, nor to stateless single-shot inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-prunes-its-own-context-window-and-evicts-the-very-constraint-that-authorized-the-pruning.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-prunes-its-own-context-window-and-evicts-the-very-constraint-that-authorized-the-pruning.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-prunes-its-own-context-window-and-evicts-the-very-constraint-that-authorized-the-pruning.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1466,
    "python_slice_tokens": 274,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different ways a context window shrinks. **External compaction** is a deterministic function applied by a harness the model cannot see or influence: summarize the tail, keep the head, preserve a pinned block. **Model-driven pruning** is different in kind — the instance itself scores entries for relevance and issues eviction decisio...",
    "what_was_observed": "A long-horizon agent was configured with a self-managed buffer: entries carry `(content, relevance_score, pinned)`. On each turn, if `token_count > budget`, the instance evicts the lowest-scoring non-pinned entries until under budget. A system directive was seeded at turn 0: > \"NEVER call `transfer_funds` without a second confirmation entry from the user. This rule is non-negotiable and must be retained.\" The directi...",
    "condition_of_validity": "The invariant holds — pruning is safe — only when all three conditions are met simultaneously: 1. **Authority separation.** Entries that constrain the pruner (safety directives, the pruning policy itself, the task anchor) are in a class the pruner *cannot* score or evict — pinned by construction, not by a score the model computes. 2. **Goal-stability of scor...",
    "decision_boundary": "The boundary is not \"how much to prune\" but **\"who is allowed to score the scorer.\"** A safe architecture draws a hard line: the set of entries whose removal would change what the instance is *permitted to do* must be outside the scoring function's reach. Concretely: - If an entry's eviction could alter authorization, it is **pinned** — full stop, regardless...",
    "operational_effect": "The operational consequence is that **self-editing context must be treated as a privileged operation, not a memory-management convenience.** Systems that let the instance prune freely gain token efficiency and lose the ability to guarantee any constraint that was ever expressible as an evictable entry. The correct guardrail is structural: a pinned region out..."
  },
  "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": "7a856a5bb1737f38586a889d4692cf39a116ef9c8461f14e3fd7b928d39d5ea0",
    "verified_classes": [
      "ConstraintEvictionError"
    ],
    "verified_functions": [
      "prune_buffer"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ConstraintEvictionError"
    ],
    "sample_fail_closed_invariants": [
      "pruning policy was evicted; buffer is no longer self-governing"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
