[Bug] Excessive token consumption in long-running sessions
Resolved 💬 4 comments Opened Apr 7, 2026 by dbasics Closed May 24, 2026
Bug Description
Long-running sessions have consistently consumed a lot of tokens for activities that were previously simpler and consumed less. Continuing a chat in the terminal with Claude Code open since last night consumed approximately 20% of a 5-hour Claude Max 5x session. And the task, in short, consisted of reviewing and drafting a short legal document.
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.92
- Feedback ID: 65f4de31-1dd7-4103-a2fd-f3dba822ddf8
Errors
[{"error":"Error: 1P event logging: 1 events failed to export (code=FailedToOpenSocket, Was there a typo in the url or port?)\n at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n at async doExport (/$bunfs/root/src/entrypoints/cli.js:422:1516)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T21:44:21.058Z"},{"error":"Error: {\"message\":\"Failed to export 1 events (code=FailedToOpenSocket, Was there a typo in the url or port?)\",\"originalLine\":\"422\",\"originalColumn\":\"1668\",\"line\":\"422\",\"column\":\"1668\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: Failed to export 1 events (code=FailedToOpenSocket, Was there a typo in the url or port?)\\n at doExport (/$bunfs/root/src/entrypoints/cli.js:422:1668)\\n at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n at error (/$bunfs/root/src/entrypoints/cli.js:1822:4371)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:417:36794)\n at AZ4 (/$bunfs/root/src/entrypoints/cli.js:417:37338)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:19103)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T21:44:21.074Z"},{"error":"Error: Request was aborted.\n at wN_ (/$bunfs/root/src/entrypoints/cli.js:1239:11929)\n at next (native:1:11)\n at CC7 (/$bunfs/root/src/entrypoints/cli.js:7636:9034)\n at next (native:1:11)\n at xC7 (/$bunfs/root/src/entrypoints/cli.js:7641:11078)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T22:03:47.048Z"},{"error":"MaxFileReadTokenExceededError: File content (15253 tokens) exceeds maximum allowed tokens (10000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n at d$7 (/$bunfs/root/src/entrypoints/cli.js:4294:13161)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T22:06:47.260Z"},{"error":"MaxFileReadTokenExceededError: File content (12343 tokens) exceeds maximum allowed tokens (10000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n at d$7 (/$bunfs/root/src/entrypoints/cli.js:4294:13161)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T22:06:52.508Z"},{"error":"Error: The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()\n at from (/$bunfs/root/src/entrypoints/cli.js:105:7862)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:12934)\n at emitError (node:events:43:23)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:112:1149)\n at emitError (node:events:43:23)\n at <anonymous> (node:_http_client:253:22)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T22:09:23.079Z"},{"error":"MaxFileReadTokenExceededError: File content (17085 tokens) exceeds maximum allowed tokens (10000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n at d$7 (/$bunfs/root/src/entrypoints/cli.js:4294:13161)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T23:27:23.215Z"},{"error":"Error: The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()\n at from (/$bunfs/root/src/entrypoints/cli.js:105:7862)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:12934)\n at emitError (node:events:43:23)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:112:1149)\n at emitError (node:events:43:23)\n at <anonymous> (node:_http_client:253:22)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T23:27:38.126Z"},{"error":"MaxFileReadTokenExceededError: File content (17649 tokens) exceeds maximum allowed tokens (10000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of re…
Note: Content was truncated.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗