[Bug] Context Compaction Fails Near Capacity Limit

Resolved 💬 1 comment Opened Oct 2, 2025 by mishaal79 Closed Oct 2, 2025

Bug Description
Compaction doesn't work when you have about 1-5% of context left.
There is no way of resuming the context too.

Environment Info

  • Platform: darwin
  • Terminal: WezTerm
  • Version: 2.0.1
  • Feedback ID:

Errors

[{"error":"Error: {\"message\":\"14 UNAVAILABLE: No connection established. Last error: Error: connect ECONNREFUSED ::1:4317\",\"code\":\"14\",\"details\":\"No connection established. Last error: Error: connect ECONNREFUSED ::1:4317\",\"metadata\":\"[object Object]\",\"originalLine\":\"487\",\"originalColumn\":\"37\",\"line\":\"487\",\"column\":\"37\",\"sourceURL\":\"/$bunfs/root/claude\",\"stack\":\"Error: 14 UNAVAILABLE: No connection established. Last error: Error: connect ECONNREFUSED ::1:4317\\n    at j5X (/$bunfs/root/claude:485:280833)\\n    at onReceiveStatus (/$bunfs/root/claude:489:2714)\\n    at onReceiveStatus (/$bunfs/root/claude:487:9005)\\n    at onReceiveStatus (/$bunfs/root/claude:487:8391)\\n    at <anonymous> (/$bunfs/root/claude:503:30810)\\n    at processTicksAndRejections (native:7:39)\\nfor call at\\n    at makeUnaryRequest (/$bunfs/root/claude:489:2241)\\n    at <anonymous> (/$bunfs/root/claude:505:99671)\\n    at new Promise (native:1:11)\\n    at send (/$bunfs/root/claude:505:99536)\\n    at export (/$bunfs/root/claude:472:31821)\\n    at export (/$bunfs/root/claude:472:1807)\\n    at <anonymous> (/$bunfs/root/claude:3561:35057)\\n    at <anonymous> (/$bunfs/root/claude:3561:35017)\\n    at new Promise (native:1:11)\\n    at QDW (/$bunfs/root/claude:3561:34994)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/claude:3573:26422)\n    at <anonymous> (/$bunfs/root/claude:3561:30044)\n    at qP (/$bunfs/root/claude:3561:30345)\n    at <anonymous> (/$bunfs/root/claude:3573:25454)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-10-02T07:34:46.936Z"},{"error":"Error: {\"message\":\"PeriodicExportingMetricReader: metrics export failed (error Error: 14 UNAVAILABLE: No connection established. Last error: Error: connect ECONNREFUSED ::1:4317)\",\"originalLine\":\"3561\",\"originalColumn\":\"42590\",\"line\":\"3561\",\"column\":\"42590\",\"sourceURL\":\"/$bunfs/root/claude\",\"stack\":\"Error: PeriodicExportingMetricReader: metrics export failed (error Error: 14 UNAVAILABLE: No connection established. Last error: Error: connect ECONNREFUSED ::1:4317)\\n    at _doRun (/$bunfs/root/claude:3561:42590)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/claude:3573:26422)\n    at <anonymous> (/$bunfs/root/claude:3561:30044)\n    at qP (/$bunfs/root/claude:3561:30345)\n    at _runOnce (/$bunfs/root/claude:3561:42102)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-10-02T07:35:30.670Z"},{"error":"Error: {\"message\":\"PeriodicExportingMetricReader: metrics export failed (error Error: 14 UNAVAILABLE: No connection established. Last error: Error: connect ECONNREFUSED ::1:4317)\",\"originalLine\":\"3561\",\"originalColumn\":\"42590\",\"line\":\"3561\",\"column\":\"42590\",\"sourceURL\":\"/$bunfs/root/claude\",\"stack\":\"Error: PeriodicExportingMetricReader: metrics export failed (error Error: 14 UNAVAILABLE: No connection established. Last error: Error: connect ECONNREFUSED ::1:4317)\\n    at _doRun (/$bunfs/root/claude:3561:42590)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/claude:3573:26422)\n    at <anonymous> (/$bunfs/root/claude:3561:30044)\n    at qP (/$bunfs/root/claude:3561:30345)\n    at _runOnce (/$bunfs/root/claude:3561:42102)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-10-02T07:36:30.670Z"},{"error":"Error: {\"message\":\"PeriodicExportingMetricReader: metrics export failed (error Error: 14 UNAVAILABLE: No connection established. Last error: Error: connect ECONNREFUSED ::1:4317)\",\"originalLine\":\"3561\",\"originalColumn\":\"42590\",\"line\":\"3561\",\"column\":\"42590\",\"sourceURL\":\"/$bunfs/root/claude\",\"stack\":\"Error: PeriodicExportingMetricReader: metrics export failed (error Error: 14 UNAVAILABLE: No connection established. Last error: Error: connect ECONNREFUSED ::1:4317)\\n    at _doRun (/$bunfs/root/claude:3561:42590)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/claude:3573:26422)\n    at <anonymous> (/$bunfs/root/claude:3561:30044)\n    at qP (/$bunfs/root/claude:3561:30345)\n    at _runOnce (/$bunfs/root/claude:3561:42102)\n    at processTicksAndRejections (native:7:39)","timestamp

Note: Error logs were truncated.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗