Skip to content

Cowork WebFetch cannot reach the external network - Claude Desktop

Quick fix

Add "coworkEgressAllowedHosts": ["*"] to the 3P gateway profile CC Switch generates, so the Cowork sandbox can reach external hosts.

Error output
WebFetch 访问外部 URL 失败。
English translation

WebFetch fails to reach an external URL.

In third-party (3P) mode, Claude Desktop forwards requests through the CC Switch local gateway. Cowork's WebFetch runs in a sandbox, and whether it can reach the external network depends on the `coworkEgressAllowedHosts` setting in the 3P gateway profile. If that setting is missing or not opened up, the Cowork sandbox cannot reach any external host and WebFetch fails.

In issue #3171, maintainers and users confirmed that WebFetch works when the 3P gateway profile CC Switch generates contains `"coworkEgressAllowedHosts": ["*"]`. The other issues in this cluster (Codex not detected, an Ubuntu install breaking the network, the API not switching, 502 on a very large context) are different problems, listed only as sources, and the fix here does not apply to them.

  1. Configure a third-party Claude/Anthropic-compatible provider in CC Switch and apply it to Claude Desktop, so Claude Desktop enters 3P mode and forwards requests through the CC Switch local gateway.

  2. Edit the 3P gateway profile CC Switch generated for that provider and add `coworkEgressAllowedHosts` to the JSON, allowing the Cowork sandbox to reach external hosts.

    CC Switch 生成的 3P gateway profile(具体路径未在 issue 中给出)
    {
    "coworkEgressAllowedHosts": ["*"]
    }
  3. Save the config, reopen Cowork in Claude Desktop, and have Cowork use WebFetch against any external page (a public documentation page, or `https://www.google.com`) to confirm real page content comes back.

ToolClaude Desktop
Version3.15.0
PlatformsmacOS
Why can Cowork WebFetch not reach external pages in Claude Desktop 3P mode?
Because external access from the Cowork sandbox is controlled by `coworkEgressAllowedHosts` in the 3P gateway profile. If the profile CC Switch generates does not open that list up, WebFetch cannot reach external hosts.
What should `coworkEgressAllowedHosts` be set to?
Issue #3171 confirms WebFetch works once it is set to `["*"]`, which allows the Cowork sandbox to reach external hosts.
Does this problem affect Codex, the Ubuntu network, or API switching?
No. The cluster also contains reports of Codex not being detected, the network disappearing after an Ubuntu install, the API not switching, and 502 on a very large context, but those are different problems. This page covers only Claude Desktop Cowork WebFetch failing to reach the external network.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.