claude-code - 💡(How to fix) Fix [Bug] Context window underutilization: 88k of 1M tokens used before session interruption [1 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#46380Fetched 2026-04-11 06:21:49
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Error Message

[{"error":"Error: Not connected\n at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54215\n at new Promise (<anonymous>)\n at lh8.request (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54154)\n at lh8.callTool (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1691:9857)\n at kB4 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:99471)\n at KF (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:90429)\n at NtY (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:9499)\n at X (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8129)\n at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8461\n at XL (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:546:63169)","timestamp":"2026-04-10T16:53:06.168Z"},{"error":"Error: Not connected\n at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54215\n at new Promise (<anonymous>)\n at lh8.request (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54154)\n at lh8.callTool (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1691:9857)\n at kB4 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:99471)\n at KF (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:90429)\n at NtY (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:9499)\n at X (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8129)\n at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8461\n at XL (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:546:63169)","timestamp":"2026-04-10T16:53:06.168Z"},{"error":"Error: Not connected\n at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54215\n at new Promise (<anonymous>)\n at lh8.request (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54154)\n at lh8.callTool (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1691:9857)\n at kB4 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:99471)\n at KF (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:90429)\n at Xj7 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:9929)\n at w (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8992)\n at NtY (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:9820)\n at async X (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8123)","timestamp":"2026-04-10T16:53:06.168Z"},{"error":"Error: Not connected\n at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54215\n at new Promise (<anonymous>)\n at lh8.request (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54154)\n at lh8.callTool (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1691:9857)\n at kB4 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:99471)\n at KF (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:90429)\n at Xj7 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:9929)\n at closeTabInIDE (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8575)\n at g (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:19575)\n at Object.onChange (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:20639)","timestamp":"2026-04-10T16:53:10.295Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n at Module.readSync (node:fs:732:18)\n at Object.readSync (file:///Users/danhenders/.claude/local/n…

Code Example

[{"error":"Error: Not connected\n    at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54215\n    at new Promise (<anonymous>)\n    at lh8.request (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54154)\n    at lh8.callTool (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1691:9857)\n    at kB4 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:99471)\n    at KF (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:90429)\n    at NtY (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:9499)\n    at X (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8129)\n    at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8461\n    at XL (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:546:63169)","timestamp":"2026-04-10T16:53:06.168Z"},{"error":"Error: Not connected\n    at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54215\n    at new Promise (<anonymous>)\n    at lh8.request (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54154)\n    at lh8.callTool (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1691:9857)\n    at kB4 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:99471)\n    at KF (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:90429)\n    at NtY (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:9499)\n    at X (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8129)\n    at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8461\n    at XL (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:546:63169)","timestamp":"2026-04-10T16:53:06.168Z"},{"error":"Error: Not connected\n    at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54215\n    at new Promise (<anonymous>)\n    at lh8.request (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54154)\n    at lh8.callTool (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1691:9857)\n    at kB4 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:99471)\n    at KF (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:90429)\n    at Xj7 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:9929)\n    at w (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8992)\n    at NtY (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:9820)\n    at async X (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8123)","timestamp":"2026-04-10T16:53:06.168Z"},{"error":"Error: Not connected\n    at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54215\n    at new Promise (<anonymous>)\n    at lh8.request (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54154)\n    at lh8.callTool (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1691:9857)\n    at kB4 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:99471)\n    at KF (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:90429)\n    at Xj7 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:9929)\n    at closeTabInIDE (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8575)\n    at g (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:19575)\n    at Object.onChange (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:20639)","timestamp":"2026-04-10T16:53:10.295Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readSync (node:fs:732:18)\n    at Object.readSync (file:///Users/danhenders/.claude/local/n…
RAW_BUFFERClick to expand / collapse

Bug Description just ending claude suggesting, we pick up later. ⏺ Saved. Next session will pick up with those 4 items in order. Good stopping point. its 88k context of 1 million window. ive had this mutiple times today.

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.100
  • Feedback ID: d73385b7-33f8-4b85-9471-d66f9d59087f

Errors

[{"error":"Error: Not connected\n    at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54215\n    at new Promise (<anonymous>)\n    at lh8.request (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54154)\n    at lh8.callTool (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1691:9857)\n    at kB4 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:99471)\n    at KF (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:90429)\n    at NtY (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:9499)\n    at X (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8129)\n    at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8461\n    at XL (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:546:63169)","timestamp":"2026-04-10T16:53:06.168Z"},{"error":"Error: Not connected\n    at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54215\n    at new Promise (<anonymous>)\n    at lh8.request (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54154)\n    at lh8.callTool (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1691:9857)\n    at kB4 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:99471)\n    at KF (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:90429)\n    at NtY (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:9499)\n    at X (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8129)\n    at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8461\n    at XL (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:546:63169)","timestamp":"2026-04-10T16:53:06.168Z"},{"error":"Error: Not connected\n    at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54215\n    at new Promise (<anonymous>)\n    at lh8.request (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54154)\n    at lh8.callTool (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1691:9857)\n    at kB4 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:99471)\n    at KF (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:90429)\n    at Xj7 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:9929)\n    at w (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8992)\n    at NtY (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:9820)\n    at async X (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8123)","timestamp":"2026-04-10T16:53:06.168Z"},{"error":"Error: Not connected\n    at file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54215\n    at new Promise (<anonymous>)\n    at lh8.request (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:94:54154)\n    at lh8.callTool (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1691:9857)\n    at kB4 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:99471)\n    at KF (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1767:90429)\n    at Xj7 (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:9929)\n    at closeTabInIDE (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:8575)\n    at g (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:19575)\n    at Object.onChange (file:///Users/danhenders/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:8267:20639)","timestamp":"2026-04-10T16:53:10.295Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readSync (node:fs:732:18)\n    at Object.readSync (file:///Users/danhenders/.claude/local/n…

Note: Content was truncated.

extent analysis

TL;DR

The most likely fix is to check and resolve the "Not connected" error and investigate the "EISDIR: illegal operation on a directory, read" error, which may be related to file system or network connectivity issues.

Guidance

  • Investigate the "Not connected" error, which appears to be the primary issue, by checking network connectivity and the status of the Claude service.
  • Look into the "EISDIR: illegal operation on a directory, read" error, which may indicate a problem with file system permissions or an incorrect file path.
  • Check the file system for any issues with the @anthropic-ai/claude-code module, as it is mentioned in the error messages.
  • Verify that the cli.js file is correctly configured and that there are no issues with the Node.js environment.

Notes

The provided error messages suggest that there may be multiple issues at play, including connectivity problems and file system errors. Without more information, it is difficult to provide a more specific solution. Additionally, the truncated content may be hiding important details.

Recommendation

Apply a workaround by checking the network connectivity and file system permissions, and try to reproduce the issue to gather more information. If the issue persists, consider seeking further assistance from the Claude support team or the Node.js community.

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