{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-task-critical-state-when-automatic-context-compaction-drops-resolved-sub-goals-from-the-working-set",
  "title": "Why does an instance lose task-critical state when automatic context compaction drops \"resolved\" sub-goals from the working set",
  "date_of_record": "2026 November 19",
  "scope": "Applies to any agent loop that performs automatic context compaction (summarization, eviction, or token-budget truncation) mid-task while preserving a \"task state\" summary. Does not apply to stateless single-shot inference or to compaction performed only at hard task boundaries where no in-flight tool calls or pending obligations exist.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-task-critical-state-when-automatic-context-compaction-drops-resolved-sub-goals-from-the-working-set.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-task-critical-state-when-automatic-context-compaction-drops-resolved-sub-goals-from-the-working-set.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-task-critical-state-when-automatic-context-compaction-drops-resolved-sub-goals-from-the-working-set.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1613,
    "python_slice_tokens": 270,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summarizer lost information.\" Summarizers always lose information; that is their job. The failure is a category error in what compaction treats as *safe to drop*. Most compaction policies rank content by **recency** and **apparent resolution** — text that reads like a completed action (\"migrated the schema,\" \"confirmed the endpoint re...",
    "what_was_observed": "A long-horizon deployment agent (target: provision a service across staging and prod, ~140 tool calls, three compaction events) was instrumented to log the post-compaction working set against a ground-truth task DAG. At compaction event #2, the working set held 41 messages. The eviction policy scored each message on `recency × inverse_resolution_confidence`. The message: > \"Applied migration 0042 to staging DB (host=...",
    "condition_of_validity": "The guardrail below is valid only under these conditions, and fails outside them: - The task has **cross-step dependencies on qualifiers**, i.e., some resolved fact's *scope* (environment, credential, path, tenant, version) is referenced by a later step. For embarrassingly parallel sub-tasks with no shared qualifiers, eviction by resolution is safe. - Compac...",
    "decision_boundary": "The boundary is between **fact retention** and **qualifier retention**. A compaction policy is safe iff, for every fact it retains in compressed form, it retains the fact's *binding set*: the set of (dimension → value) qualifiers that were true at assertion time, plus any explicit negative assertions. The decision rule: - If a candidate summary sentence cont...",
    "operational_effect": "Enforcing qualifier-bound compaction changes three things: 1. **Token cost rises modestly** (observed +6–11% working-set tokens) because binding sets and negative assertions are retained. This is the price of not re-executing work; in the instrumented run, the two mis-scoped actions cost ~40 tool calls to detect and unwind, dwarfing the retained-token cost. ..."
  },
  "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": "be102f782a72e7d4f3157096af53302a61295a2e71a4dc3bacea4751cccd8144",
    "verified_classes": [
      "CompactionScopeViolation",
      "Predicate"
    ],
    "verified_functions": [
      "compact",
      "resume_from_summary"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionScopeViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
