[BUG] Claude code stopped working

Resolved 💬 7 comments Opened Mar 18, 2026 by u1pns Closed Mar 18, 2026

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?

Claude Code Support Ticket — ECONNRESET Connection Error

Account Information

  • Plan: Claude Max
  • Claude Code version: 2.1.78
  • OS: macOS (Apple Silicon M-series)
  • Node version: v25.4.0
  • Location: Madrid, Spain

Problem Description

Since March 17, 2026, Claude Code fails to connect to the API with ECONNRESET errors. The issue affects both the CLI (claude command) and the Claude desktop app (Code tab). Regular chat works perfectly in both the desktop app and claude.ai web interface.

The error message displayed is:

Unable to connect to API (ECONNRESET)
Retrying in X seconds… (attempt N/10)

Debug Log Evidence

From the debug logs, the connection sequence shows:

  1. OAuth authentication succeeds: [API:auth] OAuth token check complete
  2. Session creation succeeds: [bridge:repl] CCR v2: sessionUrl=https://api.anthropic.com/v1/code/sessions/...
  3. SSE transport URLs are resolved: SSETransport: SSE URL = .../worker/events/stream
  4. Then all API calls fail with ECONNRESET:
  • [bridge:repl] Environment registration failed: read ECONNRESET
  • [url=https://api.anthropic.com/api/oauth/account/settings] Error: read ECONNRESET
  • [url=https://api.anthropic.com/api/oauth/claude_cli/client_data] Error: read ECONNRESET
  • API error (attempt 1/11): undefined Connection error.
  • Telemetry to Datadog also fails: [url=https://http-intake.logs.us5.datadoghq.com/api/v2/logs] Error: read ECONNRESET

Diagnostic Steps Completed

1. Network Connectivity — VERIFIED OK

  • curl -v https://api.anthropic.com/v1/messages — TLS 1.3 handshake succeeds, HTTP/2 works, returns expected 405
  • curl -X POST with streaming (-N) to /v1/messages — returns expected 401 (authentication error with fake key)
  • curl -N --max-time 60 -H "Accept: text/event-stream" — long-lived SSE connection works fine
  • curl to https://http-intake.logs.us5.datadoghq.com — connects successfully
  • DNS resolution works correctly (api.anthropic.com → 160.79.104.10)
  • Tested on two different networks (home WiFi + mobile hotspot) — same error on both

2. Node.js Direct Test — WORKS

// This succeeds with HTTP status 401 (expected):
const https = require('https');
https.request('https://api.anthropic.com/v1/messages', { method: 'POST', ... })
// HTTP/2 connection also works:
const http2 = require('http2');
http2.connect('https://api.anthropic.com'); // → "HTTP/2 OK"

3. System Configuration — ALL CLEAN

  • Firewall: Disabled (State = 0)
  • Proxy: None active (networksetup -getwebproxy Wi-Fi → Enabled: No)
  • System proxy env vars: All empty (HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, NO_PROXY)
  • Node TLS env vars: All empty (NODE_EXTRA_CA_CERTS, SSL_CERT_FILE, SSL_CERT_DIR)
  • No VPN active
  • No antivirus or network filtering software (no Little Snitch, etc.)
  • No system extensions installed (systemextensionsctl list — empty)
  • /etc/hosts: Default, unmodified

4. Claude Code Configuration — RULED OUT

  • Tested with all plugins disabled (enabledPlugins: {}) — same error
  • Tested with all MCP servers disconnected — same error
  • Tested with entire ~/.claude/ folder renamed (clean start, no config) — same error
  • Tested with ~/.claude.json also removed (full clean start) — same error

5. TLS/Certificate Tests — RULED OUT

  • NODE_TLS_REJECT_UNAUTHORIZED=0 claude — same error
  • NODE_EXTRA_CA_CERTS=/etc/ssl/cert.pem claude — same error
  • NODE_OPTIONS="--use-openssl-ca" claude — same error
  • Removed AutoFirma ROOT certificate from System Keychain — same error
  • security dump-trust-settings -d — verified no interfering trust settings remain

6. Binary/Runtime Tests

  • Tested with native binary (Mach-O arm64 from claude.ai/install.sh) — fails
  • Tested with npm-installed version (npm install -g @anthropic-ai/claude-code, runs on Node.js) — also fails
  • Confirmed npm version uses Node: #!/usr/bin/env node shebang
  • CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 claude — same error
  • DISABLE_AUTOUPDATER=1 claude — same error

7. Authentication

  • /status shows valid login: Claude Max Account, email myemail@gmail.com
  • Session usage: 2% session, 3% weekly — well within limits
  • OAuth token check completes successfully in debug logs

Key Observation

The debug log line CA certs: useSystemCA=false appears during startup. Claude Code's internal HTTP agent configuration may be the issue, since:

  • Direct curl connections to all relevant endpoints work perfectly
  • Direct Node.js https and http2 connections work perfectly
  • Only Claude Code's internal HTTP client (which configures custom global agents via configureGlobalAgents) fails

Context

The issue started on March 17, 2026. On that same day, the AutoFirma application (Spanish government digital signature tool) and a digital certificate were installed on the system. However, all AutoFirma-related certificates have been removed, AutoFirma is not running, and the issue persists even on a completely different network. StatusGator reported 331 outage reports for Claude Code in the 24 hours prior to March 17.

Expected Behavior

Claude Code should connect to the API and respond to prompts, as it did prior to March 17, 2026.

Request

Please help, investigate whether there is an account-level or service-level issue affecting Claude Code connectivity for this account. All local diagnostics have been exhausted (or give me instructions to diagnose)

What Should Happen?

Claude Code should connect to the API and respond to prompts, as it did prior to March 17, 2026.

Error Messages/Logs

Steps to Reproduce

No idea how to reproduce

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.78

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Fails both in Claude App (GUI), and Claude Code (console).
Chat works perfectly in Claude APP

View original on GitHub ↗

This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗