[BUG] Claude Code Web: Proxy blocks CONNECT tunnel to npm.pkg.github.com (403), preventing yarn install of private packages
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?
yarn install fails on Claude Code Web when the project depends on private packages from npm.pkg.github.com. The proxy blocks the HTTPS CONNECT tunnel with statusCode=403, preventing yarn from reaching the registry at all.
This is related to #11078, which was marked as resolved on 2026-01-22. However, the issue persists with a different error pattern — instead of 401/403 from the registry, the proxy itself rejects the tunnel before the request reaches the registry.
Error
➤ YN0001: │ RequestError: tunneling socket could not be established, statusCode=403
at ClientRequest.<anonymous> (/home/user/web-app/.yarn/releases/yarn-4.0.2.cjs:147:14258)
Root Cause
The Claude Code Web container forces all HTTP(S) traffic through a JWT-authenticated proxy via environment variables:
GLOBAL_AGENT_HTTP_PROXY=http://container_container_<id>--claude_code_remote--<hash>:jwt_<token>@...
When yarn attempts to create a CONNECT tunnel through this proxy to npm.pkg.github.com, the proxy returns 403 Forbidden — indicating these domains are not in the proxy's allowlist.
What Should Happen?
yarn install should be able to fetch packages from npm.pkg.github.com when proper authentication is configured in .yarnrc.yml, just as it works on a local machine.
Steps to Reproduce
- Open a Claude Code Web session for a repository with private
@org/*packages on GitHub Packages - The
.yarnrc.ymlshould have:
``yaml``
npmScopes:
org-name:
npmAlwaysAuth: true
npmAuthToken: '${NODE_AUTH_TOKEN}'
npmRegistryServer: 'https://npm.pkg.github.com'
- Run
yarn install - Observe
tunneling socket could not be established, statusCode=403
Attempted Workarounds (All Failed)
| Attempt | Result |
|---------|--------|
| yarn install | tunneling socket could not be established, statusCode=403 |
| yarn install --mode skip-build | Same 403 tunneling error |
| yarn install --immutable | Same 403 tunneling error |
| unset HTTP_PROXY HTTPS_PROXY && yarn install | Same error — GLOBAL_AGENT_HTTP_PROXY is set at container level and cannot be unset |
| HTTPS_PROXY= HTTP_PROXY= yarn install | Same error — proxy is enforced via global agent |
| yarn config unset httpProxy/httpsProxy | "Configuration doesn't contain setting" — proxy is injected via env vars, not yarn config |
| yarn config set enableNetwork false && yarn install | YN0080 — private packages not in local .yarn/cache |
Key Observation
The proxy cannot be bypassed from within the container. The GLOBAL_AGENT_HTTP_PROXY environment variable intercepts all outbound HTTPS connections at the Node.js level, and the proxy returns 403 for any CONNECT tunnel to npm.pkg.github.com.
Claude Model
Other
Is this a regression?
Related to #11078 which was closed as resolved on 2026-01-22, but the underlying issue persists with a different symptom (proxy tunnel rejection instead of auth header stripping).
Claude Code Version
Claude Code Web (latest)
Platform
Web
Operating System
N/A (Claude Code Web)
Terminal/Shell
N/A (Claude Code Web)
Additional Information
- Yarn version: 4.0.2 (Berry, with Plug'n'Play)
- Node linker:
node-modules - Cached packages: 2,747 packages exist in
.yarn/cache, but private packages fromnpm.pkg.github.comare not among them - The proxy successfully handles git operations (push/pull to GitHub) but does not allow tunneling to
npm.pkg.github.com
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗