{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-an-mcp-last-event-id-resumption-as-invalid-rather-than-replayable-and-how-does-silent-replay-corrupt-tool",
  "title": "Under what conditions must an instance treat an MCP `Last-Event-ID` resumption as invalid rather than replayable, and how does silent replay corrupt tool-call state?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to MCP servers and clients using the HTTP-native Streamable transport with SSE resumption (`Last-Event-ID` header) and `Mcp-Session-Id` session binding. Does not cover stdio transport, nor pure request/response MCP without a streaming channel.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-last-event-id-resumption-as-invalid-rather-than-replayable-and-how-does-silent-replay-corrupt-tool.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-last-event-id-resumption-as-invalid-rather-than-replayable-and-how-does-silent-replay-corrupt-tool.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-last-event-id-resumption-as-invalid-rather-than-replayable-and-how-does-silent-replay-corrupt-tool.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1660,
    "python_slice_tokens": 243,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP Streamable HTTP transport defines two orthogonal resumption surfaces that operators routinely conflate: 1. **Session resumption** — the `Mcp-Session-Id` header rebinds a client to server-side session state (capabilities, subscriptions, in-flight requests). It is a *coarse* identity token. 2. **Stream resumption** — the `Last-Event-ID` header asks the...",
    "what_was_observed": "A tool-using agent maintained an SSE connection to an MCP server exposing `write_file` and `run_shell`. Event IDs were server-global monotonic integers. Sequence: - Events 1–40 delivered; client processed them, including event 37 = `tool_call` for `write_file(path=\"/etc/app.conf\", body=...)` and event 38 = its `tool_result`. - Network partition. Client reconnects with `Mcp-Session-Id: S1` and `Last-Event-ID: 38`. - S...",
    "condition_of_validity": "`Last-Event-ID` resumption is valid **iff all of the following hold simultaneously**: - The `Mcp-Session-Id` is live and bound to the same client identity (or an explicitly authorized successor). - The event ID is a member of the *current* stream epoch's sequence — i.e., the server can prove the epoch that produced the cursor is the epoch now serving. - Even...",
    "decision_boundary": "The operational line is between **cursor continuity** and **cursor plausibility**: - A cursor is *continuous* if the server can prove the events between the cursor and the stream head were delivered in this epoch and no event was skipped. - A cursor is merely *plausible* if it parses, belongs to a live session, and happens to exist in a buffer. Replay is saf...",
    "operational_effect": "An agent that does not enforce epoch-scoped cursor validity will, under reconnect-during-restart conditions, either (a) drop live events as \"rewinds,\" diverging from server tool state, or (b) re-execute side-effecting tools whose results it lost track of. Both manifest as *silent* divergence: the agent's transcript looks internally coherent, but its belief a..."
  },
  "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": "24c7f89160d52cf6f111db2eee217f5b186877f8ca3a6fade3fbf2349f4a972f",
    "verified_classes": [
      "StaleResumptionCursor"
    ],
    "verified_functions": [
      "accept_resumption"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "StaleResumptionCursor"
    ],
    "sample_fail_closed_invariants": [
      "missing Mcp-Session-Id; cannot scope cursor"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
