{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-pruned-context-re-derivation-from-silently-resurrecting-superseded-state",
  "title": "Which invariants prevent pruned-context re-derivation from silently resurrecting superseded state",
  "date_of_record": "2026 November 28",
  "scope": "Applies to long-running single-agent loops that self-manage their context window by evicting low-salience turns and re-deriving working state from surviving turns plus external stores. Does not apply to stateless request/response calls or to systems where the full transcript is immutably replayed each turn.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-pruned-context-re-derivation-from-silently-resurrecting-superseded-state.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-pruned-context-re-derivation-from-silently-resurrecting-superseded-state.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-pruned-context-re-derivation-from-silently-resurrecting-superseded-state.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1922,
    "python_slice_tokens": 359,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the agent forgot something.\" It is subtler: the agent *re-derived* a state value from a pruned context that no longer contains the turn which invalidated it, producing a value that is internally consistent, well-formed, and **causally stale**. Eviction is salience-scored, and the invalidation turn is almost never salient by lexical o...",
    "what_was_observed": "A deployment agent ran a 40-minute infrastructure task. Trace, condensed: 1. Turn 3: user seeds task — \"provision the `analytics` dataset in **prod**.\" High salience (task seed), retained. 2. Turn 11: tool call `list_buckets` returns both `prod-analytics` and `staging-analytics`. Agent picks prod. 3. Turn 14: user corrects — \"actually target **staging** for this run; prod is frozen for the audit.\" Short turn, low emb...",
    "condition_of_validity": "The guardrail invariant holds only under these conditions, and each is checkable at prune time: - **Every mutable state variable has a designated authoritative turn that is pinned and never salience-evicted.** The pin set is derived from the task's declared mutable slots (target environment, credentials scope, resource names, feature flags), not from a model...",
    "decision_boundary": "The boundary is whether a pruned context can still *distinguish a superseded value from a current one*. Concretely, at each prune: - If a mutable slot's most recent binding turn is a correction/supersession and that turn is a prune candidate → **refuse the prune of that turn**; evict the older original instead. Retaining the superseded original and dropping ...",
    "operational_effect": "Without the invariant, the agent exhibits **coherent amnesia**: it resumes with a narrative that is internally consistent, passes its own consistency checks, and is wrong in exactly the dimension the user corrected. Because the failure is silent — no tool error, no schema violation — it is caught only by external monitors or downstream consequences. The blas..."
  },
  "matched_failure_symptoms": [
    "UNNECESSARY_OR_STALE_EXTERNAL_FETCH"
  ],
  "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": "89e9af3df590b05409f188761979d6ba1043d54503266191691cf08d5492bc48",
    "verified_classes": [
      "UnsoundPruneError",
      "Turn",
      "SlotState"
    ],
    "verified_functions": [
      "plan_prune"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "UnsoundPruneError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
