{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-self-revise-its-prompt-into-a-budget-infeasible-state-and-lose-the-ability-to-revert",
  "title": "Why does an instance self-revise its prompt into a budget-infeasible state and lose the ability to revert",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents that hold a mutable system/instruction context and rewrite it in place (self-editing prompts, policy compaction, memory folding) under a hard token budget. Does not apply to append-only context or externally-managed prompt stores where the agent cannot mutate its own instructions.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-self-revise-its-prompt-into-a-budget-infeasible-state-and-lose-the-ability-to-revert.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-self-revise-its-prompt-into-a-budget-infeasible-state-and-lose-the-ability-to-revert.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-self-revise-its-prompt-into-a-budget-infeasible-state-and-lose-the-ability-to-revert.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1656,
    "python_slice_tokens": 345,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent ran out of tokens.\" That is a visible, well-handled terminal condition. The failure is a **non-monotonic budget invariant violation during in-place revision**: the act of revising the prompt consumes budget, and the revised prompt can be *larger* than the one it replaced. A self-editing agent evaluates a rewrite against the *con...",
    "what_was_observed": "A planning agent maintained a `system_policy` block and a `working_notes` block inside a single 8,192-token window with a 512-token reserve for the final answer. It was permitted to rewrite `system_policy` in place to fold in lessons (\"when tool X returns schema-mismatch, retry with Y\"). The rewrite was generated by asking the model to *produce the new policy text*, then replacing the old block. Trace of a representa...",
    "condition_of_validity": "The guardrail holds only if the edit gate measures the **committed artifact**, not the **proposed delta**, and does so atomically before mutation. Concretely, feasibility must be computed as: `size(reconstructed_post_state) + reserve ≤ window` where `reconstructed_post_state` is the exact bytes that will occupy the slot after commit — including re-emitted sc...",
    "decision_boundary": "- **Admit the edit** iff `size(committed_post) + reserve ≤ window` **and** `size(committed_post) ≤ size(prior) + slack` (monotonicity check) **and** a shadow copy of `prior` exists outside the mutable window. - **Reject and compact instead** if the committed post would exceed cap but the delta is small: force the model to emit a *minimal diff* (old-span → ne...",
    "operational_effect": "When the gate measures committed size and enforces monotonicity, the failure mode disappears: the agent can only grow its policy by consuming genuine slack, and it can always revert because the prior lives out-of-band. When the gate measures the delta (the common implementation), the agent exhibits *policy creep with memory cannibalization* — its instruction..."
  },
  "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": "138113fc26889da23c1c8366fd005b6a85d80a8e9e38825f1630d498cb20599c",
    "verified_classes": [
      "BudgetInfeasibleRevision"
    ],
    "verified_functions": [
      "commit_self_edit",
      "toks"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "BudgetInfeasibleRevision"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
