Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.333 ·

Clearer errors for client certificate (mTLS) and proxy failures

Client certificate failures, bad TLS certificates, timeouts and proxy pages now get their own error kinds and more helpful messages

Group of 3 You'll notice No documentation found Improvements
JSON All of v2.1.333
You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
SDKArea: what it touches
ImprovementsKind: in v2.1.333,
ImprovementsSection of the release

Unclear Whether tls_cert_invalid, client_certificate and request_timeout can actually be returned as error kinds, or are only described, is not clear.

What

mTLS (mutual TLS) is a setup where Claude Code proves who it is to a server with a client certificate file, set with CLAUDE_CODE_CLIENT_CERT, and a private key file, set with CLAUDE_CODE_CLIENT_KEY. Several failures around it now get their own messages:

  • When the server rejects the client certificate, Claude Code now reports a client_certificate error. If CLAUDE_CODE_CLIENT_CERT is set, the message tells you to check that the files in CLAUDE_CODE_CLIENT_CERT and CLAUDE_CODE_CLIENT_KEY exist and haven't expired. If it is not set, the message says the server needs a valid client certificate and CLAUDE_CODE_CLIENT_CERT isn't set.
  • When a connection cannot be opened (FailedToOpenSocket) and CLAUDE_CODE_CLIENT_CERT is set, the error now adds a hint that CLAUDE_CODE_CLIENT_KEY must match the certificate and needs the right passphrase. Before, this shared one message with ENOTFOUND and EAI_AGAIN.
  • The SDK's list of typed API error kinds, used by apps built on Claude Code, gains unexpected_response. It covers a successful reply that is not a normal message, such as a proxy's sign-in page. The description also now mentions tls_cert_invalid, client_certificate and request_timeout, though only unexpected_response was seen added to the list of allowed values.
  • The client_certificate description mentions CLAUDE_CODE_DISABLE_MTLS_RELOAD_ON_STALE_CONNECTION, the setting that controls whether Claude Code re-reads the certificate and key files and retries once.

Why

If you use Claude Code behind a gateway that needs a client certificate, a failed connection now points at the likely cause instead of a generic network error. Apps built on the SDK can also tell these failures apart and handle each one.

Read from
Names in the bundleunexpected_response
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtWhether `tls_cert_invalid`, `client_certificate` and `request_timeout` can actually be returned as error kinds, or are only described, is…

See this entry in the whole of v2.1.333 →

Feedback