Repository navigation
fix(mcp): shorten cloud discovery connects and fix timeout messages - #2112
Merged
Merged
Conversation
A local project list stalled for 12.5s when one connect to the cloud was slow, because discovery used the standard 10s connect timeout (#1810). Discovery of workspaces and their projects now gives up connecting after 3s. Reads keep 30s. Cloud is still checked by default whenever credentials exist. Project listing now honors explicit local routing the same way workspace resolution already did, through one shared check. Transport error messages named a request by the text after its last slash, which printed GET '' for /workspaces/. They now use the last path segment. The hint that a long delete may still be finishing appears only on DELETE. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CMYVL1rjJwNnrvxniz1dDD Signed-off-by: phernandez <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Closes #1810.
Decision on the gating proposal
Cloud stays checked by default whenever cloud credentials exist. A logged-in user should see their cloud projects without extra setup. Explicit local routing (
--local, orBASIC_MEMORY_FORCE_LOCALwithBASIC_MEMORY_EXPLICIT_ROUTING) is the opt-out. Project listing did not honor it before; it now uses the same check as workspace resolution (_may_discover_cloud).Changes
build_discovery_timeout()sets a 3s connect timeout for listing workspaces (/workspaces/) and each workspace's projects. Reads, writes and pool keep 30s.get_cloud_control_plane_clientandget_cloud_proxy_clienttake an optionaltimeout; uploads and other callers keep the standard 10s connect._request_labelnames a request by its last non-empty path segment, so the timeout saysGET 'workspaces'instead ofGET ''.Tests
test_list_discovers_cloud_projects_with_a_short_connect_timeouttest_list_skips_cloud_when_routing_is_forced_localtest_transport_timeout_names_a_collection_endpointtest_transport_timeout_wrapped_in_tool_errornow checks the hint appears only for DELETE.just fast-checkpasses.just fast-test: 9463 passed, 94 skipped.🤖 Generated with Claude Code
https://claude.ai/code/session_01CMYVL1rjJwNnrvxniz1dDD