claude-code - 💡(How to fix) Fix [BUG] Sandbox blocks OCSP/CRL certificate validation traffic, breaking HTTPS for allowed domains [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45231Fetched 2026-04-09 08:10:13
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×5commented ×2

Error Message

Error Messages/Logs

Observe the SSL error:

Root Cause

When a domain is added to sandbox.network.allowedDomains, Python (and potentially other runtimes) still fail to make HTTPS connections to it because the sandbox also blocks outbound HTTP traffic to OCSP/CRL servers used for certificate chain validation.

Fix Action

Fix / Workaround

Workaround: Manually add OCSP domains to the allowlist, or set PIP_TRUSTED_HOST to skip verification.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When a domain is added to sandbox.network.allowedDomains, Python (and potentially other runtimes) still fail to make HTTPS connections to it because the sandbox also blocks outbound HTTP traffic to OCSP/CRL servers used for certificate chain validation.

These OCSP requests go to CA-specific domains (r3.o.lencr.org for Let's Encrypt, ocsp.digicert.com, etc.) that are not in the allowlist — even though the user has no reason to know about them.

Expected behavior: Allowing a domain in allowedDomains should implicitly permit the certificate validation traffic required to establish a secure connection to that domain.

Actual behavior: SSL handshake fails with SSLCertVerificationError: OSStatus -26276 on macOS Python 3.14, even when the target domain is explicitly allowed.

Workaround: Manually add OCSP domains to the allowlist, or set PIP_TRUSTED_HOST to skip verification.

Platform: macOS, Python 3.14 (uses Apple Security framework for TLS, not OpenSSL), VS Code Claude Extension

What Should Happen?

Expected behavior: Allowing a domain in allowedDomains should implicitly permit the certificate validation traffic required to establish a secure connection to that domain.

Error Messages/Logs

Steps to Reproduce

  1. Add any HTTPS domain to sandbox.network.allowedDomains in ~/.claude/settings.json:
    {
      "sandbox": {
        "enabled": true,
        "network": {
          "allowedDomains": ["pypi.org", "files.pythonhosted.org"]
        }
      }
    }

Ask Claude to run a sandboxed Bash command that makes an HTTPS request to that domain:

pip install requests or with curl:

curl -s https://pypi.org/pypi/requests/json | head -5 Observe the SSL error:

SSLError(SSLCertVerificationError('OSStatus -26276')) or for curl:

curl: (60) SSL certificate problem: unable to get local issuer certificate To confirm it's OCSP: run the same command with sandbox disabled (dangerouslyDisableSandbox: true) — it succeeds.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

claude-sonnet-4-6

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

I use the Claude VS Code Extension if it matters.

extent analysis

TL;DR

Manually adding OCSP domains to the allowlist or setting PIP_TRUSTED_HOST can workaround the SSL certificate verification issue.

Guidance

  • Identify the OCSP domains used by the target HTTPS domain (e.g., r3.o.lencr.org for Let's Encrypt) and add them to sandbox.network.allowedDomains.
  • Consider setting PIP_TRUSTED_HOST to skip certificate verification, but be aware that this may reduce security.
  • Verify that the workaround resolves the SSL error by running the same command with the modified allowlist or environment variable.
  • To avoid manual configuration, consider requesting an update to the Claude Code to implicitly permit certificate validation traffic for allowed domains.

Example

No code snippet is provided as the issue is more related to configuration and environment variables.

Notes

The provided workaround may not be ideal as it requires manual configuration and may not cover all possible OCSP domains. A more robust solution would be to update the Claude Code to handle certificate validation traffic implicitly.

Recommendation

Apply workaround: Manually add OCSP domains to the allowlist or set PIP_TRUSTED_HOST, as this is the most straightforward way to resolve the issue with the current version of Claude Code.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING