Back to Signal Feed
CodeTracked since May 19, 2026

Extend Vercel MCP stream session timeout to 800s

The PR adds `maxDuration = 800` to the two MCP streaming routes (`/api/agent/mcp` and `/api/v2/agent/mcp`) to override Vercel’s default 300s timeout. This is a direct fix for the reported forced disconnects that repeatedly dropped Cursor AI coding sessions at ~5 minutes.

VercelmaxDurationWebStandardStreamableHTTPServerTransport/api/agent/mcp

What Happened

  • The PR adds `maxDuration = 800` to the two MCP streaming routes (`/api/agent/mcp` and `/api/v2/agent/mcp`) to override Vercel’s default 300s timeout. This is a direct fix for the reported forced disconnects that repeatedly dropped Cursor AI coding sessions at ~5 minutes.
  • The PR adds `maxDuration = 800` to the two MCP streaming routes (`/api/agent/mcp` and `/api/v2/agent/mcp`) to override Vercel’s default 300s timeout. This is a direct fix for the reported forced disconnects that repeatedly dropped Cursor AI coding sessions at ~5 minutes.
  • 1 evidence item attached for review.

What is Different

Before

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

Now

Introduces an explicit `maxDuration = 800` configuration in both MCP route handlers so their Vercel execution window is extended from the 300s default to about 13 minutes, matching expected session duration and preventing premature server termination of active streaming sessions.

Why Track This

Why It Matters

Cursor users running MCP-based AI coding sessions will avoid abrupt session drops around the 5-minute mark, so long-running coding interactions are far less likely to be interrupted mid-task. By explicitly setting `maxDuration` to 800 seconds in `apps/api/src/app/api/agent/[transport]/route.ts` and `apps/api/src/app/api/v2/agent/[transport]/route.ts`, the handler lifecycle now bypasses Vercel’s default timeout behavior; teams should continue watching whether sessions still fail near or after 13 minutes and whether timeout-driven reconnect or retry behavior changes for these routes in production traffic.

Impact

Cursor users running MCP-based AI coding sessions will avoid abrupt session drops around the 5-minute mark, so long-running coding interactions are far less likely to be interrupted mid-task. By explicitly setting `maxDuration` to 800 seconds in `apps/api/src/app/api/agent/[transport]/route.ts` and `apps/api/src/app/api/v2/agent/[transport]/route.ts`, the handler lifecycle now bypasses Vercel’s default timeout behavior; teams should continue watching whether sessions still fail near or after 13 minutes and whether timeout-driven reconnect or retry behavior changes for these routes in production traffic.

What To Watch Next

  • Watch whether Vercel becomes a repeated pattern.
  • Track follow-up changes around AI Coding Agents.
  • Compare future signals against this evidence trail.
  • Re-check risk flags: monitor_error_rate_on_mcp_routes_after_timeout_change, track_mcp_sessions_exceeding_13_minute_limit.
Open Topic TimelineOpen Technical EventOpen Original Sourcemonitor_error_rate_on_mcp_routes_after_timeout_change / track_mcp_sessions_exceeding_13_minute_limit / validate_timeout_behavior_for_other_transport_routes

Supporting Evidence