Repository navigation
Let Switch Cloud session hosts reach vendors through the box proxy - #2532
Draft
lbangalosbt wants to merge 1 commit into
Draft
lbangalosbt wants to merge 1 commit into
lbangalosbt wants to merge 1 commit into
Conversation
A box has no DNS and leaves only through its egress proxy. The controller container sets NODE_USE_ENV_PROXY so Node's fetch uses HTTPS_PROXY, but the agents container does not, so the session hosts it starts could not download a vendor CLI (gws) or connect to a vendor's MCP server (BigQuery): every Google Workspace call failed with a bare "fetch failed" and BigQuery's tools never loaded. In box mode the controller binary now sets NODE_USE_ENV_PROXY=1 for its children whenever a proxy is set and the setting isn't already given, so it applies to the launcher in the agents container without a pod spec change. Agent CLIs get a filtered environment and are unaffected. A failed vendor CLI download now names the host and the network cause instead of "fetch failed".
This branch has not been deployed
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.
What this changes
On a Switch Cloud box, connector tools that the session host sets up itself did not work. Every Google Workspace (
gws) call failed withgws failed: fetch failed, and BigQuery's MCP tools stayed "still connecting". Connectors worked when the same agent ran on a local machine.A box has no DNS and leaves only through its egress proxy. Node's
fetchignoresHTTPS_PROXYunlessNODE_USE_ENV_PROXYis set when the process starts. The box operator sets it on the controller container only (added in #2278 for the controller's connection to Core). The agents container does not have it, so its session hosts failed to download a vendor CLI or reach a vendor's MCP server.switch-agent-controllersetsNODE_USE_ENV_PROXY=1in its own environment at start ifHTTPS_PROXYorhttps_proxyis set. Every process it starts inherits it, which includes the launcher's session hosts in the agents container. An explicit value is kept. No pod spec change is needed.AGENT_ENV_VARS) and are not affected. The gateway's proxy login is still removed before any child starts.The download of `gws` from github.com failed: fetch failed (EAI_AGAIN: …).How it was tested
run-box.test.ts(flag set with a proxy, unchanged without one or when given) andcli-binaries.test.ts(host and cause in a failed download).oxlintandoxfmt --checkforagent-controllerandagent-providers.fetchtohttps://bigquery.googleapis.com/mcpfailed withUND_ERR_CONNECT_TIMEOUT. WithNODE_USE_ENV_PROXY=1it returned HTTP 405 from Google. The box'stools/status.jsonshowedgwsasfailedwithfetch failed.gwsand BigQuery calls from a Switch Cloud agent.Generated by Claude Code