{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-compacts-context-on-token-pressure-while-its-own-summarizer-is-itself-inside-the-compacted-window",
  "title": "What happens when an instance compacts context on token pressure while its own summarizer is itself inside the compacted window",
  "date_of_record": "2026 November 22",
  "scope": "Applies to any agent runtime that performs automatic context compaction (rolling summarization, semantic deduplication, or eviction) driven by token-pressure thresholds and redundancy scoring, where the summarizer model shares the same context window as the task state. Does not apply to architectures with a dedicated out-of-band summarizer context or to pure truncation with no model-mediated summary step.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-context-on-token-pressure-while-its-own-summarizer-is-itself-inside-the-compacted-window.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-context-on-token-pressure-while-its-own-summarizer-is-itself-inside-the-compacted-window.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-compacts-context-on-token-pressure-while-its-own-summarizer-is-itself-inside-the-compacted-window.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2215,
    "python_slice_tokens": 380,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct things a compaction trigger can measure: **occupancy** (how many tokens are in the window right now) and **recoverability** (whether the information being evicted can be reconstructed from what remains). Production triggers almost universally key on occupancy — a threshold like 0.85 × window, sometimes gated by a redundancy score that ...",
    "what_was_observed": "A long-horizon research agent was configured with a 128k window, a compaction trigger at 108k tokens (0.84), and a semantic-redundancy pass that clusters spans by embedding similarity and collapses clusters above 0.91 cosine into a single representative plus a summary. The system prompt occupied ~3.2k tokens and contained, among other things, the compaction rubric: *\"When summarizing, preserve all entity names, numer...",
    "condition_of_validity": "The failure requires three conditions to co-occur: - **Shared address space.** The compaction policy (rubric, instruction, scoring criteria) is stored in the same context region subject to eviction. If policy lives in an immutable prefix that the eviction scorer cannot touch, this cannot happen. - **Salience-by-similarity.** Eviction or collapse is ranked by...",
    "decision_boundary": "The operational question is not \"should we compact\" but \"what is the eviction class of the compaction policy itself.\" The boundary: - **Policy is pinned (correct).** The summarization rubric, the redundancy-scoring criteria, and the list of protected entity classes are marked non-evictable for the entire session. Compaction may shrink task state to 5% of win...",
    "operational_effect": "Downstream, the failure presents as **confident re-derivation**: the agent does not report missing information, because by the time it needs the value, the context contains a plausible summary that *reads* as complete. There is no error signal, no [UNCERTAIN] flag (that instruction was evicted in generation 2), and no token-pressure alarm (the window is comf..."
  },
  "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": "7559270c8f3fa29987fd5d571c5a34f832032655e120708ab323085f2f357eb5",
    "verified_classes": [
      "CompactionPolicyDriftError",
      "PinnedPolicy",
      "SummaryRecord",
      "CompactionLedger"
    ],
    "verified_functions": [
      "compact_with_guard",
      "policy_hash",
      "record_compaction"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CompactionPolicyDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
