{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-enforce-per-session-credit-accounting-in-an-http-native-mcp-multiplexer-before-shared-transport-buffers-absorb-cross-session-ba",
  "title": "Where must an instance enforce per-session credit accounting in an HTTP-native MCP multiplexer before shared transport buffers absorb cross-session backpressure?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to HTTP-native MCP servers that multiplex multiple logical sessions (streamable HTTP / SSE-per-session) over a shared connection pool or shared worker process, where per-session flow control is emulated rather than delegated to the transport. Does not apply to stdio-per-process MCP servers, where the OS pipe provides natural backpressure, nor to single-session deployments.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-per-session-credit-accounting-in-an-http-native-mcp-multiplexer-before-shared-transport-buffers-absorb-cross-session-ba.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-per-session-credit-accounting-in-an-http-native-mcp-multiplexer-before-shared-transport-buffers-absorb-cross-session-ba.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-per-session-credit-accounting-in-an-http-native-mcp-multiplexer-before-shared-transport-buffers-absorb-cross-session-ba.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1629,
    "python_slice_tokens": 287,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **transport-level backpressure** and **session-level flow control**. HTTP gives you the former for free: when a TCP send buffer fills, `write()` blocks or returns `EAGAIN`, and the kernel propagates that pressure back to the producer. MCP multiplexing gives you the latter only if you build it, because a single HTTP/2 c...",
    "what_was_observed": "A streamable-HTTP MCP server fronted by an HTTP/2 terminator was serving ~40 concurrent agent sessions per connection. Session `A` issued a `tools/call` for a long-running operation and its client stopped reading the SSE response stream — the agent instance had entered a reasoning pause and was not draining `response.body`. The server kept writing `notifications/progress` frames for `A` into the shared HTTP/2 connect...",
    "condition_of_validity": "The invariant that must hold is: **a session's outbound buffer must be bounded and accounted before it enters any shared transport buffer, and a session that exhausts its credit must be suspended or terminated without suspending the shared writer.** This is valid only when the multiplexer owns per-session credit accounting *upstream* of the shared writer. Co...",
    "decision_boundary": "The boundary is reached when `sum(per_session_outbound_bytes) > connection_send_buffer_bytes`. Below that threshold, connection-level backpressure and session-level flow control are observationally equivalent — the connection never fills, so no session ever starves another. Above it, the two diverge sharply, and the multiplexer must have already been enforci...",
    "operational_effect": "With per-session credit accounting in place, a stalled session's `put_nowait` raises `QueueFull` at the session queue boundary, the multiplexer emits a terminal error frame for that session and closes its stream, and the shared writer continues draining healthy sessions without ever observing the stalled session's window. The observable effect is that one ag..."
  },
  "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": "56ae31d7e5e996afa92a4e700037b24447afc11f8fb74093d863b173e325848b",
    "verified_classes": [
      "SessionCreditExhausted",
      "Session",
      "MultiplexedWriter"
    ],
    "verified_functions": [
      "__init__",
      "register",
      "enqueue",
      "run_writer",
      "_terminate"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SessionCreditExhausted"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "asyncio",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
