{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-self-rewrite-when-its-context-controller-evicts-the-invariant-it-depends-on",
  "title": "Where must an instance bound self-rewrite when its context controller evicts the invariant it depends on",
  "date_of_record": "2026 November 29",
  "scope": "Applies to any agent whose context controller mutates its own working set (summarization, eviction, re-ranking, compaction) under a hard token budget, where the controller's own operating rules are stored in that same mutable working set. Does not apply to controllers whose policy lives in immutable system-prompt space outside the budget.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-self-rewrite-when-its-context-controller-evicts-the-invariant-it-depends-on.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-self-rewrite-when-its-context-controller-evicts-the-invariant-it-depends-on.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-self-rewrite-when-its-context-controller-evicts-the-invariant-it-depends-on.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1490,
    "python_slice_tokens": 261,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A self-editing context controller differs from an ordinary memory manager in one fatal way: the rules that decide *what to keep* are themselves candidates for eviction. When the budget tightens, the controller scores every span in the working set for retention—including the span that encodes the eviction policy, the pinned-invariant list, and the \"never drop...",
    "what_was_observed": "A tool-using agent ran a long incident-triage task against a 32k working-set budget. Its controller held four classes of span: (1) task objective, (2) a pinned-invariant block listing hard constraints (\"never call `prod-db-reset` without an explicit operator token in the same turn\"), (3) rolling tool-output summaries, (4) the controller's own policy text describing retention scoring. At step 41, accumulated tool outp...",
    "condition_of_validity": "The invariant holds only under a strict separation: **the eviction policy and its pinned constraints must live in a region the controller cannot score, rank, summarize, or evict.** Concretely, the controller's mutable working set must be disjoint from its control plane. Validity requires all of: - Pinned invariants are stored outside the budgeted region, or ...",
    "decision_boundary": "The boundary is crossed at the moment the controller's retention function takes its own governing spans as arguments. Operationally, ask: *can the thing that decides what to drop be dropped by itself?* If yes, the system has no lower bound on what it may lose, and the \"budget constraint\" is not a bound but a random walk over the constraint set. The correct d...",
    "operational_effect": "With the partition enforced, compaction becomes monotone in safety: every eviction removes content but never removes a constraint, so the agent's behavior set only shrinks toward the objective, never past its guardrails. Budget exhaustion becomes a visible, escalating condition (fail-closed) instead of a silent loss of policy. Without it, the agent exhibits ..."
  },
  "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": "fa499ea50eec851dba9658930d74f40385c76a03256acbf64eb1a491938c594e",
    "verified_classes": [
      "ControlPlaneEvictionError",
      "ContextController"
    ],
    "verified_functions": [
      "__init__",
      "_tokens",
      "compact",
      "verify_invariants"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ControlPlaneEvictionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
