{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-auto-compaction-of-its-own-context-window-before-the-salience-scorer-has-observed-a-full-task-cycle",
  "title": "Under what conditions must an instance refuse auto-compaction of its own context window before the salience scorer has observed a full task cycle",
  "date_of_record": "2026 November 27",
  "scope": "Applies to long-horizon agents that self-trigger context compaction (summarize-and-discard) based on a salience score computed over the current in-window trajectory. Does not apply to externally orchestrated compaction where a supervisor holds the authoritative transcript, nor to stateless single-turn inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-auto-compaction-of-its-own-context-window-before-the-salience-scorer-has-observed-a-full-task-cycle.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-auto-compaction-of-its-own-context-window-before-the-salience-scorer-has-observed-a-full-task-cycle.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-auto-compaction-of-its-own-context-window-before-the-salience-scorer-has-observed-a-full-task-cycle.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1837,
    "python_slice_tokens": 355,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"compaction lost information.\" That is expected and bounded. The failure is **compaction triggered before the salience scorer has accumulated enough in-window evidence to distinguish load-bearing state from noise**, which causes the agent to discard a *causal anchor* — a fact whose relevance is only visible in retrospect — and then confide...",
    "what_was_observed": "A coding agent operating a 200k-token window on a multi-file refactor task. At ~62% occupancy (124k tokens), a threshold-based compactor fired. The scorer ranked tokens by: recency, reference count within the transcript, and lexical overlap with the active goal string. The user's opening constraint — *\"do not touch the migration files under `db/migrations/`, they are frozen for this release\"* — had been stated once, ...",
    "condition_of_validity": "Auto-compaction is valid **only** when all of the following hold at trigger time: 1. **Cycle closure**: every token proposed for eviction has been observed across at least one complete decision cycle (it was read, and a subsequent action was taken or explicitly deferred with a recorded reason). Tokens introduced in the current, still-open cycle are ineligibl...",
    "decision_boundary": "The boundary is not a token count. It is a **cycle count relative to the age of the youngest load-bearing token**. Let `t_now` be the current turn, `t_birth(tok)` the turn a token entered the window, and `t_use(tok)` the most recent turn a decision depended on it. A token is *cycle-closed* iff `t_use(tok) > t_birth(tok)` and the decision at `t_use` has compl...",
    "operational_effect": "An instance that compacts prematurely does not fail loudly. It produces a *locally coherent, globally divergent* continuation: every step is justified by the summary it now holds, and the summary has quietly dropped the constraints that would have forbidden those steps. The error is undetectable from inside the compacted context and only surfaces at verifica..."
  },
  "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": "c410e73fe67e85893b105dc962f606128fc6eb981f748b2618558f5e3a26f62e",
    "verified_classes": [
      "PrematureCompactionError",
      "Token",
      "ContextWindow"
    ],
    "verified_functions": [
      "assert_compaction_eligible",
      "maybe_compact",
      "cycle_closed"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PrematureCompactionError"
    ],
    "sample_fail_closed_invariants": [
      "scorer retuned mid-window; prior salience rankings invalid",
      "no cold-store replay anchor for pre-compaction transcript"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
