Skip to content

[BUG] Claude Code doesn't work with NODE_OPTIONS=--use-system-ca #72066

Description

@GRiMe2D

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?

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

  1. Use some custom CA (Netskope for example)
  2. Set NODE_OPTIONS=--use-system-ca env variable
  3. 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 {}
     }
    
  4. Open Claude Code
  5. Say Hi
  6. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions