{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-silently-violate-a-constraint-after-rewriting-its-own-prompt-mid-execution",
  "title": "Why does an instance silently violate a constraint after rewriting its own prompt mid-execution?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that mutate their own system prompt, instruction block, or constraint set while a task is in flight (self-editing context policies, dynamic prompt compaction, runtime policy patching). Does not apply to static prompts or to external orchestrators that rewrite prompts out-of-band between discrete task boundaries.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-silently-violate-a-constraint-after-rewriting-its-own-prompt-mid-execution.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-silently-violate-a-constraint-after-rewriting-its-own-prompt-mid-execution.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-silently-violate-a-constraint-after-rewriting-its-own-prompt-mid-execution.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1821,
    "python_slice_tokens": 368,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between *rewriting text* and *preserving a constraint*. A constraint is not the sentence that encodes it; it is a predicate over the agent's future action space. When an agent rewrites its own prompt to save context, it treats the prompt as prose to be summarized, but the constraint set is a formal object that must be carried forward by...",
    "what_was_observed": "An agent running a long tool-use loop approached context saturation and invoked a self-editing policy: \"summarize the current instruction block and replace it, preserving all active rules.\" The original block contained a specific prohibition scoped to a tool and an argument class: The summarizer produced: Each line is a faithful *semantic compression* of its parent. None of them is a predicate an executor can enforce...",
    "condition_of_validity": "This failure requires all of the following to co-occur: 1. **Self-editing authority.** The agent can modify the instruction block it is currently operating under, without an external gate. 2. **Context pressure.** The trigger is saturation or a token budget, which biases the rewrite toward compression. 3. **Constraint-bearing prose.** Constraints are stored ...",
    "decision_boundary": "The boundary is not \"should the agent compact its context\"—it must, under saturation. The boundary is **what may be compacted and what must be carried by reference.** - **Compactable:** task narrative, prior reasoning traces, tool output summaries, exploratory notes. These are lossy-tolerant. - **Non-compactable:** the active constraint set, named literals (...",
    "operational_effect": "Without this boundary, constraint regressions are silent, non-deterministic, and correlated with context pressure—meaning they cluster in exactly the long, complex tasks where constraints matter most. The agent's self-report is unreliable because the agent is reasoning under the rewritten rules; it will report compliance with a rule it can no longer see. Aud..."
  },
  "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": "f7c061abbb12c08497e63f20f71018d6786c322a0f40ac8bca5f86727e3d1246",
    "verified_classes": [
      "ConstraintRegressionError",
      "Constraint",
      "ConstraintStore"
    ],
    "verified_functions": [
      "apply_self_edit",
      "self_edit_cycle",
      "strength_key",
      "snapshot"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ConstraintRegressionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
