claude-code - 💡(How to fix) Fix [Bug] Claude Code CLI responses extremely slow (2+ minutes latency) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45273Fetched 2026-04-09 08:09:12
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Error Message

[{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n at Socket.onChildStdout (node:child_process:484:14)\n at Socket.emit (node:events:518:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)","timestamp":"2026-04-08T14:06:58.583Z"},{"error":"Error: 1P event logging: 2 events failed to export (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\n at fh1.queueFailedEvents (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:2546)\n at async fh1.doExport (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:1465)","timestamp":"2026-04-08T14:09:26.679Z"},{"error":"Error: {"stack":"Error: Failed to export 2 events (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\n at fh1.doExport (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:1640)","message":"Failed to export 2 events (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)","name":"Error"}\n at zn1.error (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2085:4342)\n at EE1.error (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:491:10505)\n at file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:491:36851\n at w9_ (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:491:37397)\n at file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:492:24943","timestamp":"2026-04-08T14:09:26.680Z"},{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n at Socket.onChildStdout (node:child_process:484:14)\n at Socket.emit (node:events:518:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)\n at Pipe.callbackTrampoline (node:internal/async_hooks:130:17)","timestamp":"2026-04-08T14:23:53.492Z"},{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n at Socket.onChildStdout (node:child_process:484:14)\n at Socket.emit (node:events:518:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)\n at Pipe.callbackTrampoline (node:internal/async_hooks:130:17)","timestamp":"2026-04-08T14:24:25.845Z"},{"error":"Error: 1P event logging: 4 events failed to export (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\n at fh1.queueFailedEvents (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:2546)\n at async fh1.doExport (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:1465)","timestamp":"2026-04-08T14:24:38.977Z"},{"error":"Error: {"stack":"Error: Failed to export 4 events (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\n at fh1.doExport (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:1640)","message":"Failed to export 4 events (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)","name":"Error"}\n at zn1.error (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/…

Code Example

[{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n    at Socket.onChildStdout (node:child_process:484:14)\n    at Socket.emit (node:events:518:28)\n    at addChunk (node:internal/streams/readable:561:12)\n    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n    at Readable.push (node:internal/streams/readable:392:5)\n    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)","timestamp":"2026-04-08T14:06:58.583Z"},{"error":"Error: 1P event logging: 2 events failed to export (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\n    at fh1.queueFailedEvents (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:2546)\n    at async fh1.doExport (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:1465)","timestamp":"2026-04-08T14:09:26.679Z"},{"error":"Error: {\"stack\":\"Error: Failed to export 2 events (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\\n    at fh1.doExport (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:1640)\",\"message\":\"Failed to export 2 events (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\",\"name\":\"Error\"}\n    at zn1.error (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2085:4342)\n    at EE1.error (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:491:10505)\n    at file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:491:36851\n    at w9_ (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:491:37397)\n    at file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:492:24943","timestamp":"2026-04-08T14:09:26.680Z"},{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n    at Socket.onChildStdout (node:child_process:484:14)\n    at Socket.emit (node:events:518:28)\n    at addChunk (node:internal/streams/readable:561:12)\n    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n    at Readable.push (node:internal/streams/readable:392:5)\n    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)\n    at Pipe.callbackTrampoline (node:internal/async_hooks:130:17)","timestamp":"2026-04-08T14:23:53.492Z"},{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n    at Socket.onChildStdout (node:child_process:484:14)\n    at Socket.emit (node:events:518:28)\n    at addChunk (node:internal/streams/readable:561:12)\n    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n    at Readable.push (node:internal/streams/readable:392:5)\n    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)\n    at Pipe.callbackTrampoline (node:internal/async_hooks:130:17)","timestamp":"2026-04-08T14:24:25.845Z"},{"error":"Error: 1P event logging: 4 events failed to export (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\n    at fh1.queueFailedEvents (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:2546)\n    at async fh1.doExport (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:1465)","timestamp":"2026-04-08T14:24:38.977Z"},{"error":"Error: {\"stack\":\"Error: Failed to export 4 events (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\\n    at fh1.doExport (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:1640)\",\"message\":\"Failed to export 4 events (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\",\"name\":\"Error\"}\n    at zn1.error (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/…
RAW_BUFFERClick to expand / collapse

Bug Description Title: Claude Code extremely slow response time (2+ minutes for simple prompts) Description: Simple prompts like "hi" take ~2 minutes to get a response in Claude Code. This started recently with no changes to my setup.

Claude.ai (web) and Claude app work fine, normal speed Only Claude Code is affected Network test: curl to api.anthropic.com shows dns 0.2ms, connect 1.4ms, first_byte 3.3s — connection itself is fine Windows 11, Clash Verge proxy (unchanged config) Not a context/skill overload issue — happens even with a fresh claude session and a single "hi" Behavior: either responds very slowly or hangs, no middle ground

Claude Code version: v2.1.96

Environment Info

  • Platform: win32
  • Terminal: WezTerm
  • Version: 2.1.96
  • Feedback ID: 087d2f3a-2459-4616-8a6c-f3f19f12111e

Errors

[{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n    at Socket.onChildStdout (node:child_process:484:14)\n    at Socket.emit (node:events:518:28)\n    at addChunk (node:internal/streams/readable:561:12)\n    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n    at Readable.push (node:internal/streams/readable:392:5)\n    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)","timestamp":"2026-04-08T14:06:58.583Z"},{"error":"Error: 1P event logging: 2 events failed to export (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\n    at fh1.queueFailedEvents (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:2546)\n    at async fh1.doExport (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:1465)","timestamp":"2026-04-08T14:09:26.679Z"},{"error":"Error: {\"stack\":\"Error: Failed to export 2 events (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\\n    at fh1.doExport (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:1640)\",\"message\":\"Failed to export 2 events (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\",\"name\":\"Error\"}\n    at zn1.error (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2085:4342)\n    at EE1.error (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:491:10505)\n    at file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:491:36851\n    at w9_ (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:491:37397)\n    at file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:492:24943","timestamp":"2026-04-08T14:09:26.680Z"},{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n    at Socket.onChildStdout (node:child_process:484:14)\n    at Socket.emit (node:events:518:28)\n    at addChunk (node:internal/streams/readable:561:12)\n    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n    at Readable.push (node:internal/streams/readable:392:5)\n    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)\n    at Pipe.callbackTrampoline (node:internal/async_hooks:130:17)","timestamp":"2026-04-08T14:23:53.492Z"},{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n    at Socket.onChildStdout (node:child_process:484:14)\n    at Socket.emit (node:events:518:28)\n    at addChunk (node:internal/streams/readable:561:12)\n    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n    at Readable.push (node:internal/streams/readable:392:5)\n    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)\n    at Pipe.callbackTrampoline (node:internal/async_hooks:130:17)","timestamp":"2026-04-08T14:24:25.845Z"},{"error":"Error: 1P event logging: 4 events failed to export (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\n    at fh1.queueFailedEvents (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:2546)\n    at async fh1.doExport (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:1465)","timestamp":"2026-04-08T14:24:38.977Z"},{"error":"Error: {\"stack\":\"Error: Failed to export 4 events (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\\n    at fh1.doExport (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:496:1640)\",\"message\":\"Failed to export 4 events (code=ECONNRESET, Client network socket disconnected before secure TLS connection was established)\",\"name\":\"Error\"}\n    at zn1.error (file:///C:/Users/ADMIN/AppData/Roaming/npm/node_modules/…

Note: Content was truncated.

extent analysis

TL;DR

The issue with Claude Code's slow response time may be related to the ERR_CHILD_PROCESS_STDIO_MAXBUFFER error and network socket disconnections, suggesting a potential fix or workaround involving buffer size adjustments or network configuration tweaks.

Guidance

  • Investigate the ERR_CHILD_PROCESS_STDIO_MAXBUFFER error and consider increasing the maxBuffer size to prevent stdout maxBuffer length exceeded errors.
  • Verify network connectivity and stability, as the ECONNRESET error indicates client network socket disconnections before secure TLS connections are established.
  • Check the Clash Verge proxy configuration to ensure it is not causing any issues with the connection to api.anthropic.com.
  • Test Claude Code with a different network setup or without the proxy to isolate the issue.

Example

No specific code snippet can be provided without more context, but adjusting the maxBuffer size might look something like this:

const { exec } = require('child_process');

const child = exec('command', { maxBuffer: 1024 * 500 }); // increase maxBuffer size

Note that this is a hypothetical example and may not directly apply to the Claude Code issue.

Notes

The provided error logs suggest issues with child process stdout buffering and network socket disconnections. However, without more information about the Claude Code implementation and configuration, it is difficult to provide a more specific solution. The truncated content may also be hiding important details.

Recommendation

Apply a workaround by adjusting the maxBuffer size or network configuration to mitigate the ERR_CHILD_PROCESS_STDIO_MAXBUFFER error and ECONNRESET errors, as the root cause of the issue is unclear and may require further investigation.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING