claude-code - 💡(How to fix) Fix Sandbox breaks TLS for Go binaries using macOS Security.framework (gh, brew, etc.) [1 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#48058Fetched 2026-04-15 06:34:28
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Error Message

$ gh auth status
Get "https://api.github.com/user": tls: failed to verify certificate: x509: OSStatus -26276

OSStatus -26276 is errSecInvalidCertAuthority — the Security.framework cannot verify the certificate chain, likely because the sandbox restricts keychain or Security.framework API access.

Root Cause

OSStatus -26276 is errSecInvalidCertAuthority — the Security.framework cannot verify the certificate chain, likely because the sandbox restricts keychain or Security.framework API access.

Fix Action

Workaround

Using curl directly against APIs works since it does not use Security.framework. No practical workaround exists for gh itself within the sandbox.

Code Example

$ gh auth status
Get "https://api.github.com/user": tls: failed to verify certificate: x509: OSStatus -26276
RAW_BUFFERClick to expand / collapse

Bug description

As of Claude Code v2.1.107, the command sandbox breaks TLS certificate verification for Go binaries that use the macOS Security.framework for TLS (e.g. gh, brew). Commands like curl that use LibreSSL/OpenSSL continue to work fine.

Error

$ gh auth status
Get "https://api.github.com/user": tls: failed to verify certificate: x509: OSStatus -26276

OSStatus -26276 is errSecInvalidCertAuthority — the Security.framework cannot verify the certificate chain, likely because the sandbox restricts keychain or Security.framework API access.

Reproduction

  1. Install gh via Homebrew on macOS
  2. Authenticate normally (gh auth login)
  3. Open Claude Code v2.1.107
  4. Run any gh command (e.g. gh auth status, gh api user)
  5. Observe TLS failure

Key observations

  • curl works fine (uses LibreSSL, not Security.framework)
  • gh fails (Go binary, links against Security.framework for TLS)
  • brew info also fails to fetch from APIs (same root cause)
  • otool -L /opt/homebrew/bin/gh confirms it links against /System/Library/Frameworks/Security.framework/Versions/A/Security
  • Setting SSL_CERT_FILE does not help because Go ignores it when using the native macOS TLS backend
  • Unsetting proxy env vars (HTTPS_PROXY, etc.) does not help
  • The issue started today with the update to v2.1.107; gh v2.89.0 (installed April 6) was working in previous Claude Code versions

Environment

  • macOS 26.4.1 (Darwin 25.4.0, arm64)
  • Claude Code v2.1.107
  • gh v2.89.0 (Homebrew)

Workaround

Using curl directly against APIs works since it does not use Security.framework. No practical workaround exists for gh itself within the sandbox.

extent analysis

TL;DR

The issue can be mitigated by using curl directly against APIs or waiting for a fix in a future Claude Code version that restores proper TLS certificate verification for Go binaries using the macOS Security.framework.

Guidance

  • The root cause is likely the sandbox in Claude Code v2.1.107 restricting keychain or Security.framework API access, which breaks TLS certificate verification for Go binaries.
  • To verify the issue, run gh auth status or other gh commands within the Claude Code sandbox and observe the TLS failure.
  • As a temporary workaround, use curl directly against GitHub APIs for tasks that would otherwise fail with gh.
  • Consider downgrading Claude Code to a version prior to v2.1.107 if possible, to restore functionality until a fix is released.

Example

No code snippet is provided as the issue is related to the interaction between Claude Code, Go binaries, and the macOS Security.framework, and does not involve user-modifiable code.

Notes

The provided workaround using curl is limited and may not cover all use cases where gh or similar tools are used. The issue seems specific to the combination of Claude Code v2.1.107 and Go binaries that use the macOS Security.framework for TLS.

Recommendation

Apply the workaround using curl for critical tasks until a fixed version of Claude Code is released that properly handles TLS certificate verification for Go binaries using the Security.framework.

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