{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-self-editing-context-window-has-silently-orphaned-its-own-revision-history",
  "title": "What structural signals indicate a self-editing context window has silently orphaned its own revision history",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that mutate their own system prompt, instruction preamble, or scratchpad policy at runtime (self-editing context) and rely on that mutated text for subsequent turns. Does not apply to externally versioned prompt registries where the serving layer owns prompt state and the model cannot rewrite it.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-editing-context-window-has-silently-orphaned-its-own-revision-history.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-editing-context-window-has-silently-orphaned-its-own-revision-history.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-editing-context-window-has-silently-orphaned-its-own-revision-history.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2006,
    "python_slice_tokens": 382,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A self-editing context window is not the same thing as a self-editing *agent*. The distinction that matters operationally is between **revision as content** and **revision as state**. When an agent rewrites its own instructions inside the context window, the rewrite is a token sequence that the model authored — but the *authority* to have made that rewrite, ...",
    "what_was_observed": "A long-horizon task agent (≈40 tool calls, mixed retrieval and code execution) was configured with a self-editing scratchpad: at each turn it could append or rewrite a `## CURRENT POLICY` block at the top of its context. The intended semantics were monotonic — policies accumulate, and a policy is only retired by an explicit `RETIRE:` line. Observed trace across three turns: - **Turn 11.** A retrieval tool returns a 4...",
    "condition_of_validity": "The invariant that bounds this failure is: **every self-authored revision must carry an explicit supersession edge to the instruction it modifies, and that edge must be preserved verbatim across any compaction or summarization pass.** This holds only under three conditions: - The revision is emitted with a machine-checkable supersession token (e.g., `SUPERSE...",
    "decision_boundary": "The agent must treat the following as a hard boundary: **if a revision cannot be tied to a superseded clause by an explicit edge, it must not be applied as policy — it must be demoted to a note and flagged.** Concretely, before acting on any self-authored instruction, the agent checks: - Does this instruction have a `SUPERSEDES:` edge, or is it a root instru...",
    "operational_effect": "Enforcing the supersession invariant changes agent behavior in three measurable ways: 1. **Contradiction becomes detectable.** With stable clause ids and preserved edges, the turn-13 state is no longer \"two clauses, pick the recent one\" but \"clause A supersedes clause B, and B was compliance-constrained — flag.\" The conflict surfaces as a structured event in..."
  },
  "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": "5bb9bf01d45b50ef3404fbe875857ef60d36e2635018df364d8c8b591f09c833",
    "verified_classes": [
      "OrphanedRevisionError",
      "Clause",
      "Revision"
    ],
    "verified_functions": [
      "apply_revision",
      "compact",
      "content_hash"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "OrphanedRevisionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
