Native build: ECONNRESET on OAuth refresh/login and API calls on macOS 27 — curl and npm build work fine
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?
Environment
- macOS 27, Mac mini (Apple Silicon), non-admin user account
- Claude Code native install (~/.local/bin/claude), versions 2.1.284 and 2.1.285
- Auth: Claude Team (OAuth)
What happens
- /login fails with "OAuth error: read ECONNRESET"
- Debug log: "OAuth refresh failed (expected): read ECONNRESET", followed by 401 on profile fetch
- Other requests fail intermittently with "ECONNRESET: The socket connection was closed unexpectedly"
(bootstrap, telemetry, some claude.ai MCP connectors); some succeed on retry
- After a successful session start, API calls drop: "Connection dropped (ECONNRESET) · Retrying"
- /bug also fails ("couldn't reach the service")
What works on the same machine, same network, same time
- curl to api.anthropic.com, claude.ai, platform.claude.com: all respond
- 60/60 POST requests to https://platform.claude.com/v1/oauth/token via curl (default, -4, -6): all answered (HTTP 415), zero resets
- npm build via "npx @anthropic-ai/claude-code" logs in and works normally
Ruled out
- No proxy (scutil --proxy empty, no HTTPS_PROXY), no custom CA, no exit node
- Tailscale (tailscaled daemon) running, no exit node; not the cause per tests
- Reboot, claude update
Observation
- Issue appeared after another (admin) macOS user logged in via fast user switching;
worked right after a reboot with only this user logged in. No proxy/DNS change between the two states.
Workaround
- Using the npm build instead of the native binary.
What Should Happen?
The native Claude Code build should connect to Anthropic's servers as reliably as curl and the npm build do on the same machine and network: /login and OAuth token refresh should complete without ECONNRESET, API calls should not drop, and /bug should be able to submit feedback. Logging in a second macOS user via fast user switching should have no effect on network connectivity for the first user's Claude Code session.
Error Messages/Logs
Steps to Reproduce
- macOS 27 Mac mini with two local accounts: a standard user (running Claude Code, native install via ~/.local/bin/claude) and an admin user.
- Reboot, log in only as the standard user, run
claude— works normally (after macOS 27 update, login succeeded). - Log in the admin user via fast user switching, then switch back to the standard user (admin session stays active in background).
- Run
claudeorclaude --continuein Terminal. - Result: "OAuth error: read ECONNRESET" on /login, or "Connection dropped (ECONNRESET) · Retrying" on API calls. /bug fails with "couldn't reach the service".
- In the same terminal at the same time, curl to platform.claude.com / api.anthropic.com succeeds 60/60 times (default, -4, -6).
- Run
npx @anthropic-ai/claude-code --continue(npm build, same account, same network) — works normally.
Debug log (claude --debug) shows "OAuth refresh failed (expected): read ECONNRESET" and intermittent ECONNRESET on bootstrap, telemetry and claude.ai MCP proxy connections, while other requests to the same hosts succeed.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.283
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗