claude-code - 💡(How to fix) Fix [Bug] Severe latency in Claude Code with long-context sessions (20min+ turn times) [2 comments, 1 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#47731Fetched 2026-04-15 06:43:51
View on GitHub
Comments
2
Participants
1
Timeline
7
Reactions
1
Timeline (top)
labeled ×3commented ×2cross-referenced ×2

Error Message

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/thedemings/.local/share/claude/versions/2.1.105 (expected in multi-process scenarios)\n at bd_ (/$bunfs/root/src/entrypoints/cli.js:2334:2153)\n at nt6 (/$bunfs/root/src/entrypoints/cli.js:2334:1233)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T03:09:25.240Z"},{"error":"Error: 1P event logging: 14 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n at async doExport (/$bunfs/root/src/entrypoints/cli.js:422:1516)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T03:44:44.693Z"},{"error":"Error: 1P event logging: 15 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n at async doExport (/$bunfs/root/src/entrypoints/cli.js:422:1516)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T03:45:04.709Z"}]

Code Example

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/thedemings/.local/share/claude/versions/2.1.105 (expected in multi-process scenarios)\n    at bd_ (/$bunfs/root/src/entrypoints/cli.js:2334:2153)\n    at nt6 (/$bunfs/root/src/entrypoints/cli.js:2334:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T03:09:25.240Z"},{"error":"Error: 1P event logging: 14 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:422:1516)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T03:44:44.693Z"},{"error":"Error: 1P event logging: 15 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:422:1516)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T03:45:04.709Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description ⏺ Bug report: Severe latency in Claude Code session

Model: Opus 4.6 (1M context) Environment: macOS, Claude Code CLI

Issue: Individual turns are taking ~20 minutes to complete, including simple operations like writing 4 small markdown files (<2KB each) via the Write tool. Tool calls themselves appear to execute quickly, but there is significant delay between tool use and the next assistant message streaming.

Context: Long-running conversation (~80k+ tokens) involving multiple subagent calls (5 parallel general-purpose agents earlier in the session, then 2 more debate agents). Conversation includes several CSV reads and tool outputs that remain in context.

Expected: Small Write operations + a few-sentence response should complete in seconds, not minutes.

Observed: ~20 minutes from user message submission to completion of a sequence of 4 Write/Edit tool calls plus a brief summary reply.

Suspected causes (unverified):

  • API/inference latency spike on Anthropic side
  • Prompt cache misses on long context
  • Opus 4.6 throughput under heavy load
  • MCP server response delays

Happy to share session ID or /status output if useful.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.105
  • Feedback ID: c52b4549-60fd-41b4-83fb-87d4023ebc75

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/thedemings/.local/share/claude/versions/2.1.105 (expected in multi-process scenarios)\n    at bd_ (/$bunfs/root/src/entrypoints/cli.js:2334:2153)\n    at nt6 (/$bunfs/root/src/entrypoints/cli.js:2334:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T03:09:25.240Z"},{"error":"Error: 1P event logging: 14 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:422:1516)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T03:44:44.693Z"},{"error":"Error: 1P event logging: 15 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:422:1516)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-14T03:45:04.709Z"}]

extent analysis

TL;DR

The severe latency in Claude Code sessions may be mitigated by investigating and addressing potential causes such as API/inference latency spikes, prompt cache misses, or Opus 4.6 throughput under heavy load.

Guidance

  • Investigate the Error: NON-FATAL: Lock acquisition failed message to determine if it's related to the latency issue, potentially indicating a multi-process scenario conflict.
  • Examine the 1P event logging errors with code=ECONNABORTED to see if event export timeouts are contributing to the delay, possibly due to network or server response issues.
  • Consider sharing the session ID or /status output to help identify the root cause of the latency.
  • Review the conversation context and subagent calls to determine if the complexity of the session is contributing to the latency.

Example

No code snippet is provided as the issue does not explicitly mention a specific code-related problem.

Notes

The provided errors and environment information suggest a complex issue with multiple potential causes. Further investigation is needed to determine the root cause of the latency.

Recommendation

Apply workaround: Investigate and address potential causes such as API/inference latency spikes, prompt cache misses, or Opus 4.6 throughput under heavy load, as the issue seems to be related to the specific session and environment rather than a straightforward version upgrade.

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