claude-code - 💡(How to fix) Fix [Bug] Context limit reached prematurely despite low token usage percentage

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…

Error Message

[{"error":"Error: Claude Code web sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.\n at JD (B:/~BUN/root/src/entrypoints/cli.js:2697:1850)\n at async AW9 (B:/~BUN/root/src/entrypoints/cli.js:3160:14460)\n at async pj_ (B:/~BUN/root/src/entrypoints/cli.js:3160:15096)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:04:56.670Z"},{"error":"Error: Claude Code web sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.\n at JD (B:/~BUN/root/src/entrypoints/cli.js:2697:1850)\n at async AW9 (B:/~BUN/root/src/entrypoints/cli.js:3160:14460)\n at async pj_ (B:/~BUN/root/src/entrypoints/cli.js:3160:15096)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:04:56.670Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\Users\rnerison.CORP\repos\ailab_slt_trainer\agents\deploymentMonitorAgent\deploymentMonitor\test\agentTest.py, got file://c:\users\rnerison.corp\repos\ailab_slt_trainer\agents\deploymentmonitoragent\deploymentmonitor\test\agenttest.py/)\n at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:13:11.918Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\Users\rnerison.CORP\repos\ailab_slt_trainer\agents\deploymentMonitorAgent\deploymentMonitor\test\agentTest.py, got file://c:\users\rnerison.corp\repos\ailab_slt_trainer\agents\deploymentmonitoragent\deploymentmonitor\test\agenttest.py/)\n at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:13:58.391Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\Users\rnerison.CORP\repos\ailab_slt_trainer\agents\deploymentMonitorAgent\deploymentMonitor\test\agentTest.py, got file://c:\users\rnerison.corp\repos\ailab_slt_trainer\agents\deploymentmonitoragent\deploymentmonitor\test\agenttest.py/)\n at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:14:41.954Z"},{"error":"Error: Request was aborted.\n at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:15:08.823Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\Users\rnerison.CORP\repos\ailab_slt_trainer\.claude\sessionContext.md, got file://c:\users\rnerison.corp\repos\ailab_slt_trainer\.claude\sessioncontext.md/)\n at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:36:34.402Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\Users\rnerison.CORP\repos\ailab_slt_trainer\agents\deploymentMonitorAgent\deploymentMonitor\registry.py, got file://c:\users\rnerison.corp\repos\ailab_slt_trainer\agents\deploymentmonitoragent\deploymentmonitor\registry.py/)\n at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-06T13:00:53.219Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\Users\rnerison.CORP\repos\ailab_slt_trainer\.claude\sessionContext.md, got file://c:\users\rnerison.corp\repos\ailab_slt_trainer\.claude\sessioncontext.md/)\n at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-06T13:04:39.520Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\Users\rnerison.CORP\repos\ailab_slt_trainer\common\commonGlobal\datums\datum.py, got file://c:\users\rnerison.corp\repos\ailab_slt_trainer\common\commonglobal\datums\datum.py/)\n at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-06T13:43:05.621Z"},{"error":"Error: Request was aborted.\n at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-06T13:49:34.173Z…

Code Example

[{"error":"Error: Claude Code web sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.\n    at JD (B:/~BUN/root/src/entrypoints/cli.js:2697:1850)\n    at async AW9 (B:/~BUN/root/src/entrypoints/cli.js:3160:14460)\n    at async pj_ (B:/~BUN/root/src/entrypoints/cli.js:3160:15096)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:04:56.670Z"},{"error":"Error: Claude Code web sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.\n    at JD (B:/~BUN/root/src/entrypoints/cli.js:2697:1850)\n    at async AW9 (B:/~BUN/root/src/entrypoints/cli.js:3160:14460)\n    at async pj_ (B:/~BUN/root/src/entrypoints/cli.js:3160:15096)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:04:56.670Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\\Users\\rnerison.CORP\\repos\\ailab_slt_trainer\\agents\\deploymentMonitorAgent\\deploymentMonitor\\test\\agentTest.py, got file://c:\\users\\rnerison.corp\\repos\\ailab_slt_trainer\\agents\\deploymentmonitoragent\\deploymentmonitor\\test\\agenttest.py/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:13:11.918Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\\Users\\rnerison.CORP\\repos\\ailab_slt_trainer\\agents\\deploymentMonitorAgent\\deploymentMonitor\\test\\agentTest.py, got file://c:\\users\\rnerison.corp\\repos\\ailab_slt_trainer\\agents\\deploymentmonitoragent\\deploymentmonitor\\test\\agenttest.py/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:13:58.391Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\\Users\\rnerison.CORP\\repos\\ailab_slt_trainer\\agents\\deploymentMonitorAgent\\deploymentMonitor\\test\\agentTest.py, got file://c:\\users\\rnerison.corp\\repos\\ailab_slt_trainer\\agents\\deploymentmonitoragent\\deploymentmonitor\\test\\agenttest.py/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:14:41.954Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:15:08.823Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\\Users\\rnerison.CORP\\repos\\ailab_slt_trainer\\.claude\\sessionContext.md, got file://c:\\users\\rnerison.corp\\repos\\ailab_slt_trainer\\.claude\\sessioncontext.md/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:36:34.402Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\\Users\\rnerison.CORP\\repos\\ailab_slt_trainer\\agents\\deploymentMonitorAgent\\deploymentMonitor\\registry.py, got file://c:\\users\\rnerison.corp\\repos\\ailab_slt_trainer\\agents\\deploymentmonitoragent\\deploymentmonitor\\registry.py/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-06T13:00:53.219Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\\Users\\rnerison.CORP\\repos\\ailab_slt_trainer\\.claude\\sessionContext.md, got file://c:\\users\\rnerison.corp\\repos\\ailab_slt_trainer\\.claude\\sessioncontext.md/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-06T13:04:39.520Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\\Users\\rnerison.CORP\\repos\\ailab_slt_trainer\\common\\commonGlobal\\datums\\datum.py, got file://c:\\users\\rnerison.corp\\repos\\ailab_slt_trainer\\common\\commonglobal\\datums\\datum.py/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-06T13:43:05.621Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-06T13:49:34.173Z…
RAW_BUFFERClick to expand / collapse

Bug Description It started roughly a week ago end of April. CLI continually hits context limit although I am below 20%. Issue started with version 2.1.28 running 4.5 with 1m context. Rolled back the version to 2.1.20 and it seems to have gotten worse, reached context limit at less than 16%.

  • Fresh install on new domain profile
    • Happens ~2x/day consistently
    • Context shows ~20% but triggers compaction
    • Tried versions 2.1.118 → 2.1.128, all have the issue
    • Old profile (pre-domain migration) never had this

Environment Info

  • Platform: win32
  • Terminal: vscode
  • Version: 2.1.120
  • Feedback ID: 2c4b3f8a-5747-4bc2-9593-eb7382017fde

Errors

[{"error":"Error: Claude Code web sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.\n    at JD (B:/~BUN/root/src/entrypoints/cli.js:2697:1850)\n    at async AW9 (B:/~BUN/root/src/entrypoints/cli.js:3160:14460)\n    at async pj_ (B:/~BUN/root/src/entrypoints/cli.js:3160:15096)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:04:56.670Z"},{"error":"Error: Claude Code web sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.\n    at JD (B:/~BUN/root/src/entrypoints/cli.js:2697:1850)\n    at async AW9 (B:/~BUN/root/src/entrypoints/cli.js:3160:14460)\n    at async pj_ (B:/~BUN/root/src/entrypoints/cli.js:3160:15096)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:04:56.670Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\\Users\\rnerison.CORP\\repos\\ailab_slt_trainer\\agents\\deploymentMonitorAgent\\deploymentMonitor\\test\\agentTest.py, got file://c:\\users\\rnerison.corp\\repos\\ailab_slt_trainer\\agents\\deploymentmonitoragent\\deploymentmonitor\\test\\agenttest.py/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:13:11.918Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\\Users\\rnerison.CORP\\repos\\ailab_slt_trainer\\agents\\deploymentMonitorAgent\\deploymentMonitor\\test\\agentTest.py, got file://c:\\users\\rnerison.corp\\repos\\ailab_slt_trainer\\agents\\deploymentmonitoragent\\deploymentmonitor\\test\\agenttest.py/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:13:58.391Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\\Users\\rnerison.CORP\\repos\\ailab_slt_trainer\\agents\\deploymentMonitorAgent\\deploymentMonitor\\test\\agentTest.py, got file://c:\\users\\rnerison.corp\\repos\\ailab_slt_trainer\\agents\\deploymentmonitoragent\\deploymentmonitor\\test\\agenttest.py/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:14:41.954Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:15:08.823Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\\Users\\rnerison.CORP\\repos\\ailab_slt_trainer\\.claude\\sessionContext.md, got file://c:\\users\\rnerison.corp\\repos\\ailab_slt_trainer\\.claude\\sessioncontext.md/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-05T21:36:34.402Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\\Users\\rnerison.CORP\\repos\\ailab_slt_trainer\\agents\\deploymentMonitorAgent\\deploymentMonitor\\registry.py, got file://c:\\users\\rnerison.corp\\repos\\ailab_slt_trainer\\agents\\deploymentmonitoragent\\deploymentmonitor\\registry.py/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-06T13:00:53.219Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\\Users\\rnerison.CORP\\repos\\ailab_slt_trainer\\.claude\\sessionContext.md, got file://c:\\users\\rnerison.corp\\repos\\ailab_slt_trainer\\.claude\\sessioncontext.md/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-06T13:04:39.520Z"},{"error":"Ou_: Diagnostics file path mismatch: expected C:\\Users\\rnerison.CORP\\repos\\ailab_slt_trainer\\common\\commonGlobal\\datums\\datum.py, got file://c:\\users\\rnerison.corp\\repos\\ailab_slt_trainer\\common\\commonglobal\\datums\\datum.py/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4930:23457)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-06T13:43:05.621Z"},{"error":"Error: Request was aborted.\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-06T13:49:34.173Z…

Note: Content was truncated.

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