fix(agent): raise MCP cold-start timeout to 30s in openai and deep runners#345
fix(agent): raise MCP cold-start timeout to 30s in openai and deep runners#345jellyfishing2346 wants to merge 1 commit into
Conversation
…nners Signed-off-by: Faizan Khan <faizanakhan2003@gmail.com>
5d63242 to
93e7607
Compare
|
Hi @DhavalRepo18, this PR fixes the cold-start timeout issue from #335. When a user runs the agent for the first time on a fresh install, some MCP servers like the vibration server take longer than 5 seconds to start up because they have to load heavy packages like scipy. This caused the whole run to crash. The fix bumps the timeout to 30 seconds in the openai-agent and deep-agent runners, which is generous enough to survive any cold start without affecting normal warm runs since those finish in well under a second. The claude-agent runner didn't need changes because it already has a 60 second timeout built into the SDK. All existing tests still pass, and the timeout can be overridden with the MCP_INIT_TIMEOUT_SECONDS environment variable for users on particularly slow machines. |
Description
SDK default of 5s is exceeded by heavy servers (e.g. vibration/scipy) on
first cold-start invocation. Plumb client_session_timeout_seconds into
MCPServerStdio (openai-agent) and session_kwargs.read_timeout_seconds into
MultiServerMCPClient connections (deep-agent). Configurable via
MCP_INIT_TIMEOUT_SECONDS env var. claude-agent unaffected (load_timeout_ms
already defaults to 60s).
Fix Details
Impact on Benchmarking
Related Issues
Verification Steps
uv run pytest tests/integrationChecklist