claude-code - 💡(How to fix) Fix [Feature Request] Restore auto-compacting and allow agent state persistence before context limit [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#47932Fetched 2026-04-15 06:38:14
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Error Message

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/tim/.local/share/claude/versions/2.1.100 (expected in multi-process scenarios)\n at dU_ (/$bunfs/root/src/entrypoints/cli.js:2810:2153)\n at qt6 (/$bunfs/root/src/entrypoints/cli.js:2810:1233)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T17:33:46.215Z"},{"error":"Error\n at call (/$bunfs/root/src/entrypoints/cli.js:4367:7632)\n at processTicksAndRejections (unknown:7:39)","timestamp":"2026-04-10T20:28:28.324Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:13352)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:112:3321)\n at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T14:15:54.091Z"},{"error":"Error: 1P event logging: 2 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T14:15:59.096Z"},{"error":"Error: 1P event logging: 5 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-13T11:46:57.417Z"},{"error":"McpToolCallError: error: Error: osascript failed (exit 1): 382:439: execution error: session not found: 7C846686-927E-4DF0-A00D-8883EDDD0EBC (-2700)\n at <anonymous> (/Users/tim/.claude/plugins/cache/agiterra/crew/0.17.0/node_modules/@agiterra/crew-tools/src/iterm.ts:24:15)\n at processTicksAndRejections (:7:39)\n at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T14:20:35.994Z"},{"error":"McpToolCallError: error: Error: iTerm2 session not found: 7C846686-927E-4DF0-A00D-8883EDDD0EBC — pane may have been closed manually or session ID is stale\n at <anonymous> (/Users/tim/.claude/plugins/cache/agiterra/crew/0.17.0/node_modules/@agiterra/crew-tools/src/iterm.ts:163:15)\n at processTicksAndRejections (:7:39)\n at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T14:20:47.038Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/tim/Projects/Fabrica/Brioche.\n at call (/$bunfs/root/src/entrypoints/cli.js:4367:7632)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T14:41:54.425Z"},{"error":"McpToolCallError: error: SystemError\n at #run (:97:9)\n at then (:146:9)\n at processTicksAndRejections (:7:39)\n at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T15:17:15.813Z"},{"error":"McpToolCallError: error: SystemError\n at #run (:97:9)\n at then (:146:9)\n at processTicksAndRejections (:7:39)\n at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T15:17:26.422Z"},{"error":"McpToolCallError: error: SystemError\n at #run (:97:9)\n at then (:146:9)\n at processTicksAndRejections (:7:39)\n at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T15:17:38.528Z"},{"error":"McpToolCallError: error: SystemError\n at #run (:97:9)\n at then (:146:9)\n at processTicksAndRejections (:7:39)\n at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T15:17:53.566Z"},{"error":"McpToolCallError: error: SystemError\n at #run (:97:9)\n at then (:146:9)\n at processTicksAndRejections (:7:39)\n at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T15:17:58.012Z"},{"error":"Error: Duplicate hooks file detected: ./hooks/hooks.json resolves to already-loaded file /Users/tim/.claude/plug…

Code Example

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/tim/.local/share/claude/versions/2.1.100 (expected in multi-process scenarios)\n    at dU_ (/$bunfs/root/src/entrypoints/cli.js:2810:2153)\n    at qt6 (/$bunfs/root/src/entrypoints/cli.js:2810:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T17:33:46.215Z"},{"error":"Error\n    at call (/$bunfs/root/src/entrypoints/cli.js:4367:7632)\n    at processTicksAndRejections (unknown:7:39)","timestamp":"2026-04-10T20:28:28.324Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:13352)\n    at emit (node:events:92:22)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:112:3321)\n    at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T14:15:54.091Z"},{"error":"Error: 1P event logging: 2 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T14:15:59.096Z"},{"error":"Error: 1P event logging: 5 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-13T11:46:57.417Z"},{"error":"McpToolCallError: error: Error: osascript failed (exit 1): 382:439: execution error: session not found: 7C846686-927E-4DF0-A00D-8883EDDD0EBC (-2700)\n    at <anonymous> (/Users/tim/.claude/plugins/cache/agiterra/crew/0.17.0/node_modules/@agiterra/crew-tools/src/iterm.ts:24:15)\n    at processTicksAndRejections (:7:39)\n    at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T14:20:35.994Z"},{"error":"McpToolCallError: error: Error: iTerm2 session not found: 7C846686-927E-4DF0-A00D-8883EDDD0EBC — pane may have been closed manually or session ID is stale\n    at <anonymous> (/Users/tim/.claude/plugins/cache/agiterra/crew/0.17.0/node_modules/@agiterra/crew-tools/src/iterm.ts:163:15)\n    at processTicksAndRejections (:7:39)\n    at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T14:20:47.038Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/tim/Projects/Fabrica/Brioche.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4367:7632)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T14:41:54.425Z"},{"error":"McpToolCallError: error: SystemError\n    at #run (:97:9)\n    at then (:146:9)\n    at processTicksAndRejections (:7:39)\n    at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T15:17:15.813Z"},{"error":"McpToolCallError: error: SystemError\n    at #run (:97:9)\n    at then (:146:9)\n    at processTicksAndRejections (:7:39)\n    at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T15:17:26.422Z"},{"error":"McpToolCallError: error: SystemError\n    at #run (:97:9)\n    at then (:146:9)\n    at processTicksAndRejections (:7:39)\n    at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T15:17:38.528Z"},{"error":"McpToolCallError: error: SystemError\n    at #run (:97:9)\n    at then (:146:9)\n    at processTicksAndRejections (:7:39)\n    at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T15:17:53.566Z"},{"error":"McpToolCallError: error: SystemError\n    at #run (:97:9)\n    at then (:146:9)\n    at processTicksAndRejections (:7:39)\n    at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T15:17:58.012Z"},{"error":"Error: Duplicate hooks file detected: ./hooks/hooks.json resolves to already-loaded file /Users/tim/.claude/plug…
RAW_BUFFERClick to expand / collapse

Bug Description The recent changes to stop auto-compacting and disallow a conversation turn to let the agent save its own state, when only at ~80% of context usage (plenty of headroom to save state), and drop context and re-inject it (obvious on scroll-back) are huge regressions in the usefulness of Claude Code. I literally am going to start using Codex for engineering tasks today.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.100
  • Feedback ID: 00adc283-d876-4618-8c69-0f3685477ba4

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/tim/.local/share/claude/versions/2.1.100 (expected in multi-process scenarios)\n    at dU_ (/$bunfs/root/src/entrypoints/cli.js:2810:2153)\n    at qt6 (/$bunfs/root/src/entrypoints/cli.js:2810:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T17:33:46.215Z"},{"error":"Error\n    at call (/$bunfs/root/src/entrypoints/cli.js:4367:7632)\n    at processTicksAndRejections (unknown:7:39)","timestamp":"2026-04-10T20:28:28.324Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:13352)\n    at emit (node:events:92:22)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:112:3321)\n    at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T14:15:54.091Z"},{"error":"Error: 1P event logging: 2 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T14:15:59.096Z"},{"error":"Error: 1P event logging: 5 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-13T11:46:57.417Z"},{"error":"McpToolCallError: error: Error: osascript failed (exit 1): 382:439: execution error: session not found: 7C846686-927E-4DF0-A00D-8883EDDD0EBC (-2700)\n    at <anonymous> (/Users/tim/.claude/plugins/cache/agiterra/crew/0.17.0/node_modules/@agiterra/crew-tools/src/iterm.ts:24:15)\n    at processTicksAndRejections (:7:39)\n    at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T14:20:35.994Z"},{"error":"McpToolCallError: error: Error: iTerm2 session not found: 7C846686-927E-4DF0-A00D-8883EDDD0EBC — pane may have been closed manually or session ID is stale\n    at <anonymous> (/Users/tim/.claude/plugins/cache/agiterra/crew/0.17.0/node_modules/@agiterra/crew-tools/src/iterm.ts:163:15)\n    at processTicksAndRejections (:7:39)\n    at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T14:20:47.038Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/tim/Projects/Fabrica/Brioche.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4367:7632)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T14:41:54.425Z"},{"error":"McpToolCallError: error: SystemError\n    at #run (:97:9)\n    at then (:146:9)\n    at processTicksAndRejections (:7:39)\n    at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T15:17:15.813Z"},{"error":"McpToolCallError: error: SystemError\n    at #run (:97:9)\n    at then (:146:9)\n    at processTicksAndRejections (:7:39)\n    at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T15:17:26.422Z"},{"error":"McpToolCallError: error: SystemError\n    at #run (:97:9)\n    at then (:146:9)\n    at processTicksAndRejections (:7:39)\n    at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T15:17:38.528Z"},{"error":"McpToolCallError: error: SystemError\n    at #run (:97:9)\n    at then (:146:9)\n    at processTicksAndRejections (:7:39)\n    at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T15:17:53.566Z"},{"error":"McpToolCallError: error: SystemError\n    at #run (:97:9)\n    at then (:146:9)\n    at processTicksAndRejections (:7:39)\n    at jh9 (/$bunfs/root/src/entrypoints/cli.js:1506:63)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T15:17:58.012Z"},{"error":"Error: Duplicate hooks file detected: ./hooks/hooks.json resolves to already-loaded file /Users/tim/.claude/plug…

Note: Content was truncated.

extent analysis

TL;DR

The most likely fix involves addressing the errors related to lock acquisition, timeouts, and session management in the Claude Code environment.

Guidance

  1. Investigate lock acquisition issues: The error "Lock acquisition failed for /Users/tim/.local/share/claude/versions/2.1.100" suggests a problem with concurrent access to resources. Check if multiple processes are trying to access the same resource simultaneously.
  2. Adjust timeout settings: Errors like "AxiosError: timeout of 5000ms exceeded" and "timeout of 10000ms exceeded" indicate that the current timeout settings might be too low. Consider increasing the timeout values to accommodate slower operations.
  3. Verify session management: The "iTerm2 session not found" errors suggest issues with session handling. Ensure that sessions are properly created, managed, and closed to avoid stale session IDs.
  4. Check file paths and existence: The "File does not exist" error indicates a problem with file paths or existence. Verify that the specified files are present and accessible.
  5. Review plugin and dependency versions: The presence of multiple errors from different plugins and dependencies (e.g., @agiterra/crew-tools) might indicate version conflicts or compatibility issues. Ensure that all dependencies are up-to-date and compatible.

Example

No specific code snippet can be provided without more context, but reviewing the error messages and adjusting the relevant code sections (e.g., timeout settings, session management, file paths) should help resolve the issues.

Notes

The provided error log is truncated, which might limit the ability to identify all potential causes. Additionally, the errors seem to originate from various sources, including plugins and dependencies, which could indicate a complex issue requiring a comprehensive review of the environment and codebase.

Recommendation

Apply a workaround by adjusting timeout settings and verifying session management, as these seem to be the most pressing issues. If the problems persist, consider seeking further assistance or reviewing the codebase and environment configuration in more detail.

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