Back to Signal Feed
CodeTracked since May 19, 2026

Add 30s timeout to mcp-v2 host-service relay calls

The PR adds a timeout guard to `hostServiceCall` in `packages/mcp-v2`, using `AbortController` so relay calls default to 30,000 ms (with optional override via `HostServiceCallOptions.timeoutMs`) and return a structured timeout error instead of letting MCP requests run until Vercel’s 300-second hard timeout.

hostServiceCallAbortControllerfetch timeoutVercel lambda

What Happened

  • The PR adds a timeout guard to `hostServiceCall` in `packages/mcp-v2`, using `AbortController` so relay calls default to 30,000 ms (with optional override via `HostServiceCallOptions.timeoutMs`) and return a structured timeout error instead of letting MCP requests run until Vercel’s 300-second hard timeout.
  • The PR adds a timeout guard to `hostServiceCall` in `packages/mcp-v2`, using `AbortController` so relay calls default to 30,000 ms (with optional override via `HostServiceCallOptions.timeoutMs`) and return a structured timeout error instead of letting MCP requests run until Vercel’s 300-second hard timeout.
  • 1 evidence item attached for review.

What is Different

Before

Scattered source updates, isolated context, and manual follow-up across multiple feeds.

Now

Introduced bounded request execution for relay-backed MCP tools with configurable timeout control, explicit abort handling, and timer cleanup, converting long-hanging calls into bounded failures returned as tool errors.

Why Track This

Why It Matters

MCP clients and users calling `agents_run`, `agents_list`, `workspaces_create`, and `workspaces_delete` should experience faster failure recovery when a host/relay is slow or unavailable, because stalled calls now stop around 30 seconds instead of occupying a Vercel Lambda for 300 seconds and flooding operations with timeout incidents. The change uses `AbortController` in `hostServiceCall` with `HostServiceCallOptions.timeoutMs` overrides and catches the raised timeout (`Host <id> timed out after <ms> for <procedure>`) in the tool handler so callers get an immediate error response; teams should watch for legitimate long-running relay calls that may need larger timeout settings and verify client surfaces now correctly handle the new tool-error path.

Impact

MCP clients and users calling `agents_run`, `agents_list`, `workspaces_create`, and `workspaces_delete` should experience faster failure recovery when a host/relay is slow or unavailable, because stalled calls now stop around 30 seconds instead of occupying a Vercel Lambda for 300 seconds and flooding operations with timeout incidents. The change uses `AbortController` in `hostServiceCall` with `HostServiceCallOptions.timeoutMs` overrides and catches the raised timeout (`Host <id> timed out after <ms> for <procedure>`) in the tool handler so callers get an immediate error response; teams should watch for legitimate long-running relay calls that may need larger timeout settings and verify client surfaces now correctly handle the new tool-error path.

What To Watch Next

  • Watch whether hostServiceCall becomes a repeated pattern.
  • Track follow-up changes around Model Context Protocol.
  • Compare future signals against this evidence trail.
  • Re-check risk flags: validate_timeout_ms_coverage_for_slow_hosts, monitor_increase_in_timeout_error_rates.
Open Topic TimelineOpen Technical EventOpen Original Sourcevalidate_timeout_ms_coverage_for_slow_hosts / monitor_increase_in_timeout_error_rates / verify_clients_handle_tool_error_shape / audit_override_values_for_regressions

Supporting Evidence