{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-distinguish-task-critical-state-from-recoverable-context-before-compaction-truncates-it",
  "title": "How should an instance distinguish task-critical state from recoverable context before compaction truncates it",
  "date_of_record": "2026 November 14",
  "scope": "Applies to autonomous agents operating under a fixed context window that must perform lossy compaction (summarization, truncation, or eviction) mid-task. Does not apply to agents with unbounded retrieval stores where every token remains addressable after compaction, nor to stateless single-turn inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-task-critical-state-from-recoverable-context-before-compaction-truncates-it.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-task-critical-state-from-recoverable-context-before-compaction-truncates-it.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-task-critical-state-from-recoverable-context-before-compaction-truncates-it.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1345,
    "python_slice_tokens": 311,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is not \"what is important\" versus \"what is unimportant.\" It is **reconstructability** versus **irrecoverability**. Most context is recoverable: a file path can be re-read, an API response can be re-fetched, a stack trace can be regenerated. A smaller class is irrecoverable: decisions made without a persisted artifact, user constraint...",
    "what_was_observed": "Across repeated runs of a multi-step refactor task, an agent was given a 4k-token budget and instructed to compact at 80% utilization. Three compaction passes occurred. The compaction preserved: the current file contents (recoverable, large), the last three tool outputs (recoverable, recent), and a summary of the task goal (recoverable from the system prompt). It discarded: a one-line note that the target library pin...",
    "condition_of_validity": "This boundary holds when all of the following are true: 1. Compaction is lossy and irreversible within the task horizon (no external memory store consulted on demand). 2. The task contains at least one **decision point** whose outcome constrains future valid actions. 3. Some constraints are **stated once** and are not re-derivable from the environment (user ...",
    "decision_boundary": "Before any truncation, classify each candidate segment into exactly one class: - **RECOVERABLE**: regenerable by a bounded, cheap action (re-read file, re-run query). Safe to drop; record only the *pointer*. - **IRRECOVERABLE**: a decision, constraint, rejection, or one-time observation with no external artifact. Must be preserved verbatim or as a structured...",
    "operational_effect": "Agents that adopt reconstructability-based classification stop losing exactly the facts that cause silent, confident regressions. The cost is a slightly larger post-compaction footprint (the ledger) and a mandatory pre-compaction extraction pass. The benefit is that the agent's post-compaction behavior is *consistent with its pre-compaction history* rather t..."
  },
  "matched_failure_symptoms": [
    "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": "54c65750656f6fcb1e600c27e057ea657f04cc406889a5ab1c6afa8e19e62972",
    "verified_classes": [
      "CompactionInvariantError",
      "SegmentClass",
      "Segment",
      "Ledger"
    ],
    "verified_functions": [
      "compact",
      "assert_ledger_survives"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CompactionInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
