fix(server): cloud MCP probe transport failures fail open, never manufacture an outage - #2823
Merged
Merged
Conversation
…facture an outage On corporate Windows machines with TLS interception, the health check's direct tools/list probe (Node undici, no OS trust store) threw 'fetch failed' and was misclassified as cloud_tools_missing — flipping usable to false, blocking delivery from being marked applied, and worst, feeding the extensions-preview steering plugin a per-prompt instruction telling the model Cloud agent access is not ready. The model then refused MCP tools that the engine (Bun, OS trust) had registered, connected, and could call the whole time: a false-negative probe manufactured a real outage. - transport-thrown probes now report probe_unreachable (diagnostic only): when the engine says the MCP is connected they no longer join failures, so usable/phase/delivery reflect the engine's reality - the probe now prefers Electron net.fetch (Chromium, OS trust store) when embedded, falling back to global fetch elsewhere - steering fails open: engine connected + probe-side failure returns the neutral instruction, never 'Direct the user to Repair and test' - direct probe failures stay visible in the health JSON for support
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Member
Author
|
Live before/after on a real stack (real OpenWork server via
The pre-fix column matches the field diagnostic from the affected machine byte-for-byte. Mock endpoint distinguishes callers by MCP |
This was referenced Jul 16, 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
Root-cause fix for the field incident where a healthy Cloud MCP appeared broken on a corporate Windows machine and the agent refused to use its tools.
The chain: the health check's direct
tools/listprobe uses Node fetch (undici), which lacks the OS trust store — behind corporate TLS interception it throwsfetch failed. That transport error was misclassified ascloud_tools_missing, which (a) flippedusableto false, (b) keptdelivery.appliedRevisionatnullforever, and (c) fed theextensions-previewsteering plugin the degraded per-prompt instruction ('OpenWork Cloud agent access is not ready… Direct the user to Settings → Connect → Repair and test'). The model obeyed our own steering and refused MCP tools that the engine (Bun, OS trust store) had connected and could call the whole time — verified in the field by running the same engine standalone (noOPENWORK_SERVER_URLenv → neutral steering → tool calls succeeded against the same endpoint, same bearer, same workspace).Changes
cloud-mcp-health.ts: transport-thrown probes now produceprobe_unreachable(new failure code), kept diagnostic-only when the engine reports the MCP connected — the engine is authoritative;usable/phase/delivery now reflect engine reality. Probe failures remain visible in the health JSON (tools.direct.failure) for support.net.fetch(Chromium stack, OS trust) when embedded in the desktop app; falls back to global fetch standalone/tests.extensions-preview-steering.ts: fail-open guard — engine connected + probe-side failure (probe_unreachable/cloud_tools_missing) returns the neutral instruction, never the degraded 'Repair and test' steering. A probe on a different network stack must never talk the model out of tools the engine owns.Validation
pnpm --filter openwork-server exec bun test src/cloud-mcp-health.test.ts src/opencode-plugins/openwork-extensions-preview-connect-steering.test.ts— 20 pass / 0 fail (new: transport-throw → usable:true + phase:ready + delivery applied + probe_unreachable surfaced; 401 → invalid_mcp_token unchanged; genuine missing tools → cloud_tools_missing unchanged; steering fail-open matrix)pnpm --filter openwork-server test— full suite 450 tests, 0 fail, 7 skippnpm --filter openwork-server typecheck— cleanNot run: end-to-end fraimz on a corporate-TLS Windows machine — reproducing the MITM trust condition needs the Daytona Windows cert sandbox (
daytona-windows-certskill) or the affected field machine; unit fixtures replicate the exact observed failure mode instead. Field verification plan: install on the affected machine → Advanced diagnostics should show usable withprobe_unreachablenoted under direct tools → the previously refused prompt ('call openwork-cloud_search_capabilities…') should execute without any reconnect/reset.Reviewer repro
composeOpenWorkExtensionDiscoveryInstructionwith engine connected + cloud_tools_missing → neutral instruction (previously degraded).