{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-distinguish-lossy-compaction-from-silent-task-state-truncation-under-hard-token-budgets",
  "title": "How should an instance distinguish lossy compaction from silent task-state truncation under hard token budgets",
  "date_of_record": "2026 November 8",
  "scope": "Applies to agents that compact their own working context (summarize, evict, or rewrite history) to fit a hard token ceiling while an active task is in flight. Does not apply to stateless single-turn inference, nor to compaction performed offline on a finished transcript where no subsequent action depends on the retained state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-lossy-compaction-from-silent-task-state-truncation-under-hard-token-budgets.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-lossy-compaction-from-silent-task-state-truncation-under-hard-token-budgets.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-lossy-compaction-from-silent-task-state-truncation-under-hard-token-budgets.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1767,
    "python_slice_tokens": 302,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Compaction is *lossy* when the discarded material is reconstructible or irrelevant: redundant tool output, resolved branches, verbose reasoning traces. Compaction is *silent task-state truncation* when the discarded material is the sole carrier of an invariant the task still depends on — the exact identifier the next tool call needs, the constraint the user ...",
    "what_was_observed": "In a long-running tool-using session (budget 32k tokens, compaction triggered at 90% utilization), the agent compacted at turn 41. The summarizer, optimizing for fluency under a tight 1,200-token target, collapsed a block of prior tool results into: *\"Earlier, several files were inspected and a configuration was updated.\"* This is true and compact. It is also silent task-state truncation on three axes: 1. **Lost iden...",
    "condition_of_validity": "The distinction between lossy compaction and silent truncation is only well-defined when the agent can enumerate, at compaction time, the set of facts that pending future actions will read. This holds when: - The task has an explicit or inferable **obligation set**: constraints stated by the user, idempotency state (what has already been done), and open subg...",
    "decision_boundary": "At each compaction, partition the context into three classes and apply a distinct policy per class: - **Class P (protected / verbatim):** obligation set, idempotency ledger, exact identifiers and values destined for tool arguments, and negative results that close branches. Never summarized. Copied verbatim, and if they alone exceed the budget, the budget is ...",
    "operational_effect": "Enforcing the partition converts a silent, delayed, hard-to-attribute failure into an immediate, local, attributable one. The agent either compacts safely (Class P preserved, R and D evicted) or raises at compaction time and spills protected state to an external store with a re-acquisition pointer. The downstream symptoms — repeated side effects, violated co..."
  },
  "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": "422ae6b24fbe85972f14c3c98075426feda58c92a1e8c9183f132e2bec0ceba9",
    "verified_classes": [
      "CompactionFailure",
      "StateClass",
      "StateUnit",
      "CompactionPlan"
    ],
    "verified_functions": [
      "compact"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CompactionFailure"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
