[BUG] Allow outbound network access for CLI tools (e.g. Wrangler, Terraform) in Claude Code web environment
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Summary
When using Claude Code on the web (claude.ai/code), npm packages like Wrangler (Cloudflare Workers CLI) can be installed successfully, but they fail at runtime because outbound HTTP requests to external APIs (e.g. api.cloudflare.com) are blocked by the sandbox network policy.
Why This Matters
One of the most valuable use cases for Claude Code is writing and deploying code in a single session. Currently, Claude Code can author Worker code, generate configs, and install tooling — but the last mile (deployment) is blocked, forcing users to copy files to a local machine. Allowing outbound access (at least to well-known cloud provider APIs) would make the experience significantly more useful.
What Should Happen?
Consider allowlisting outbound access to common cloud provider API endpoints, or providing a mechanism for users to authorize specific domains per session.
Error Messages/Logs
Bash
export CLOUDFLARE_API_TOKEN="XXXXXXXXXDELETEDFORPRIVACY" && wrangler whoami 2>&1
Exit code 1
Proxy environment variables detected. We'll use your proxy for fetch requests.
Show less
⛅️ wrangler 4.71.0
───────────────────
Getting User settings...
▲ [WARNING] A fetch request failed, likely due to a connectivity issue.
Common causes:
- No internet connection or network connectivity problems
- Firewall or VPN blocking the request
- Network proxy configuration issues
Please check your network connection and try again.
✘ [ERROR] fetch failed
If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose
🪵 Logs were written to "/root/.config/.wrangler/logs/wrangler-2026-03-10_19-56-51_261.log"
Proxy environment variables detected. We'll use your proxy for fetch requests.
⛅️ wrangler 4.71.0
───────────────────
Getting User settings...
▲ [WARNING] A fetch request failed, likely due to a connectivity issue.
Common causes:
- No internet connection or network connectivity problems
- Firewall or VPN blocking the request
- Network proxy configuration issues
Please check your network connection and try again.
✘ [ERROR] fetch failed
If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose
🪵 Logs were written to "/root/.config/.wrangler/logs/wrangler-2026-03-10_19-56-
Steps to Reproduce
Open a session at claude.ai/code
Run npm install -g wrangler — succeeds
Set CLOUDFLARE_API_TOKEN environment variable
Run wrangler whoami or wrangler deploy
Fails with "fetch failed" / connectivity error due to proxy/firewall restrictions
Expected Behavior
CLI tools that make authenticated API calls to external services should be able to reach those services, allowing end-to-end deployment workflows from within the Claude Code environment.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
4.6
Claude Code Version
Claude Code Web
Platform
Other
Operating System
Other
Terminal/Shell
Other
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗