[Feature Request] Restore auto-compacting and allow agent state persistence before context limit

Resolved 💬 2 comments Opened Apr 14, 2026 by mividtim Closed May 23, 2026

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.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗