Skip to content

fix(mcp): shorten cloud discovery connects and fix timeout messages - #2112

Merged
phernandez merged 1 commit into
mainfrom
fix/1810-cloud-discovery-timeout
Nov 13, 2026
Merged

phernandez merged 1 commit into
mainfrom
fix/1810-cloud-discovery-timeout

Conversation

@phernandez

Copy link
Copy Markdown
Member

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, or BASIC_MEMORY_FORCE_LOCAL with BASIC_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

  • Discovery timeout: 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_client and get_cloud_proxy_client take an optional timeout; uploads and other callers keep the standard 10s connect.
  • Error text: _request_label names a request by its last non-empty path segment, so the timeout says GET 'workspaces' instead of GET ''.
  • Delete hint: only a timed-out DELETE says the operation may still be finishing server-side. Other timeouts say to check the server is reachable and retry.

Tests

  • test_list_discovers_cloud_projects_with_a_short_connect_timeout
  • test_list_skips_cloud_when_routing_is_forced_local
  • test_transport_timeout_names_a_collection_endpoint
  • test_transport_timeout_wrapped_in_tool_error now checks the hint appears only for DELETE.

just fast-check passes. just fast-test: 9463 passed, 94 skipped.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CMYVL1rjJwNnrvxniz1dDD

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]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T00:54:39.309019Z a87504f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@phernandez
phernandez merged commit 3e8a519 into main Nov 13, 2026
51 checks passed
@phernandez
phernandez deleted the fix/1810-cloud-discovery-timeout branch November 13, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Contact cloud only when config enables it; discovery ConnectTimeout stalls list_memory_projects

1 participant