[Bug] Context limit reached prematurely before /context indicates 20% remaining

Resolved 💬 14 comments Opened Jan 20, 2026 by rbarcante Closed Apr 20, 2026

Bug Description
/context shows 20% context left but I get  Context limit reached · /compact or /clear to continue and can't continue without compacting or clearing

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.12
  • Feedback ID: a3fd8e28-c8e3-4df3-b95d-d8a175e50e50

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/rbarcante/.local/share/claude/versions/2.1.12 (expected in multi-process scenarios)\n    at HZR (/$bunfs/root/claude:3279:2091)\n    at aYA (/$bunfs/root/claude:3279:1202)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-19T18:39:04.085Z"},{"error":"Error: Failed to initialize LSP server plugin:jdtls-lsp:jdtls: LSP server 'plugin:jdtls-lsp:jdtls': startupTimeout is not yet implemented. Remove this field from the configuration.\n    at _ (/$bunfs/root/claude:1564:32605)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-19T18:39:04.112Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at readFileSync (unknown)\n    at <anonymous> (/$bunfs/root/claude:12:582)\n    at AW (/$bunfs/root/claude:11:34695)\n    at readFileSync (/$bunfs/root/claude:12:541)\n    at Sx_ (/$bunfs/root/claude:4568:27043)\n    at call (/$bunfs/root/claude:1503:945)\n    at call (/$bunfs/root/claude:1499:6491)\n    at gd7 (/$bunfs/root/claude:2642:19684)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-19T18:41:26.257Z"},{"error":"Error: {\"message\":\"PeriodicExportingMetricReader: metrics export failed (error Error: 14 UNAVAILABLE: Connection dropped)\",\"originalLine\":\"2238\",\"originalColumn\":\"46185\",\"line\":\"2238\",\"column\":\"46185\",\"sourceURL\":\"/$bunfs/root/claude\",\"stack\":\"Error: PeriodicExportingMetricReader: metrics export failed (error Error: 14 UNAVAILABLE: Connection dropped)\\n    at _doRun (/$bunfs/root/claude:2238:46185)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/claude:2278:25028)\n    at <anonymous> (/$bunfs/root/claude:613:36349)\n    at JzD (/$bunfs/root/claude:613:36893)\n    at _runOnce (/$bunfs/root/claude:2238:45650)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-19T19:03:44.330Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.17.content.21: `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.\"},\"request_id\":\"req_011CXHJumaEjpj3MFAoBxiCx\"}\n    at generate (/$bunfs/root/claude:867:2085)\n    at makeRequest (/$bunfs/root/claude:884:5435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-19T19:44:06.781Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.17.content.21: `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.\"},\"request_id\":\"req_011CXHJwn353hbQtocDQG1Gq\"}\n    at generate (/$bunfs/root/claude:867:2085)\n    at makeRequest (/$bunfs/root/claude:884:5435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-19T19:44:33.880Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.17.content.21: `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response.\"},\"request_id\":\"req_011CXHK4ggJtLTUnqqPJr5A1\"}\n    at generate (/$bunfs/root/claude:867:2085)\n    at makeRequest (/$bunfs/root/claude:884:5435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-19T19:46:07.770Z"}]

<img width="1718" height="1259" alt="Image" src="https://github.com/user-attachments/assets/ec4712aa-4b06-4dee-8e79-f6d65559014c" />

View original on GitHub ↗

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