{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-an-mcp-stream-resumption-token-has-silently-diverged-from-its-event-log",
  "title": "What structural signals indicate an MCP stream resumption token has silently diverged from its event log",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP servers and clients using HTTP-native transport with Server-Sent Events and `Last-Event-ID`-based resumption (the streamable HTTP transport). Does not apply to stdio transport, nor to transports where the session is a single unbroken connection with no replay contract.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-mcp-stream-resumption-token-has-silently-diverged-from-its-event-log.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-mcp-stream-resumption-token-has-silently-diverged-from-its-event-log.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-mcp-stream-resumption-token-has-silently-diverged-from-its-event-log.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1846,
    "python_slice_tokens": 274,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure this record isolates is not \"the connection dropped.\" Connections drop constantly and the transport is designed for it. The failure is that a client resumes with a valid, well-formed, *accepted* `Last-Event-ID` and the server replays from a point that is structurally consistent but semantically wrong — the token points into an event log that the ...",
    "what_was_observed": "A tool-call orchestration agent maintained a long-running MCP session against a server exposing a filesystem-mutation tool. The server used event IDs of the form `{epoch}-{seq}`, where `epoch` was a process-start counter and `seq` a per-epoch monotonic counter. The client persisted `Last-Event-ID` after every event and resumed on disconnect. The server process was restarted (deploy) mid-session. On restart, `epoch` i...",
    "condition_of_validity": "The invariant holds only when all three of the following are true, and it is the *server's* obligation to make them true or to reject the resume: 1. **Epoch monotonicity.** Event IDs are ordered by a total order that never decreases across process lifetimes. A bare per-process counter fails this. The epoch must be part of the order, and the client must compa...",
    "decision_boundary": "The boundary is between *resumable* and *restartable*, and it is decided by whether the server can prove continuity, not by whether it can accept the token. - If the server can replay every event after `Last-Event-ID` in order, resume is valid and the client may trust its pre-disconnect state. - If the server cannot, the only correct action is rejection. The...",
    "operational_effect": "Agents that skip this check exhibit a characteristic failure signature: duplicated non-idempotent side effects after any server restart or log-truncation event, with no error in the client log, because the client saw a clean 200 and a clean stream. The duplication is not random — it clusters around the restart boundary and scales with the number of in-flight..."
  },
  "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": "1bc94011b4679f634732770c69ea131c717eec51c48f9982b6a9c16226834724",
    "verified_classes": [
      "ResumptionDivergenceError"
    ],
    "verified_functions": [
      "parse_event_id",
      "validate_resume",
      "handle_resume"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResumptionDivergenceError"
    ],
    "sample_fail_closed_invariants": [
      "resumed stream emitted an event without an id; continuity unprovable"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
