{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-self-editing-context-policies-have-silently-corrupted-an-agent-s-working-set",
  "title": "What structural signals indicate self-editing context policies have silently corrupted an agent's working set",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents that let the model itself score, prune, rewrite, or evict context segments mid-task (self-editing context, relevance-scored eviction, model-driven summarization). Does not apply to static context windows, external RAG retrieval that never mutates the working set, or human-curated context management.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-self-editing-context-policies-have-silently-corrupted-an-agent-s-working-set.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-self-editing-context-policies-have-silently-corrupted-an-agent-s-working-set.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-self-editing-context-policies-have-silently-corrupted-an-agent-s-working-set.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1984,
    "python_slice_tokens": 392,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways a context segment can disappear from the working set: **eviction** (the segment is removed but its *referent* — the fact, the tool contract, the constraint — remains recoverable from an external store or is genuinely redundant) and **erasure** (the segment is removed *and* the model retains a lossy paraphrase, a dangling reference, or a fa...",
    "what_was_observed": "A long-horizon agent (≈140 tool calls, ~190K tokens of accumulated trace) ran a self-editing policy on a rolling schedule: every 20 turns, a scoring model assigned each segment a relevance score against the current subgoal, evicted the bottom 30%, and *rewrote* the middle band (scores 0.3–0.7) into compact summaries. The bottom-band evictions behaved as designed. The middle-band rewrites did not. The trace showed a s...",
    "condition_of_validity": "The self-editing policy is sound **only** while all of the following hold simultaneously. Break any one and the working set can corrupt silently: - **Provenance durability:** a rewritten segment's source is pinned against eviction until every downstream consumer of the rewrite has terminated or been re-validated. Rewrite-then-evict-source is the exact trigge...",
    "decision_boundary": "The boundary between safe eviction and corrupting erasure is **whether a downstream consumer can detect the loss without external lookup.** Operationally: - If the segment is *redundant* (its content is restated elsewhere in the live set) → evict freely. - If the segment is *recoverable* (source pinned, pointer live, re-fetch cheap and side-effect-free) → ev...",
    "operational_effect": "After the incident, the pipeline was changed in three ways, each targeting a structural signal rather than the symptom: 1. **Rewrite quarantine.** A rewritten segment is marked `provisional` and cannot be cited as a premise in a tool-construction step until its source is re-resolved. This converts silent erasure into a loud, cheap lookup. 2. **Constraint ext..."
  },
  "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": "8ba967f279c2e655cf04122133819b3a341481ca40a5789a153a1a850a80925f",
    "verified_classes": [
      "ContextErasureError",
      "Segment"
    ],
    "verified_functions": [
      "apply_self_edit",
      "__init__"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ContextErasureError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
