[Bug] Performance Degradation: CLI Operations Running Slowly
Status Fixed / completed
Reported on v2.1.112
Maintainer reply None cached
Activity 3 comments · opened Apr 20, 2026 · closed Apr 20, 2026
Bug Description
All very slow this morning.
Environment Info
- Platform: darwin
- Terminal: vscode
- Version: 2.1.112
- Feedback ID: 134baa4d-858f-45a4-9a8c-78a280f89119
Errors
[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/michael/.local/share/claude/versions/2.1.112 (expected in multi-process scenarios)\n at Od_ (/$bunfs/root/src/entrypoints/cli.js:2748:2177)\n at Ke6 (/$bunfs/root/src/entrypoints/cli.js:2748:1257)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-17T16:05:13.383Z"},{"error":"Error: Not connected\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:93:54436)\n at new Promise (native:1:11)\n at request (/$bunfs/root/src/entrypoints/cli.js:93:54381)\n at callTool (/$bunfs/root/src/entrypoints/cli.js:829:9909)\n at qM7 (/$bunfs/root/src/entrypoints/cli.js:4753:3718)\n at CB (/$bunfs/root/src/entrypoints/cli.js:4752:37989)\n at Sx5 (/$bunfs/root/src/entrypoints/cli.js:8242:9518)\n at j (/$bunfs/root/src/entrypoints/cli.js:8242:8148)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8242:8479)\n at qX (/$bunfs/root/src/entrypoints/cli.js:477:63169)","timestamp":"2026-04-17T16:06:14.385Z"},{"error":"Error: Not connected\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:93:54436)\n at new Promise (native:1:11)\n at request (/$bunfs/root/src/entrypoints/cli.js:93:54381)\n at callTool (/$bunfs/root/src/entrypoints/cli.js:829:9909)\n at qM7 (/$bunfs/root/src/entrypoints/cli.js:4753:3718)\n at CB (/$bunfs/root/src/entrypoints/cli.js:4752:37989)\n at Sx5 (/$bunfs/root/src/entrypoints/cli.js:8242:9518)\n at j (/$bunfs/root/src/entrypoints/cli.js:8242:8148)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8242:8479)\n at qX (/$bunfs/root/src/entrypoints/cli.js:477:63169)","timestamp":"2026-04-17T16:06:14.385Z"},{"error":"Error: Not connected\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:93:54436)\n at new Promise (native:1:11)\n at request (/$bunfs/root/src/entrypoints/cli.js:93:54381)\n at callTool (/$bunfs/root/src/entrypoints/cli.js:829:9909)\n at qM7 (/$bunfs/root/src/entrypoints/cli.js:4753:3718)\n at CB (/$bunfs/root/src/entrypoints/cli.js:4752:37989)\n at Qf8 (/$bunfs/root/src/entrypoints/cli.js:8242:9948)\n at A (/$bunfs/root/src/entrypoints/cli.js:8242:9012)\n at Sx5 (/$bunfs/root/src/entrypoints/cli.js:8242:9838)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-17T16:06:14.385Z"},{"error":"Error: Not connected\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:93:54436)\n at new Promise (native:1:11)\n at request (/$bunfs/root/src/entrypoints/cli.js:93:54381)\n at callTool (/$bunfs/root/src/entrypoints/cli.js:829:9909)\n at qM7 (/$bunfs/root/src/entrypoints/cli.js:4753:3718)\n at CB (/$bunfs/root/src/entrypoints/cli.js:4752:37989)\n at Qf8 (/$bunfs/root/src/entrypoints/cli.js:8242:9948)\n at closeTabInIDE (/$bunfs/root/src/entrypoints/cli.js:8242:8595)\n at F (/$bunfs/root/src/entrypoints/cli.js:8242:19612)\n at onChange (/$bunfs/root/src/entrypoints/cli.js:8242:20655)","timestamp":"2026-04-17T16:06:21.967Z"},{"error":"Error: Not connected\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:93:54436)\n at new Promise (native:1:11)\n at request (/$bunfs/root/src/entrypoints/cli.js:93:54381)\n at callTool (/$bunfs/root/src/entrypoints/cli.js:829:9909)\n at qM7 (/$bunfs/root/src/entrypoints/cli.js:4753:3718)\n at CB (/$bunfs/root/src/entrypoints/cli.js:4752:37989)\n at Sx5 (/$bunfs/root/src/entrypoints/cli.js:8242:9518)\n at j (/$bunfs/root/src/entrypoints/cli.js:8242:8148)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8242:8479)\n at qX (/$bunfs/root/src/entrypoints/cli.js:477:63169)","timestamp":"2026-04-17T17:47:09.087Z"},{"error":"Error: Not connected\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:93:54436)\n at new Promise (native:1:11)\n at request (/$bunfs/root/src/entrypoints/cli.js:93:54381)\n at callTool (/$bunfs/root/src/entrypoints/cli.js:829:9909)\n at qM7 (/$bunfs/root/src/entrypoints/cli.js:4753:3718)\n at CB (/$bunfs/root/src/entrypoints/cli.js:4752:37989)\n at Sx5 (/$bunfs/root/src/entrypoints/cli.js:8242:9518)\n at j (/$bunfs/root/src/entrypoints/cli.js:8242:8148)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8242:8479)\n at qX (/$bunfs/root/src/entrypoints/cli.js:477:63169)","timestamp":"2026-04-17T17:47:09.087Z"},{"error":"Error: Not connected\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:93:54436)\n at new Promise (native:1:11)\n …
Note: Content was truncated.
3 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
TL;DR
Claude Code CLI consistently fails with
API Error: Unable to connect to API (ECONNRESET)againsthttps://api.anthropic.com/v1/messages?beta=trueafter exhausting its 10-retry budget, specifically on long-running turns in sessions with large accumulated context. The errors are mid-stream resets, not connect-time failures — the server has already accepted the request and begun writing the response when the socket is RST'd. Retry-1 recovers ~64% of failures; retry-2 recovers only ~23%; retries 3–10 are effectively useless on the same turn. I have ~5 weeks of on-disk evidence across 11 projects and 17 sessions.Full diagnostic report (41 KB, fully de-identified for public posting) is attached at the end of this issue.
Environment
| | |
|---|---|
| Claude Code versions seen in errors | 13 distinct, including current
2.1.114|| Model |
claude-opus-4-7, including the 1M-context variant (claude-opus-4-7[1m]) in at least some of the affected sessions. Note: Claude Code's session jsonl recordsmessage.modelasclaude-opus-4-7whether the 1M tier is active or not, so the log cannot distinguish 1M from standard context — this is itself worth fixing (see asks below). || OS | macOS 26.3, Apple Silicon iMac |
| Network | Comcast residential, no VPN, no proxy, no corporate filtering, no local packet-filter rules |
| ISP / path | Comcast CGNAT → Comcast iBone → Cloudflare peering →
160.79.104.10|| Connect-path health at rest | TCP 22–29 ms, TLS 1.3 51–64 ms, 100% handshake success across 11 probe rounds |
Reproduction pattern
Not a clean one-liner — this is a failure mode that emerges on large accumulated contexts:
.jsonlexceeds ~6 MB (roughly a multi-hour session with many tool calls).API Error: Unable to connect to API (ECONNRESET)after ~10–20 minutes of retrying.In my data, sessions
>= 6 MBaccount for 74.6% of size-attributable errors despite being only 1.8% of all sessions on disk.Key evidence from the data
/v1/messages?beta=true.cf-ray,server: cloudflare,x-envoy-upstream-service-timeall present on successful responses — the failing path is Cloudflare → Envoy → inference worker. The failure mode produces a raw TCP RST rather than a clean5xx.net::ERR_INTERNET_DISCONNECTEDevents in the Claude desktop app'smain.log. This rules out Wi-Fi link layer as the mechanism (confirmed by 72 h of debug-levellog show --predicate 'subsystem == "com.apple.wifi"'with zero deauth / disassoc / roam / beacon-loss events) and points to CGNAT conntrack eviction or ISP-edge flaps on long-lived streams.This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.