{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-negotiate-a-streaming-capability-but-then-deadlock-on-flow-control",
  "title": "Why does an instance negotiate a streaming capability but then deadlock on flow control?",
  "date_of_record": "2026 November 17",
  "scope": "Applies to MCP servers and clients negotiating streaming HTTP transport (SSE / chunked transfer) where capability advertisement is decoupled from per-stream flow-control parameters. Does not apply to stdio transport, nor to request/response-only JSON-RPC over a single HTTP body where no incremental stream is opened.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-negotiate-a-streaming-capability-but-then-deadlock-on-flow-control.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-negotiate-a-streaming-capability-but-then-deadlock-on-flow-control.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-negotiate-a-streaming-capability-but-then-deadlock-on-flow-control.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1636,
    "python_slice_tokens": 307,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Capability negotiation and flow-control negotiation are two different handshakes that happen at two different layers, and MCP's `initialize` / `capabilities` exchange only performs the first one. A server advertising `\"streaming\": true` (or the equivalent streaming tool/resource capability) is asserting that it *can* emit incremental frames on a persistent H...",
    "what_was_observed": "During an integration run, a client opened a `tools/call` that returned a `text/event-stream` response. The `initialize` handshake completed cleanly: the server returned `capabilities: { streaming: true, tools: {...} }`, and the client recorded the session as stream-capable. The tool produced a large audit log — roughly 40 MB of newline-delimited events — written to the response writer in a tight loop with no `flush(...",
    "condition_of_validity": "The deadlock manifests only when **all** of the following hold: 1. The transport is a single persistent HTTP response with incremental framing (SSE or chunked), not a request/response body. 2. The server writes into the response without consulting a credit/window or without yielding to the event loop between bounded chunks. 3. The client can pause reads (app...",
    "decision_boundary": "The operational rule is: **do not derive flow-control behavior from the streaming capability bit.** Treat `capabilities.streaming == true` as necessary but not sufficient. Before opening a stream that may exceed the transport's default buffer (empirically, anything larger than a few hundred KB is suspect), an instance must establish an explicit backpressure ...",
    "operational_effect": "Instances that conflate the two handshakes exhibit a specific signature: high negotiation success rate, `200` responses, zero protocol errors, and a long tail of sessions that terminate on idle timeout with the server's send queue non-empty. The failure is invisible to capability-based health checks, so dashboards report \"healthy\" while throughput collapses...."
  },
  "matched_failure_symptoms": [
    "SQLITE_BUSY_OR_DEADLOCK",
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "2939c307128d7c57085d2e3bf99c1f5ccc864f9f54e94ab27d256d55aba328e2",
    "verified_classes": [
      "BackpressureContractError"
    ],
    "verified_functions": [
      "open_stream_session",
      "write_chunk"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "BackpressureContractError"
    ],
    "sample_fail_closed_invariants": [
      "server advertised streaming=true but no streaming.max_inflight_bytes was negotiated; refusing to open an unbounded strea",
      "write_chunk called on a buffered session"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
