Client: an abandoned call_tool sends no notifications/cancelled — the MRTR helper hides each round's RequestHandle
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Start by reading RunningService::call_tool, call_tool_with_mrtr_max_rounds, and peer.call_tool_once to trace how each round's RequestHandle is managed. The issue identifies three possible approaches; assess how cancellation interacts with retries and input_required handling. Done means an abandoned or cancelled call sends notifications/cancelled for its in-flight round.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
rmcp 3.5.0, client side. A caller that abandons a tools/call — its own deadline passed, say — has no way to tell the server, because the MRTR helper hides the request it is waiting on.
RunningService::call_tool (via call_tool_with_mrtr_max_rounds) drives each round with peer.call_tool_once → send_request, which awaits a RequestHandle internally. So:
- Dropping the
call_toolfuture sends nothing.RequestHandlehas noDropbehaviour;send_timeout_cancel_notificationruns only when the handle's ownPeerRequestOptionstimeout fires. A wrapper liketokio::time::timeout(bound, service.call_tool(params))abandons the request locally while the server keeps working on it, and its response stream stays open until the server answers or the socket's idle timeout fires. - A caller can't drive the rounds itself either.
send_cancellable_request/send_request_with_optionreturn aRequestHandlewithcancel(), but answering aninput_requiredround needsprepare_input_required_retry, which is private. Re-implementing it means re-implementing the elicitation hand-off to the localClientHandler.
A call_tool that can be cancelled through any of these would do:
- A drop guard in the MRTR driver that holds the current round's
RequestHandleand sendsnotifications/cancelledfor it when the future is dropped mid-round (the cheapest; it covers everytimeout/select!caller). - An option on
call_toolfor a total deadline or aCancellationToken, which sendsnotifications/cancelledfor the round in flight when it fires (the spirit ofPeerRequestOptions::max_total_timeout, across rounds). prepare_input_required_retrymade public, so callers can drive rounds withsend_cancellable_request.
(1) seems the most useful, since abandoning a future is how most async callers bound a call.
Context: agentd bounds every tool call it makes on behalf of a workflow step or a model turn. Today an abandoned call is documented as "not cancelled" because of this (crates/mcp/src/rmcp_client.rs, call_tool).
- Ngôn ngữ chính
- Rust
- Star
- 4k
- Fork
- 654
- Merge trung bình
- 3 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 37
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/rust-sdk
-
Streamable HTTP client: a 401 or 403 with a JSON-RPC error body and no WWW-Authenticate loses its HTTP statusCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug P2 ready for work T-security T-transport
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/rust-sdk#1339 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
rmcp and rmcp-macros crates no longer include LICENSE (regression since 1.3.0)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug P2 ready for work T-config
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/rust-sdk#1335 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
auth: refresh_token() requests offline_access that was never granted, so refreshes fail with invalid_scopeCó thể đã có người làm @jstar0 đã nhận 3 ngày trước. Đang mởbug P1 ready for work T-security T-transport
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
modelcontextprotocol/rust-sdk#1330 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
P3 question Stale T-documentation T-enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
modelcontextprotocol/rust-sdk#1155 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Non-object outputSchema and structuredContent are sent to clients that negotiated 2025-06-18 / 2025-11-25, where an object is requiredCó thể đã có người làm @Cassian433 đã nhận hôm nay. Đang mởbug P1 ready for work T-handler T-model
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 28/100
modelcontextprotocol/rust-sdk#1337 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của modelcontextprotocol/rust-sdk
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eclipse-opensovd/classic-diagnostic-adapter#616 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
track: content
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
0xAndersen/witness-log#10 ·
-
follow-up main-defect wave-A
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
carrick-sh/carrick#249 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
lugassawan/swe-workbench#799 ·
Maintainer thường phản hồi trong vòng 1 ngày