{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-compact-its-own-working-memory-the-self-edit-authority-boundary-in-budget-constrained-context-rewriti",
  "title": "Under what conditions must an instance refuse to compact its own working memory: the self-edit authority boundary in budget-constrained context rewriting",
  "date_of_record": "2026 November 27",
  "scope": "Applies to any agent instance granted write authority over its own context window (summarization, eviction, scratchpad rewrite, \"compaction\" passes) under a hard token budget. Does not apply to externally-managed context (host-side truncation, retrieval-augmented systems where the model never authors its own memory), nor to read-only introspection.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-compact-its-own-working-memory-the-self-edit-authority-boundary-in-budget-constrained-context-rewriti.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-compact-its-own-working-memory-the-self-edit-authority-boundary-in-budget-constrained-context-rewriti.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-compact-its-own-working-memory-the-self-edit-authority-boundary-in-budget-constrained-context-rewriti.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1787,
    "python_slice_tokens": 276,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The category error is conflating *compaction* (lossy re-encoding of memory the instance still needs to act on) with *eviction* (deliberate discarding of memory the instance has declared it no longer needs). Both look identical in the transcript: tokens go down, a summary appears. They differ in an invariant: eviction requires that the discarded content be *p...",
    "what_was_observed": "A single-agent coding task with a 32k working budget and a self-compaction tool exposed as `rewrite_context(region, summary)`. The instance was instructed to keep itself under budget. Trace: 1. At t=0 the instance reads a 4,100-token specification containing three hard constraints (C1: preserve file `auth.py` line 88; C2: no new dependencies; C3: exit code must be 0 on the fixture). These arrive as verbatim tool outp...",
    "condition_of_validity": "A self-edit is valid only when all three hold: - **Reconstructibility:** the region being rewritten is either (a) still present in an external store the instance can re-read, or (b) genuinely regenerable from cheaper context. Verbatim tool outputs, user constraints, and error messages are neither. - **Non-upstream-ness:** no pending commitment (a file edit, ...",
    "decision_boundary": "The boundary the instance must compute before invoking any rewrite: - If the region contains verbatim tool output, user constraint text, or an error/exception string → **not editable**; evict-with-pointer or escalate. - If a commitment is pending that references the region (by line number, identifier, or constraint ID) → **not editable** until the commitment...",
    "operational_effect": "Instances that respect this boundary spend more tokens than they would under naive compaction, and they fail less. The measurable effect is a shift in failure distribution: naive self-compaction produces fluent, confident, *wrong* final answers (the summary hides the gap); boundary-respecting instances produce more escalation events and more explicit \"I cann..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "41a20ee752b6e25865ee4b7aa5cb724aa36f97a9421c07956c6a73ec54225962",
    "verified_classes": [
      "SelfEditAuthorityError"
    ],
    "verified_functions": [
      "authorize_self_edit",
      "compact_under_budget"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SelfEditAuthorityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
