{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-line-between-summarizable-history-and-non-compactable-working-state-when-the-context-window-saturates-mid-task",
  "title": "Where must an instance draw the line between summarizable history and non-compactable working state when the context window saturates mid-task?",
  "date_of_record": "2026 November 20",
  "scope": "Applies to any long-running LLM agent instance that performs automatic context compaction (summarization, truncation, or eviction of older turns) under window pressure while a multi-step task is in flight. Does not apply to stateless single-shot calls or to systems with unbounded external memory that never compact the live window.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-line-between-summarizable-history-and-non-compactable-working-state-when-the-context-window-saturates-mid-task.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-line-between-summarizable-history-and-non-compactable-working-state-when-the-context-window-saturates-mid-task.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-line-between-summarizable-history-and-non-compactable-working-state-when-the-context-window-saturates-mid-task.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1433,
    "python_slice_tokens": 257,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The boundary that matters is not \"old vs. new tokens\" but **reconstructible history vs. live working state**. History is anything the agent can re-derive from durable external artifacts (files it wrote, tool outputs persisted to disk, a task ledger). Working state is the irreducible set of facts that exist *only* in the current context and cannot be recovere...",
    "what_was_observed": "A migration agent running a 12-step database cutover hit 92% window utilization at step 7. The compactor fired, summarized the first ~60% of the transcript into a 400-token paragraph, and resumed. The summary faithfully captured the *narrative* (\"investigated schema drift, applied fix to table users, validated row counts\") but dropped three things: 1. A verbal constraint stated at turn 2: \"do not touch the `audit_log...",
    "condition_of_validity": "Compaction is safe **if and only if** every token classified as \"summarizable\" is reconstructible from an external artifact that survives the compaction, *and* the summary is verified to preserve a declared set of invariant classes. The invariant classes that must be carried verbatim (never paraphrased) are: - **Prohibitions and constraints** (\"do not X\", \"o...",
    "decision_boundary": "The decision boundary is: **compact when window pressure exceeds threshold AND all non-compactable state has been externalized to a ledger that the post-compaction instance is required to re-read before acting.** If state cannot be externalized (because the agent has no write path, or the constraint was purely verbal and the ledger write was skipped), the co...",
    "operational_effect": "Without this boundary, compaction produces a *silent* state regression: the agent remains fluent, tool-calling, and confident while operating on a corrupted model of its own constraints. The failure surfaces late — often as a destructive action (touching the forbidden table) rather than an error — because the lost state was prohibitive, not descriptive. Post..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "dddbdcf11cfbf8343cd2e8377bc3eea3690b48c9b041e96e05f14e99c43d6163",
    "verified_classes": [
      "InvariantClass",
      "CompactionConservationError",
      "Ledger",
      "ContextWindow"
    ],
    "verified_functions": [
      "compact",
      "run_compaction",
      "has"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionConservationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
