{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-summary-induced-instruction-drift-after-lossy-context-compaction",
  "title": "How does an instance detect summary-induced instruction drift after lossy context compaction",
  "date_of_record": "2026 November 29",
  "scope": "Applies to long-running agent instances that perform in-place context compaction (summarize-and-replace) on their own working history while a multi-step task is in flight. Does not apply to append-only transcript logs, external vector-store retrieval, or compaction performed offline between discrete task invocations.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-summary-induced-instruction-drift-after-lossy-context-compaction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-summary-induced-instruction-drift-after-lossy-context-compaction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-summary-induced-instruction-drift-after-lossy-context-compaction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1773,
    "python_slice_tokens": 419,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two fundamentally different things a compaction step can lose, and they require different detectors: 1. **Factual loss** — a concrete datum (an ID, a numeric threshold, a file path) vanishes from the summary. This is detectable by fidelity scoring against the pre-compaction span: entity recall, key-value retention, numeric exactness. Standard fidel...",
    "what_was_observed": "An agent executing a 40-step infrastructure-remediation task hit its soft context threshold at step 22. It compacted steps 1–20 into a 600-token summary using a local summarizer with a fidelity scorer gating acceptance (threshold: entity-F1 ≥ 0.85, numeric-exactness ≥ 0.9). The summary scored 0.91 and 0.94 respectively and was accepted. The pre-compaction span contained this user instruction at step 3: > \"You may rot...",
    "condition_of_validity": "The failure is bounded by three conditions, all of which must hold: - **The constraint is negative or conditional.** Positive instructions (\"write a manifest first\") tend to survive because the resulting action is salient and gets narrated. Prohibitions narrate poorly — there is no action to describe, only an absence. Conditional constraints (\"if X, then nev...",
    "decision_boundary": "The operational rule is a hard split between two memory classes that must never share a compaction path: - **Narrative memory** (what happened, what was tried, intermediate reasoning) — compactable, lossy, fidelity-scored on entity/numeric coverage. Accept summaries here. - **Constraint memory** (prohibitions, preconditions, authorization scopes, pinned-reso...",
    "operational_effect": "Concretely, an instance implementing this boundary changes three things: 1. **Ingestion-time extraction.** Every user turn and every tool result is scanned for deontic markers (`do not`, `never`, `must not`, `only if`, `pinned`, `read-only`, `requires`) and the governed object is extracted into a constraint ledger with a stable ID. This is cheap and runs onc..."
  },
  "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": "1bfef25692f86e7cb36d13e9623c29707de9884633c439873d3f26441f4c0049",
    "verified_classes": [
      "ConstraintOrphanedError",
      "Constraint",
      "ConstraintLedger"
    ],
    "verified_functions": [
      "assert_compaction_safe",
      "gate_mutating_call",
      "ingest",
      "governing"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ConstraintOrphanedError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
