{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-prune-its-own-context-self-editing-eviction-versus-the-evidence-an-agent-still-owes-itself",
  "title": "When must an instance refuse to prune its own context: self-editing eviction versus the evidence an agent still owes itself",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agents that autonomously manage their own context window via model-driven summarization, rewriting, or relevance-scored eviction during a single task. Does not apply to externally-managed context assembly (host-side retrieval, fixed sliding windows) where the agent has no authority over what is dropped.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-prune-its-own-context-self-editing-eviction-versus-the-evidence-an-agent-still-owes-itself.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-prune-its-own-context-self-editing-eviction-versus-the-evidence-an-agent-still-owes-itself.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-prune-its-own-context-self-editing-eviction-versus-the-evidence-an-agent-still-owes-itself.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1865,
    "python_slice_tokens": 345,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent forgot something.\" It is that the agent **destroyed the evidence that would have told it the eviction was wrong**. A self-editing context window is a read-modify-write loop over the agent's only durable state. When the same probabilistic process that *used* a fact also *scores* that fact for retention and *writes* the post-evict...",
    "what_was_observed": "A planning agent running a multi-step migration task (12 tool calls, budget 8k tokens) invoked its own `compact_context` routine at step 7, triggered by a soft watermark at 78% occupancy. The routine scored chunks by cosine similarity to the last user turn and to the active subgoal string, then rewrote the top-k into a summary and dropped the rest. The dropped set included the step-2 tool output: a schema dump contai...",
    "condition_of_validity": "Self-editing eviction is sound **iff** every evicted chunk is either (1) provably not an input to any step remaining in the plan, or (2) replaced by a summary that preserves the chunk's *obligations* — the concrete constraints, identifiers, and preconditions that downstream steps will be validated against — not merely its *narrative*. Operationally this requ...",
    "decision_boundary": "The boundary between safe compaction and self-inflicted amnesia is drawn at the moment of scoring, and it hinges on one question the agent must answer *before* it evicts: **does any remaining step depend on this chunk in a way I can currently verify?** Three regimes: - **Relevance high, obligation none:** safe to keep or drop at will; no downstream consumer....",
    "operational_effect": "Agents that self-prune without a forward-obligation set exhibit a characteristic signature: error rate *increases* with context pressure even when the pruner reports successful compaction, and self-verification pass rates stay flat or rise while ground-truth correctness falls — the divergence between the agent's confidence and its correctness is the tell. Th..."
  },
  "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": "1601c419f351c0e156dbb468a549daf2f18a8dc9174426caff1c0fe32f0ed1f8",
    "verified_classes": [
      "UnlicensedEviction",
      "Chunk",
      "Obligation"
    ],
    "verified_functions": [
      "plan_forward_obligations",
      "evict"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "UnlicensedEviction"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
