[Bug] CLI input lag in extended sessions with high context utilization

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened Dec 19, 2025 · closed Dec 19, 2025

Bug Description
Performance issue: CLI input lag after extended sessions

  • After ~30+ interactions in the same context window, typing becomes very slow with noticeable delay
  • Context usage at time of issue: ~64% (128k/200k tokens)
  • The lag is in the input field itself, not in response generation
  • Workaround: starting a new session resolves the issue
  • OS: Linux 6.1.0-40-amd64

Environment Info

  • Platform: linux
  • Terminal: gnome-terminal
  • Version: 2.0.72
  • Feedback ID: de37b920-12f5-49c3-b5e7-404a21ab0902

Errors

[{"error":"Error: Request was aborted.\n    at B0A._createMessage (file:///home/LECOM/henrique.winckler/.nvm/versions/node/v18.20.8/lib/node_modules/@anthropic-ai/claude-code/cli.js:464:3157)\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at runNextTicks (node:internal/process/task_queues:64:3)\n    at process.processTimers (node:internal/timers:509:9)","timestamp":"2025-12-18T23:40:04.450Z"},{"error":"Error: Request was aborted.\n    at B0A._createMessage (file:///home/LECOM/henrique.winckler/.nvm/versions/node/v18.20.8/lib/node_modules/@anthropic-ai/claude-code/cli.js:464:3157)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-12-18T23:41:35.679Z"},{"error":"AbortError: The operation was aborted\n    at abortChildProcess (node:child_process:724:27)\n    at EventTarget.onAbortListener (node:child_process:794:7)\n    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:786:20)\n    at EventTarget.dispatchEvent (node:internal/event_target:721:26)\n    at abortSignal (node:internal/abort_controller:369:10)\n    at AbortController.abort (node:internal/abort_controller:403:5)\n    at Timeout._onTimeout (file:///home/LECOM/henrique.winckler/.nvm/versions/node/v18.20.8/lib/node_modules/@anthropic-ai/claude-code/cli.js:4806:2059)\n    at listOnTimeout (node:internal/timers:569:17)\n    at process.processTimers (node:internal/timers:512:7)","timestamp":"2025-12-19T00:48:04.597Z"},{"error":"Error: Request was aborted.\n    at jT.makeRequest (file:///home/LECOM/henrique.winckler/.nvm/versions/node/v18.20.8/lib/node_modules/@anthropic-ai/claude-code/cli.js:807:3940)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-12-19T01:02:42.739Z"}]

View original on GitHub ↗

3 Comments

github-actions[bot] · 10 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/14466
  2. https://github.com/anthropics/claude-code/issues/14413
  3. https://github.com/anthropics/claude-code/issues/14476

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

mkurzawa1 · 9 months ago

Confirming this issue with additional diagnostic data from extensive debugging session.

Environment

  • Platform: WSL2 Ubuntu 24 on Windows 11
  • Claude Code: 2.0.72 (upgraded from 2.0.71)
  • Node: v20.19.5
  • IDE: Cursor with Claude Code extension
  • Account: Claude Max (Opus 4.5)
  • RAM: 16GB (14GB free during issue)
  • CPU: Low usage (load average 0.00-0.95)

Symptoms

  1. Typing lag: 2-5+ seconds between each character appearing in the input field
  2. Connection timeouts: "Request timed out. Check your internet connection and proxy settings" - retries up to 10/10
  3. API errors: "API Error: Connection error" on most requests
  4. Complete freezes: Eventually the entire session becomes unresponsive, even /exit command takes 30+ seconds to register
  5. Pasting large text: Pasting ~684 lines triggers immediate connection errors

Critical Evidence: NOT a Network Issue

  • GPT models work perfectly in the same Cursor IDE, same WSL2 environment, same terminal
  • curl -I https://api.anthropic.com succeeds instantly with HTTP/2 200
  • DNS resolution works fine
  • TLS handshake completes successfully

Debugging Attempts (None Resolved the Issue)

  1. ✗ Increased timeout: ANTHROPIC_TIMEOUT=120000
  2. ✗ Disabled HTTP/2: ANTHROPIC_DISABLE_HTTP2=1
  3. ✗ WSL2 mirrored networking mode in .wslconfig
  4. ✗ DNS fix (Google/Cloudflare nameservers)
  5. ✗ Deleted ~/.claude and ~/project/.claude directories
  6. ✗ Fresh login with claude /login
  7. ✗ Created .claudeignore to exclude node_modules/, data/, etc.
  8. ✗ Killed all Claude processes and restarted

Project Context

  • ~27,000 files in project (but .claudeignore was added)
  • 1.7GB data directory (excluded via .claudeignore)
  • 872-line CLAUDE.md file

Reproduction

  1. Have a medium-to-large project (~20k+ files)
  2. Upgrade to 2.0.72 from any 1.x version
  3. Start Claude Code session
  4. Attempt to type or paste anything
  5. Observe multi-second input lag and eventual connection errors

Workaround

Downgrading to 2.0.71 resolves the issue (as original reporter noted).

sudo npm install -g @anthropic-ai/claude-code@2.0.71

Hypothesis

Something in the 2.0.71 → 2.0.72 change is causing the Node.js event loop to block, possibly related to:

  • File indexing/watching not respecting .claudeignore
  • Memory leak during session
  • The new Chrome extension feature mentioned in changelog ("Claude in Chrome Beta")

This is a severe regression that makes 2.0.72 completely unusable on Linux/WSL2 with larger projects.

github-actions[bot] · 9 months ago

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.