[BUG] TUI hangs on startup after connect(api.anthropic.com:443) = EINPROGRESS — regression between 2.1.126 (good) and 2.1.129 (bad), Linux

Resolved 💬 3 comments Opened May 11, 2026 by gjadi-mej Closed Jun 15, 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 (TUI), claude login, and claude config all hang on startup on Linux. The process never renders the TUI and must be killed with Ctrl-C / pkill. claude --debug -p "say hello" exits cleanly with status 0 but produces no output (the prompt is never answered).

This is a regression. The machine worked fine on 2026-05-06 and broke on 2026-05-11.

Bisect result (using claude --debug -p "say hello" with a 20s timeout as the test; empty output or timeout = bad):

| Version | Result |
|---|---|
| 2.1.120 | good (sanity check: produced "Hello!") |
| 2.1.124 | good |
| 2.1.126 | last confirmed good |
| 2.1.127 | could not install — installer returned no binary |
| 2.1.129 | bad (timed out after 20s) |
| 2.1.138 | bad |

So the first bad version is 2.1.127, 2.1.128, or 2.1.129 (most likely 2.1.128 or 2.1.129, since 2.1.127 may not have been published).

Environment

  • Claude Code version installed: 2.1.138 (broken). 2.1.126 confirmed working as a downgrade.
  • OS: Ubuntu 24.04.4 LTS (Noble)
  • Install method: curl -fsSL https://claude.ai/install.sh | bash (native installer to ~/.local/bin/claude, ~/.local/share/claude/)
  • Auth: CLAUDE_CODE_OAUTH_TOKEN env var (claude setup-token was run; ~/.claude/.credentials.json was not created by the env-var auth path)
  • CWD during repro: non-git directory, no git remote configured
  • No VPN active during failing repros; previous working version worked both with and without VPN
  • No Chrome, Edge, or any Claude in Chrome extension installed
  • No proxy, no ANTHROPIC_BASE_URL override
  • curl https://api.anthropic.com/v1/messages from the same shell returns a normal 405 immediately, ruling out network reachability

Steps to Reproduce

Starting from a clean state:

mv ~/.claude ~/.claude.json ~/claude-backup/   # backup
rm -rf ~/.local/bin/claude ~/.local/share/claude/
curl -fsSL https://claude.ai/install.sh | bash
claude setup-token                              # complete OAuth flow
export CLAUDE_CODE_OAUTH_TOKEN=<token>
claude

What Should Happen?

Expected Behavior

The TUI renders and accepts input within a few seconds.

Actual Behavior

claude hangs indefinitely with no output and no rendered TUI. Same for claude login and claude config. claude --debug -p "say hello" exits with code 0 but produces no response text.

Error Messages/Logs

### Diagnostic Traces

**strace of the TUI hang** (`strace -f -e trace=network,read,write,openat,close,clone,execve,wait4,connect,socket,bind,unlink claude --debug`), filtered to networking and process events:


execve("/home/<user>/.local/bin/claude", ["claude", "--debug"], ...) = 0
connect(17, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT
connect(17, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT
connect(17, {sa_family=AF_UNIX, sun_path="/run/systemd/resolve/io.systemd.Resolve"}, 42) = 0
connect(17, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("160.79.104.10")}, 16) = -1 EINPROGRESS
execve("/usr/bin/git", ["/usr/bin/git", "config", "--get", "remote.origin.url"], ...) = 0


After the nonblocking `connect()` to `api.anthropic.com:443` returns `EINPROGRESS` and the git remote probe completes (with `null` result, since no git remote is configured), the process stops making forward progress. No further network activity is recorded on that fd.

**strace of `claude --debug login`** with `MCP_CONNECTION_NONBLOCKING=1`, `MCP_TIMEOUT=5000`, `CLAUDE_CODE_DISABLE_CLAUDEAI_MCP=1`, `DISABLE_TELEMETRY=1` — the last debug lines written before the process wedges in a `read()` loop on its internal IPC pipes:


2026-05-11T12:46:36.234Z [DEBUG] Git remote URL: null
2026-05-11T12:46:36.234Z [DEBUG] No git remote URL found
2026-05-11T12:46:36.273Z [DEBUG] [Claude in Chrome] Extension not found in any browser


Then nothing. The process sits in `read()` on internal IPC pipes (fd 7, fd 8 — receiving `\1\0\0\0\0\0\0\0` heartbeats from worker threads) until killed.

**`claude --debug -p "say hello"`** (with `CLAUDE_CODE_DISABLE_CLAUDEAI_MCP=1`): exits cleanly with code 0 but emits no answer. Without that env var, `-p` also hangs. Debug log shows:


[DEBUG] [claudeai-mcp] No access token            # because ~/.claude/.credentials.json is absent (auth is via CLAUDE_CODE_OAUTH_TOKEN)
[DEBUG] installed_plugins.json doesn't exist, returning empty V2 object
[DEBUG] Found 0 plugins (0 enabled, 0 disabled)
[DEBUG] Git remote URL: null
[DEBUG] No git remote URL found

Steps to Reproduce

Starting from a clean state:

mv ~/.claude ~/.claude.json ~/claude-backup/   # backup
rm -rf ~/.local/bin/claude ~/.local/share/claude/
curl -fsSL https://claude.ai/install.sh | bash
claude setup-token                              # complete OAuth flow
export CLAUDE_CODE_OAUTH_TOKEN=<token>
claude

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.126

Claude Code Version

2.1.138

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

Workarounds Attempted (none sufficient)

  • CLAUDE_CODE_DISABLE_CLAUDEAI_MCP=1 — does not unblock the TUI; lets -p exit but produces no answer
  • ENABLE_CLAUDEAI_MCP_SERVERS=false (documented switch) — same result
  • MCP_CONNECTION_NONBLOCKING=1 and MCP_TIMEOUT=5000 — no effect
  • DISABLE_TELEMETRY=1 — no effect
  • Fresh install: backed up and removed ~/.claude/ and ~/.claude.json, removed ~/.local/bin/claude and ~/.local/share/claude/, reinstalled — no effect
  • Removed Chrome-bridge leftover state (~/.claude/chrome/, /tmp/claude-mcp-browser-bridge-*, any com.anthropic.claude_code_browser_extension.json) — no effect; no Chrome/Edge is installed on this machine anyway
  • Confirmed api.anthropic.com is reachable from the same shell via curl

The only fix that worked was downgrading:

rm -rf ~/.local/bin/claude ~/.local/share/claude/
curl -fsSL https://claude.ai/install.sh | bash -s -- 2.1.126

Notes / Observations

  • The last debug line before the wedge is [Claude in Chrome] Extension not found in any browser. The probe correctly determines that no supported browser is present, but startup does not progress past this point on the broken versions.
  • The single TLS connection attempt to api.anthropic.com:443 (EINPROGRESS) is the only outbound socket the wedged process opens. It is never observed to complete in a way that unblocks the UI.
  • Auth via CLAUDE_CODE_OAUTH_TOKEN does not write ~/.claude/.credentials.json. The claudeai-mcp codepath logs No access token as a result. This is unchanged from 2.1.126 (which works), so it is likely not the cause but flagging it in case the regression is in how this case is handled.
  • The installer for 2.1.127 appears to be broken or that version was never published: curl -fsSL https://claude.ai/install.sh | bash -s -- 2.1.127 produces a binary that emits no version string. Worth verifying separately.
  • Release notes for 2.1.138 say only "Internal fixes," so I can't cross-reference the regression commit from the changelog.
  • Possibly related: #49563 (startup /v1/messages quota_check request never completes, wedging the UI — same shape of failure, earlier version).
  • Another known 2.1.138 regression for context: #57735 (auto-mode classifier).

Possible Root Cause

A startup HTTP request to api.anthropic.com introduced or modified between 2.1.126 and 2.1.129 appears to be awaited without a usable timeout, in a way that wedges the TUI render path. The git-remote probe still runs after the connect is initiated, but no debug output appears afterward, suggesting subsequent startup steps are gated on the HTTP result.

View original on GitHub ↗

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