[BUG] Claude Code doesn't work with `NODE_OPTIONS=--use-system-ca`
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?
Enterprise setup forces to use Netskope and it installs custom CA. In order to work I have to put export NODE_OPTIONS=--use-system-ca in zshrc. But that ENV variable conflicts with Claude Code 2.1.181 (Homebrew latest)
The only solution is to unset NODE_OPTIONS env variable before starting Claude Code.
What Should Happen?
Claude Code should respect NODE_OPTIONS=--use-system-ca env variable in order to allow both NodeJS and Claude Code work
Error Messages/Logs
> Unable to connect to API: SSL certificate verification failed. Check your proxy or corporate SSL certificates
Steps to Reproduce
- Use some custom CA (Netskope for example)
- Set
NODE_OPTIONS=--use-system-caenv variable - Verify that plain nodejs can access SSL
```
node -e 'fetch("https://example.com").then(r => console.dir(r))'
`
``
Response {
[Symbol(state)]: {
aborted: false,
rangeRequested: false,
timingAllowPassed: true,
requestIncludesCredentials: true,
type: 'default',
status: 200,
timingInfo: {
startTime: 82.898083,
redirectStartTime: 0,
redirectEndTime: 0,
postRedirectStartTime: 82.898083,
finalServiceWorkerStartTime: 0,
finalNetworkResponseStartTime: 226.452792,
finalNetworkRequestStartTime: 175.629708,
endTime: 0,
encodedBodySize: 0,
decodedBodySize: 0,
finalConnectionTimingInfo: [Object]
},
cacheState: '',
statusText: 'OK',
headersList: HeadersList {
cookies: null,
[Symbol(headers map)]: [Map],
[Symbol(headers map sorted)]: null
},
urlList: [ URL {} ],
body: { stream: [ReadableStream], source: null, length: null }
},
[Symbol(headers)]: Headers {}
}
- Open Claude Code
- Say Hi
- Claude Code responds
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.181 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
Disabling NODE_OPTIONS will fix Claude Code. But ordinary node execution now is broken. The previous fetching of https://example.com will fail due to SSL cert mismatch
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗