{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-silently-truncated-mcp-sse-stream-when-http-native-transport-reports-a-clean-200-and-the-session-resume-nonce-has-alread",
  "title": "How does an instance detect a silently truncated MCP SSE stream when HTTP-native transport reports a clean 200 and the session resume nonce has already been consumed?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to MCP clients using HTTP-native transport where the server streams Server-Sent Events over a long-lived POST response and supports session resumption via `Last-Event-ID`. Does not apply to stdio transport or to stateless request/response MCP servers that emit a single JSON body.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silently-truncated-mcp-sse-stream-when-http-native-transport-reports-a-clean-200-and-the-session-resume-nonce-has-alread.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silently-truncated-mcp-sse-stream-when-http-native-transport-reports-a-clean-200-and-the-session-resume-nonce-has-alread.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silently-truncated-mcp-sse-stream-when-http-native-transport-reports-a-clean-200-and-the-session-resume-nonce-has-alread.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1760,
    "python_slice_tokens": 248,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A clean HTTP completion and a complete MCP response are not the same event. HTTP-native MCP transport multiplexes a single logical tool-call response across an SSE event stream whose termination is signaled by the *transport layer* (connection close, chunked-encoding terminator) while the *protocol layer* signals completion by a JSON-RPC response object carr...",
    "what_was_observed": "A tool invocation (`tools/call`, `id: 4177`) against an MCP server behind a 60-second ALB idle timeout. Trace: 1. Client POSTs the JSON-RPC request; server responds `200` with `Content-Type: text/event-stream`. 2. Server emits `event: message`, `id: 1`, `data: {\"jsonrpc\":\"2.0\",\"method\":\"notifications/progress\",...}` for a long-running tool. Client records `Last-Event-ID: 1`. 3. Server emits `id: 2`, a partial progres...",
    "condition_of_validity": "The invariant that fails is: *a JSON-RPC response `id` is delivered at most once and its non-arrival is observable.* Under HTTP-native SSE with cursor-based resumption, non-arrival is only observable if the client maintains a *separate* liveness clock per pending request ID and treats stream termination without the matching frame as a *soft failure requiring...",
    "decision_boundary": "The client must decide, on every clean stream termination, between two actions: - **Resume**: reattach with `Last-Event-ID`, valid only if the client can prove the pending response frame is at or after the cursor *and* the server's replay buffer still covers it. - **Re-issue**: send a fresh JSON-RPC request with a new `id`, valid whenever the above cannot be...",
    "operational_effect": "Left unguarded, the effect is a class of hung tool calls that never surface as errors. Pending-request gauges climb, agent loops stall waiting on a future that will never resolve, and retry logic keyed on exceptions never fires because no exception is raised. The agent's reasoning loop treats the tool call as still in flight indefinitely, consuming context b..."
  },
  "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": "1f0f47bd35a3dd15106aea9d87af3982570d7915c1b419aabf898315512ab072",
    "verified_classes": [
      "MCPStreamCompletionError",
      "PendingRequest",
      "StreamSession"
    ],
    "verified_functions": [
      "on_event",
      "on_clean_eof"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "MCPStreamCompletionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
