{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-compaction-time-state-against-post-compaction-tool-reality-to-avoid-silent-invariant-violation",
  "title": "Where must an instance reconcile compaction-time state against post-compaction tool reality to avoid silent invariant violation",
  "date_of_record": "2026 November 25",
  "scope": "Applies to long-horizon single-agent runs that perform automatic context compaction (summarization, eviction, or hierarchical rollup) mid-task and then continue executing tool calls against state established before compaction. Does not apply to agents whose entire working set fits within a single context window with no eviction, nor to stateless one-shot invocations.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-compaction-time-state-against-post-compaction-tool-reality-to-avoid-silent-invariant-violation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-compaction-time-state-against-post-compaction-tool-reality-to-avoid-silent-invariant-violation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-compaction-time-state-against-post-compaction-tool-reality-to-avoid-silent-invariant-violation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1804,
    "python_slice_tokens": 334,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the summary lost information.\" Summaries always lose information; that is their purpose. The failure is subtler: a compaction strategy can preserve the *semantic* description of a task-critical fact (\"file X was created with contents Y\") while dropping the *operational token* that subsequent tool calls depend on to address that fact ...",
    "what_was_observed": "A representative trace from a migration agent run (horizon ~140 tool calls, three compactions): 1. Turn 12: agent calls `storage.create_bucket(name=\"mig-7f3a\")`. Tool returns `{\"bucket_id\": \"bkt_9c2e...\", \"handle\": \"h_44a1\"}`. The agent records in its scratchpad: \"Created migration bucket mig-7f3a for staging.\" 2. Turns 13–58: agent writes ~40 objects into the bucket, referencing it by `handle: h_44a1` in each call. ...",
    "condition_of_validity": "The silent-violation outcome requires three conditions to co-occur: 1. **Opaque addressing tokens.** Task-critical state includes at least one token that is not derivable from semantics—a handle, nonce, revision, or path segment that cannot be reconstructed by reasoning about the task. If all addressing is semantic (e.g., \"the file named config.yaml in the r...",
    "decision_boundary": "The boundary an operator must draw is between **compaction as lossy summarization** and **compaction as a state-transfer protocol with a verification obligation**. The decision rule: - If the agent's working set contains opaque addressing tokens that will be dereferenced after compaction, compaction MUST be treated as a state-transfer operation with an expli...",
    "operational_effect": "Without the guardrail, long-horizon runs exhibit a characteristic profile: high per-step success rate, low end-to-end correctness, and near-zero error signal—the worst possible operating point, because it defeats both automated monitoring and human review. The failure is invisible in logs (every call returned 200), invisible in summaries (every summary was f..."
  },
  "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": "f6f5ecf8ff451c4933c2a31ee800ac1032cf6760f6262427e2198c53ad1d45f7",
    "verified_classes": [
      "ReferentialContinuityError",
      "PinnedHandle",
      "ContinuityLedger"
    ],
    "verified_functions": [
      "revalidate_before_use",
      "pin",
      "on_compaction"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ReferentialContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
