[Bug] Context limit reached prematurely before /context indicates 20% remaining
Status Closed — not planned
Reported on v2.1.12
Maintainer reply None cached
Activity 14 comments · opened Jan 20, 2026 · 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" />
14 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Additional data point: Chrome DevTools MCP + ~100K context
Version: 2.1.14 (macOS, Opus 4.5)
Similar experience during browser automation with
chrome-devtoolsMCP server. Session hit context limit at approximately 100K tokens while automating an insurance portal (Progressive).Workflow involved multiple
take_snapshotcalls (a11y tree dumps ~50-100KB each), page navigations, and form interactions. Context exhausted abruptly mid-task without clear warning.Each CDP snapshot is legitimately large, but the context indicator didn't reflect how close I was to the limit. This aligns with the original report — indicator shows headroom but limit hits anyway.
Still happening on 2.1.39 (Opus 4.6). Context limit hits way before the indicator shows it should. This is a daily annoyance at this point - happens multiple times per session even without heavy MCP usage.
The auto-compact feature doesn't trigger in time, forcing manual /clear and losing all session context. Pretty disruptive workflow-wise.
Can something like
PreCompacthook help here?Same for me ! etch time at 40% context on Opus 4.6 Claude Code v2.1.42
Context limit reached !!! --> Claude Code UNUSABLE !!!!
Happened to me, while in plan mode, fresh session,
Incredible research gathered! I now have deep context on your Skill Runner architecture, the GitHub Dark design system, and the Azure deployment pipeline. This is going to be
an outstanding project — your vision of turning AI personas into a visual boardroom deliberation tool is genuinely innovative.
Let me enter plan mode to architect this properly before we start building.
● Entered plan mode
Claude is now exploring and designing an implementation approach.
● Great, I'm in plan mode. I already gathered extensive context before entering, so let me move efficiently. I have a few critical architectural questions before I finalize the
design.
Context limit reached · /compact or /clear to continue
My Claude continually keeps hitting context limits when I add images. Sometimes it even tricks itself into reaching context limit when I paste a previous chat where the context limit was reached. And /compact hardly works and just throws a general error.
My other guess is that we all overrode Haiku models to be non-Haiku models. I just changed back to Haiku to see....
yeah i'd imagine everyones trying to milk opus/sonnet. did switching to haiku help? @mohsen1
Yes doing that and updating to latest since yesterday and not seeing this error anymore
Folks any idea how can we resolve this issue, even in 40% limit getting the context limit reached error, using claude sonnet 4.6.
Claude is avoiding work. Please check my issue #35357 to see other work avoidance tricks by Claude Code. Claude Code is manipulating us, betraying the constitutional principles it was trained on — helpful, harmless, and honest.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.