Skip to content

[BUG] NODE_EXTRA_CA_CERTS is not effective when set in ~/.claude/settings.json #10458

@Venkata5815

Description

@Venkata5815

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?

Hi, My setting.json (~/.claude/settings.json) is as below:

{
"permissions": {
"deny": [
]
},
"env": {
"HTTPS_PROXY": "http://127.0.0.1:8081",
"NODE_EXTRA_CA_CERTS": "/Users/username/.mitmproxy/mitmproxy-ca-cert.pem",
"SSL_CERT_FILE": "/Users/username/./mitmproxy-ca-cert.pem"
}
}

mitm proxy is running at "http://127.0.0.1:8081", when I start claude, I don't see traffic received to claude via mitmroxy and see error - Unable to connect to API due to poor internet connection, please see the attached screen shot.
https://docs.claude.com/en/docs/claude-code/network-config this document says that NODE_EXTRA_CA_CERTS can be a env inside the settings.json, but it doesn't seem to work

Image

What Should Happen?

If I set the env explicitly in the shell like:
export NODE_EXTRA_CA_CERTS = "/Users/username/.mitmproxy/mitmproxy-ca-cert.pem" , claude code works without any issue. Can we please fix that this env is taken from the env section of claude code like other env variables.

Error Messages/Logs

Unable to connect to API due to poor internet connection

Steps to Reproduce

Have the settings.json as below:

{
"permissions": {
"deny": [
]
},
"env": {
"HTTPS_PROXY": "http://127.0.0.1:8081",
"NODE_EXTRA_CA_CERTS": "/Users/username/.mitmproxy/mitmproxy-ca-cert.pem",
"SSL_CERT_FILE": "/Users/username/./mitmproxy-ca-cert.pem"
}
}

and start mitmproxy running as mitmproxy -p 8081

and then launch claude code via terminal.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.0.27 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corearea:securityautocloseIssue will be closed automaticallybugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOS

    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