René's URL Explorer Experiment


Title: notifications/cancelled for request `7` cancels a concurrent request `"7"` (`_in_flight` keyed by `coerce_request_id`) · Issue #3807 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: notifications/cancelled for request `7` cancels a concurrent request `"7"` (`_in_flight` keyed by `coerce_request_id`) · Issue #3807 · modelcontextprotocol/python-sdk

X Title: notifications/cancelled for request `7` cancels a concurrent request `"7"` (`_in_flight` keyed by `coerce_request_id`) · Issue #3807 · modelcontextprotocol/python-sdk

Description: Initial checks Reproduced on 2.3.0 and on main d7845c0. Related, but a different code path: #3786 is the Streamable HTTP stream keys (str(id)). This bug also reproduces over stdio. #3432 is about which strings coerce_request_id folds ("0...

Open Graph Description: Initial checks Reproduced on 2.3.0 and on main d7845c0. Related, but a different code path: #3786 is the Streamable HTTP stream keys (str(id)). This bug also reproduces over stdio. #3432 is about w...

X Description: Initial checks Reproduced on 2.3.0 and on main d7845c0. Related, but a different code path: #3786 is the Streamable HTTP stream keys (str(id)). This bug also reproduces over stdio. #3432 is about w...

Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/3807

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"notifications/cancelled for request `7` cancels a concurrent request `\"7\"` (`_in_flight` keyed by `coerce_request_id`)","articleBody":"### Initial checks\n\n- Reproduced on 2.3.0 and on `main` d7845c0.\n- Related, but a different code path:\n  - #3786 is the Streamable HTTP stream keys (`str(id)`). This bug also reproduces over stdio.\n  - #3432 is about which strings `coerce_request_id` folds (`\"07\"`, `\"+7\"`). This bug occurs with the canonical `\"7\"` the function folds by design.\n  - #3060 and #2655 cover a client *reusing* one id. Here the ids differ.\n\n### What happens\n\n`JSONRPCDispatcher` stores inbound requests as `_in_flight[coerce_request_id(req.id)]`. With `7` and `\"7\"` in flight at once, they share a slot. A `notifications/cancelled` naming the earlier one cancels the later one, which then never answers, while the earlier one runs to completion and can no longer be cancelled.\n\n### Reproduction (stdio, unmodified SDK)\n\nA server whose tool blocks until released, receiving these frames in order:\n\n```\n{\"jsonrpc\":\"2.0\",\"id\":\"9007199254740991\",\"method\":\"tools/call\",\"params\":{\"name\":\"gate\",\"arguments\":{\"tag\":\"g0\"}}}\n{\"jsonrpc\":\"2.0\",\"id\":9007199254740991,\"method\":\"tools/call\",\"params\":{\"name\":\"gate\",\"arguments\":{\"tag\":\"g3\"}}}\n{\"jsonrpc\":\"2.0\",\"method\":\"notifications/cancelled\",\"params\":{\"requestId\":\"9007199254740991\"}}\n```\n\nAfter both tools are released, `\"9007199254740991\"` (the one cancelled) answers and `9007199254740991` gets no response. A stdlib-only script that sends these frames to any stdio server command, and exits 1 on the defect: https://github.com/ashirimi1019/mcp-faultline/blob/main/evidence/fl001/minimized/repro_py_stdio_random_seed_6_min.py\n\n### Expected\n\nCancelling one id never affects another. The TypeScript SDK servers (1.32.2 and 2.4.0) key handlers by the typed id and pass the same scenarios.\n\n### Decision needed\n\nShould `notifications/cancelled` match the request id **exactly**?\n\nFixing the slot (exact-id keys) is straightforward. But `test_cancelled_correlates_across_string_and_int_request_id_forms` pins a tolerance where a cancel for `\"7\"` cancels an in-flight `7`. That tolerance can't be kept safely: a late cancel for a just-completed `\"7\"` (a race the spec requires handling gracefully) is indistinguishable from a stringified cancel for `7`. Any fallback, even one that requires a single match, cancels the wrong request in that race. The spec says cancels for unknown or completed ids SHOULD be ignored, and both SDKs' own senders keep the id's type. The analysis is in https://github.com/ashirimi1019/mcp-faultline/blob/main/docs/upstream/exact-id-cancellation.md.\n\n### Patch\n\nA candidate change (8 lines in `jsonrpc_dispatcher.py`, plus regression tests including the late-cancel race) is ready if exact matching is acceptable: https://github.com/ashirimi1019/mcp-faultline/blob/main/docs/upstream/patches/0001-Cancel-only-the-exact-JSON-RPC-request-id.patch\n\nValidated on Ubuntu from source (https://github.com/ashirimi1019/mcp-faultline/actions/runs/41533686584):\n- upstream `scripts/test` passes with 100% coverage and strict-no-cover;\n- `ruff` and `pyright` are clean;\n- typed-id scenarios go from 19/24 to 24/24 over stdio;\n- 150 randomised scenarios pass across stdio and HTTP. The HTTP part also needs the #3786 change.\n\nI'd open a PR only if assigned.\n\n\u003csub>AI disclosure: the defect was found by an automated harness, and this report, the patch and its tests were drafted with AI assistance (Claude Code). Results come from the linked CI run.\u003c/sub>\n","author":{"url":"https://github.com/ashirimi1019","@type":"Person","name":"ashirimi1019"},"datePublished":"2026-11-02T22:58:10Z","url":"https://github.com/modelcontextprotocol/python-sdk/issues/3807"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:fa526992-f1ee-d927-3d4c-bfc49f1a81ab
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCAC0:D5AA4:22BB7E:2F7160:6B00B9A9
html-safe-nonce54ebe423ac0089adc784cdb7ed9433fb14ce1e5907a7cd507e8ba325e625d04e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUMwOkQ1QUE0OjIyQkI3RToyRjcxNjA6NkIwMEI5QTkiLCJ2aXNpdG9yX2lkIjoiNDIyMTQxNTY5OTM4MzM2ODEwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1254606965e95576c35dba81ecf11b7ea96fd4b4aee6f7b127933f02cc877cfc
hovercard-subject-tagissue:6172585709
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/python-sdk/3807/issue_layout
twitter:imagehttps://opengraph.githubassets.com/04b4c9d2a314f042599ef7d4da902da493dc167b12d7a2c1e03a3a0d7b258fa7/modelcontextprotocol/python-sdk/issues/3807
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/04b4c9d2a314f042599ef7d4da902da493dc167b12d7a2c1e03a3a0d7b258fa7/modelcontextprotocol/python-sdk/issues/3807
og:image:altInitial checks Reproduced on 2.3.0 and on main d7845c0. Related, but a different code path: #3786 is the Streamable HTTP stream keys (str(id)). This bug also reproduces over stdio. #3432 is about w...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameashirimi1019
hostnamegithub.com
expected-hostnamegithub.com
None1d07c25977adfc5ff6acb0a962a9bc168c07afbda6fef765f9761c350c2ae4a2
turbo-cache-controlno-preview
go-importgithub.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git
octolytics-dimension-user_id182288589
octolytics-dimension-user_loginmodelcontextprotocol
octolytics-dimension-repository_id862584018
octolytics-dimension-repository_nwomodelcontextprotocol/python-sdk
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id862584018
octolytics-dimension-repository_network_root_nwomodelcontextprotocol/python-sdk
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release5429cbfc6aca8c7b9a086a3c8f47400346f38cc9
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/issues/3807#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2F3807
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2F3807
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=modelcontextprotocol%2Fpython-sdk
Reloadhttps://github.com/modelcontextprotocol/python-sdk/issues/3807
Reloadhttps://github.com/modelcontextprotocol/python-sdk/issues/3807
Reloadhttps://github.com/modelcontextprotocol/python-sdk/issues/3807
modelcontextprotocolhttps://github.com/modelcontextprotocol
python-sdkhttps://github.com/modelcontextprotocol/python-sdk
Codehttps://github.com/modelcontextprotocol/python-sdk
Issues308 (308)https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests112 (112)https://github.com/modelcontextprotocol/python-sdk/pulls
Actionshttps://github.com/modelcontextprotocol/python-sdk/actions
Projectshttps://github.com/modelcontextprotocol/python-sdk/projects
Security and quality12 (12)https://github.com/modelcontextprotocol/python-sdk/security
Insightshttps://github.com/modelcontextprotocol/python-sdk/insights
https://github.com/modelcontextprotocol/python-sdk
New issuehttps://github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/3807
New issuehttps://github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/3807
notifications/cancelled for request 7 cancels a concurrent request "7" (_in_flight keyed by coerce_request_id)https://github.com/modelcontextprotocol/python-sdk/issues/3807#top
bugSomething isn't workinghttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22bug%22
v2Affects the v2 line (2.x on main)https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
https://github.com/ashirimi1019
ashirimi1019https://github.com/ashirimi1019
on Nov 2, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3807#issue-6172585709
d7845c0https://github.com/modelcontextprotocol/python-sdk/commit/d7845c073a2b9ba5ab2817ecf93d3e45ef24cd14
streamable HTTP: integer and string request ids with the same text share one response stream; a string id can displace the GET stream #3786https://github.com/modelcontextprotocol/python-sdk/issues/3786
coerce_request_id() folds non-canonical numeric strings, conflating wire-distinct JSON-RPC ids #3432https://github.com/modelcontextprotocol/python-sdk/issues/3432
streamable HTTP (stateful): concurrent requests with duplicate JSON-RPC ids cross-wire responses — one request receives another's payload, the other hangs #3060https://github.com/modelcontextprotocol/python-sdk/issues/3060
Streamable HTTP server silently drops in-flight request when client reuses a JSON-RPC id #2655https://github.com/modelcontextprotocol/python-sdk/issues/2655
https://github.com/ashirimi1019/mcp-faultline/blob/main/evidence/fl001/minimized/repro_py_stdio_random_seed_6_min.pyhttps://github.com/ashirimi1019/mcp-faultline/blob/main/evidence/fl001/minimized/repro_py_stdio_random_seed_6_min.py
https://github.com/ashirimi1019/mcp-faultline/blob/main/docs/upstream/exact-id-cancellation.mdhttps://github.com/ashirimi1019/mcp-faultline/blob/main/docs/upstream/exact-id-cancellation.md
https://github.com/ashirimi1019/mcp-faultline/blob/main/docs/upstream/patches/0001-Cancel-only-the-exact-JSON-RPC-request-id.patchhttps://github.com/ashirimi1019/mcp-faultline/blob/main/docs/upstream/patches/0001-Cancel-only-the-exact-JSON-RPC-request-id.patch
https://github.com/ashirimi1019/mcp-faultline/actions/runs/41533686584https://github.com/ashirimi1019/mcp-faultline/actions/runs/41533686584
streamable HTTP: integer and string request ids with the same text share one response stream; a string id can displace the GET stream #3786https://github.com/modelcontextprotocol/python-sdk/issues/3786
claudehttps://github.com/apps/claude
bugSomething isn't workinghttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22bug%22
v2Affects the v2 line (2.x on main)https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
on Nov 3, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3807#event-35012809478
https://github.com/Shanmukh-l33t
Shanmukh-l33thttps://github.com/Shanmukh-l33t
on Nov 3, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3807#issuecomment-6608206603
af4c6f4https://github.com/modelcontextprotocol/python-sdk/commit/af4c6f4db2cd207f44374cd324a12cfbee8d2da6
https://github.com/media-ctrl
media-ctrlhttps://github.com/media-ctrl
on Nov 4, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3807#issuecomment-6630208036
https://github.com/1828703450qqcom-ux
1828703450qqcom-uxhttps://github.com/1828703450qqcom-ux
on Nov 4, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3807#issuecomment-6635677180
#3815https://github.com/modelcontextprotocol/python-sdk/pull/3815
https://github.com/Shanmukh-l33t
Shanmukh-l33thttps://github.com/Shanmukh-l33t
on Nov 4, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3807#issuecomment-6635757630
https://github.com/ashirimi1019
ashirimi1019https://github.com/ashirimi1019
on Nov 4, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3807#issuecomment-6639415508
ChatGPT Codex Connectorhttps://www.chatgpt.com
#3815https://github.com/modelcontextprotocol/python-sdk/pull/3815
compatibility analysishttps://github.com/ashirimi1019/mcp-faultline/blob/main/docs/upstream/exact-id-cancellation.md
Linux CI validationhttps://github.com/ashirimi1019/mcp-faultline/actions/runs/41533686584
patch and regression testshttps://github.com/ashirimi1019/mcp-faultline/tree/main/docs/upstream/patches
https://github.com/Shanmukh-l33t
Shanmukh-l33thttps://github.com/Shanmukh-l33t
on Nov 4, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3807#issuecomment-6639691542
#3815https://github.com/modelcontextprotocol/python-sdk/pull/3815
Sign up for freehttps://github.com/signup?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/3807
Sign in to commenthttps://github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/3807
bugSomething isn't workinghttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22bug%22
v2Affects the v2 line (2.x on main)https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.