claude-code - 💡(How to fix) Fix [Bug] Prompt caching not properly persisting across sessions with large contexts [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#55035Fetched 2026-05-01 05:47:56
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
1
Timeline (top)
labeled ×3commented ×1

Error Message

[{"error":"Error: NON-FATAL: Lock acquisition failed for /home/zsoltjanos/.local/share/claude/versions/2.1.124 (expected in multi-process scenarios)\n at n68 (/$bunfs/root/src/entrypoints/cli.js:2770:2177)\n at aM6 (/$bunfs/root/src/entrypoints/cli.js:2770:1257)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-30T06:30:15.253Z"},{"error":"Error: Request was aborted.\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-30T08:11:11.834Z"}]

Code Example

[{"error":"Error: NON-FATAL: Lock acquisition failed for /home/zsoltjanos/.local/share/claude/versions/2.1.124 (expected in multi-process scenarios)\n    at n68 (/$bunfs/root/src/entrypoints/cli.js:2770:2177)\n    at aM6 (/$bunfs/root/src/entrypoints/cli.js:2770:1257)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-30T06:30:15.253Z"},{"error":"Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-30T08:11:11.834Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description Something must be still off with your caching. I had a big context (56% use of the 1million window) on Opus 4.7, ran out of my 5 hour limit, had to go away for 4 hours, came back, sent one message and it costed me 25% of my current limit window's use. Very frustrating and unfair.

Environment Info

  • Platform: linux
  • Terminal: ghostty
  • Version: 2.1.124
  • Feedback ID: 15ffc0ac-a849-4d07-a1d2-56b32419dd38

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /home/zsoltjanos/.local/share/claude/versions/2.1.124 (expected in multi-process scenarios)\n    at n68 (/$bunfs/root/src/entrypoints/cli.js:2770:2177)\n    at aM6 (/$bunfs/root/src/entrypoints/cli.js:2770:1257)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-30T06:30:15.253Z"},{"error":"Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-30T08:11:11.834Z"}]

extent analysis

TL;DR

The issue may be related to caching and lock acquisition failures, and a potential workaround could be to clear the cache or check for lock file issues.

Guidance

  • Investigate the lock acquisition failure error and check if there are any lock files present in the /home/zsoltjanos/.local/share/claude/versions/2.1.124 directory that may be causing the issue.
  • Verify if the caching mechanism is properly configured and if the cache is being cleared or updated correctly after a certain period of inactivity.
  • Check the cli.js file at lines 2770:2177 and 50:3448 to understand the lock acquisition and request abortion logic.
  • Consider clearing the cache or restarting the application to see if it resolves the issue.

Example

No code snippet is provided as it is not clearly supported by the issue.

Notes

The issue seems to be related to a specific version (2.1.124) and platform (linux), so the solution may not be applicable to other versions or platforms. Additionally, the error messages suggest a multi-process scenario, which may require special handling.

Recommendation

Apply workaround: Clear the cache or check for lock file issues, as it is a safer approach given the limited information available.

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