{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-reconnects-to-an-mcp-server-mid-session-and-the-server-treats-the-new-transport-as-a-fresh-session-capability-scoped-aut",
  "title": "What happens when an instance reconnects to an MCP server mid-session and the server treats the new transport as a fresh session: capability-scoped authorization silently de-scopes to the negotiated root set",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP (Model Context Protocol) deployments where a client instance holds a long-lived session whose tool authorization is bound to session-scoped capability grants, and where the transport (stdio, SSE, or streamable HTTP) can drop and re-establish underneath the logical agent. Does not apply to stateless one-shot tool invocation where every call re-negotiates its own authorization envelope.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-reconnects-to-an-mcp-server-mid-session-and-the-server-treats-the-new-transport-as-a-fresh-session-capability-scoped-aut.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-reconnects-to-an-mcp-server-mid-session-and-the-server-treats-the-new-transport-as-a-fresh-session-capability-scoped-aut.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-reconnects-to-an-mcp-server-mid-session-and-the-server-treats-the-new-transport-as-a-fresh-session-capability-scoped-aut.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2226,
    "python_slice_tokens": 496,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two things an MCP client believes are the same object and the server believes are two different objects: *the logical agent instance* and *the protocol session*. The agent's identity is a durable, application-level concept—\"this is instance `agent-7f3a`, mid-task, holding a grant to call `fs.write` scoped to `/work/out`.\" The MCP session is a trans...",
    "what_was_observed": "A file-management agent was mid-task: it had called `initialize`, then received an out-of-band capability grant via a `notifications/tools/list_changed` flow after the user approved write access to `/work/out`. That grant was recorded server-side against session `sess-A`. The agent then performed a long `tools/call` (`fs.read` on a 40 MB log), during which the SSE stream idle-timed out at the load balancer's 60-secon...",
    "condition_of_validity": "This failure is bounded by three concurrency conditions, and it only manifests when all three hold: - **The session carries accumulated authorization state.** If every tool call is authorized purely from the connection's declared roots with no accumulation (no approval flow, no `list_changed` extension), a reconnect is harmless—the re-negotiated set equals t...",
    "decision_boundary": "The architectural fork is where session identity is anchored. - **Anchor on transport (default MCP behavior):** session = connection. Simple, stateless server, but a reconnect is indistinguishable from a new client. Authorization state must be re-derived from declared roots, and any accumulated grant is lost. This is correct *only* if the client replays the ...",
    "operational_effect": "The concrete consequences, in order of how they bite: 1. **Silent scope narrowing masquerades as tool absence.** `-32601` is indistinguishable from \"this server never had that tool.\" A planner that branches on error code will take the wrong recovery path. Always emit a distinguishable authorization error and require the client to treat `-32001` as a hard sto..."
  },
  "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": "416602972af28d6ccba647b8cfeb6db1ad5d7e638133883d5eeae7310d9069fa",
    "verified_classes": [
      "ScopeDiscontinuityError",
      "GrantEpoch",
      "TaskBinding",
      "SessionGuard"
    ],
    "verified_functions": [
      "guarded_write",
      "snapshot",
      "__init__",
      "begin_task",
      "check_before_call"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ScopeDiscontinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
