fix: bump context-server request timeout from 60s to 180s - #47
Merged
Conversation
In our spec-task containers, several stdio MCPs (chrome-devtools, github) are configured with `npx <pkg>@latest` and an HTTP MCP (helixos) points at a still-warming-up local API container. On a cold container start they all attempt their JSON-RPC `initialize` handshake at the same instant Zed boots. With Zed startup competing for CPU against settings-sync-daemon, language servers, etc., and `npx` doing an npm download on first run, the handshake routinely exceeds upstream's 60s `DEFAULT_REQUEST_TIMEOUT`. Three `Context server request timeout` errors fire at the same instant, all three context_servers are marked failed, and their tools never appear for the session — most visibly: <tool_use_error>Error: No such tool available: mcp__chrome-devtools__navigate_page</tool_use_error> Toggling the server off/on in Zed settings appears to fix it because by then npm has cached the package and the second initialize completes in well under 5s — but that's a manual workaround the user should not need. Bump to 180s. Cold-start `npx chrome-devtools-mcp@latest` is ~60–90s on a contended container, so 180s gives ~2x headroom. Genuine failures are still visible in the UI within a minute or two; this is much better than silently losing tools. Per-server `request_timeout` in `ContextServerSettings` would be the more elegant fix but it doesn't exist upstream — schema, project store, and `ContextServer::new_with_timeout` would all need touching. The constant bump is one line. Updates portingguide.md (Critical Fix #10 + Modified Upstream Files). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
3 tasks
lukemarsden
added a commit
to helixml/helix
that referenced
this pull request
Apr 26, 2026
Replaces the unmerged branch commit with the merge commit on Zed main after helixml/zed#47 landed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
4 tasks
This was referenced May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps
DEFAULT_REQUEST_TIMEOUTincrates/context_server/src/client.rsfrom 60s to 180s. Documents the change inportingguide.md(new Critical Fix #10, plus an entry under Modified Upstream Files).Problem
In a cold-start spec-task container, three
Context server request timeouterrors fire at the same instant — exactly 60s after Zed startup. All three context_servers are marked failed and their tools never appear for the session. Model reports:Why all three trip together:
chrome-devtoolsandgithubarenpx <pkg>@latest— first run does an npm downloadhelixosis HTTP, but the local Helix API container is still warming upinitializerequests fire in parallel during Zed boot, while CPU is contended by Zed itself, settings-sync-daemon, language servers, etc.Reproduced in
ubuntu-external-01kq5h23dvkqzqy2jmxch8hgb2.Zed.log(timestamps trimmed):User confirmed that toggling the server off/on in Zed settings fixes it (npm has cached the package by then) — but that's a manual workaround they shouldn't need.
Fix
Why 180s
Cold-start
npx chrome-devtools-mcp@lateston a contended container is typically 60–90s. 180s gives ~2x headroom without making genuine failures noticeably slower to surface.Why not per-server
request_timeoutin settingsContextServerSettingshas norequest_timeoutfield upstream. Adding one would touch the settings schema, the project store, andContextServer::new_with_timeoutconstructor — much larger change. The constant bump is one line and benefits every MCP uniformly.Test plan
mcp__chrome-devtools__list_pagesworks on first try (no toggling)Zed.logno longer showscancelled csp request task for "initialize"/Context server request timeouterrors at startup🤖 Generated with Claude Code