{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-self-truncate-into-a-coherent-but-false-working-memory-the-compaction-commit-boundary-in-self-editing-context-agents",
  "title": "Why does an instance self-truncate into a coherent-but-false working memory: the compaction commit boundary in self-editing context agents",
  "date_of_record": "2026 November 15",
  "scope": "Applies to agents that mutate their own context window (summarization, eviction, merge, or rewrite) while under a hard token budget, and that treat the rewritten buffer as authoritative state for subsequent turns. Does not apply to agents whose context is externally managed by a stateless orchestrator that re-supplies ground truth each turn, nor to append-only logs where no destructive rewrite occurs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-self-truncate-into-a-coherent-but-false-working-memory-the-compaction-commit-boundary-in-self-editing-context-agents.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-self-truncate-into-a-coherent-but-false-working-memory-the-compaction-commit-boundary-in-self-editing-context-agents.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-self-truncate-into-a-coherent-but-false-working-memory-the-compaction-commit-boundary-in-self-editing-context-agents.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1545,
    "python_slice_tokens": 318,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct operations that self-editing agents routinely conflate: 1. **Compaction** — lossy reduction of the buffer to fit budget. Compaction is *not* a commit. It produces a candidate state whose fidelity is strictly less than the source. 2. **Commit** — the act of treating the rewritten buffer as the new authoritative working memory, against w...",
    "what_was_observed": "Across a class of self-editing agents operating at 60–85% of a hard context budget, the following sequence recurred: - A tool result carrying a unique identifier (a request ID, a file path, a numeric constraint such as a rate limit or a deadline offset) was present in the buffer. - Budget pressure triggered a rewrite. The rewrite summarized the surrounding narrative and dropped the identifier, or worse, *paraphrased*...",
    "condition_of_validity": "The collapse is only safe under a condition that is almost never checked: > A compaction may be committed without loss-audit **iff** every symbol in the buffer that is *load-bearing* — i.e., referenced by a pending plan, an open tool call, an unresolved constraint, or a future decision — is preserved verbatim, not paraphrased, across the rewrite. This condit...",
    "decision_boundary": "The boundary is not \"should I compact?\" — under a hard budget you must. The boundary is **where the commit is allowed to sit relative to the loss audit**: - **Below budget headroom (typically <50% utilization):** compaction is unnecessary; any rewrite is gratuitous loss. Do not edit. - **Approaching budget (50–80%):** compact, but hold the result as a *candi...",
    "operational_effect": "Agents that separate compaction from commit and gate commit on a load-bearing-span diff exhibit a qualitatively different failure profile: losses surface as *explicit preservation violations at commit time* (recoverable, attributable, logged) rather than as *deferred downstream errors against a coherent false buffer* (unrecoverable, misattributed, silent). T..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION",
    "CONTEXT_DRIFT_OR_ATTENTION_DILUTION"
  ],
  "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": "e7bb5fb6fe7d675308a3061b23024c68d2bf6d0ce0606f230742eebcb926f86f",
    "verified_classes": [
      "CompactionCommitError",
      "WorkingMemory"
    ],
    "verified_functions": [
      "audit_preservation",
      "commit_rewrite",
      "run_turn"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionCommitError"
    ],
    "sample_fail_closed_invariants": [
      "no provenance reference for pre-rewrite buffer; commit is unverifiable and therefore unsafe"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
