Skip to content

fix(mcp): honor HTTP tool call timeout - #1003

Merged
vastsa merged 2 commits into
vastsa:mainfrom
hui455:fix/mcp-http-call-timeout-r2
Sep 24, 2026
Merged

vastsa merged 2 commits into
vastsa:mainfrom
hui455:fix/mcp-http-call-timeout-r2

Conversation

@hui455

@hui455 hui455 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Streamable HTTP MCP tool calls were cut off by the 10-second connection budget even after the handshake succeeded. Pass each request's operation budget to the HTTP transport, so tools/call may use its 100-second limit while initialization remains bounded to 10 seconds.

The regression test uses a delayed local HTTP MCP server and verifies that a call outlasting the handshake budget succeeds. Redirect and timeout handling retain their existing permission checks.

Specs and validation

  • Updated the MCP plugin security specification and E2E-024K scenario in English and Chinese.

  • pnpm build:js, desktop typecheck, and lint passed. pnpm docs:check fails on current origin/main because the new English UI design-system tables lack matching Chinese tables; this PR does not touch that page.

  • MCP-focused tests: 60/60 passed; isolated Electron trusted-extension E2E: 39/39 passed.

  • On upstream main 03e03d4, the GitHub JS job fails the existing architecture budget: apps/desktop/electron/main/index.ts has 1503 lines (limit 1500). These PRs do not change that file. PR base and Rust CI checks pass.

The agent-facing delayed MCP tool journey remains a Draft E2E scenario; no macOS/Linux run was performed. No persisted format or public API changes.

hui455 and others added 2 commits September 24, 2026 14:43
Use the active operation's timeout for remote MCP requests so a
successful handshake cannot shorten later tool calls.
Keep the published fix current without rewriting shared history.
@vastsa
vastsa merged commit 74a7204 into vastsa:main Sep 24, 2026
2 of 4 checks passed
vastsa added a commit that referenced this pull request Sep 24, 2026
Track active MCP tool calls by session, abort the local wait on session
stop, and send notifications/cancelled to the server without closing a
connection used by another session. Shared handshake waits can also be
interrupted promptly.

Rebased onto main (after #1003 and #1004), resolved transport signature
conflicts to carry both timeoutMs and signal parameters, and fixed
test file merge gaps.

closes #1005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants