[Bug] Post-Compact context consumes excessive tokens without limit control
Resolved 💬 3 comments Opened Jan 15, 2026 by Gaurav-Wankhede Closed Jan 19, 2026
Bug Description
Post-Compact it consumes 50k Tokens which is unnecessary Token Wastage. Even there is no manual controller to handle the Token Limitation for the POST Compact Context handling. Please fix this immediately
Environment Info
- Platform: linux
- Terminal: vte-based
- Version: 2.1.7
- Feedback ID: cf767518-61ed-4cf8-9ccd-e093dbdcb721
Errors
[{"error":"Error: {\"stack\":\"Error: Failed to export 8 events\\n at ua1.doExport (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:261:1297)\",\"message\":\"Failed to export 8 events\",\"name\":\"Error\"}\n at TH0.error (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2283:34862)\n at Zn1.error (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:255:10521)\n at file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:255:41546\n at $u3 (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:255:42092)\n at file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:256:20245","timestamp":"2026-01-15T19:56:53.224Z"},{"error":"AggregateError\n at UGA.from (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:42:67419)\n at Fq.<anonymous> (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:56:10031)\n at Fq.emit (node:events:531:35)\n at Fq.emit (node:domain:489:12)\n at rM1.<computed> (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:55:3436)\n at ClientRequest.emit (node:events:531:35)\n at ClientRequest.emit (node:domain:489:12)\n at emitErrorEvent (node:_http_client:105:11)\n at TLSSocket.socketErrorListener (node:_http_client:518:5)\n at TLSSocket.emit (node:events:519:28)\n at cUA.request (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:58:2132)\n at processTicksAndRejections (node:internal/process/task_queues:105:5)\n at runNextTicks (node:internal/process/task_queues:69:3)\n at process.processTimers (node:internal/timers:520:9)\n at async Gy0 (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:5042:4241)","timestamp":"2026-01-15T19:56:59.860Z"},{"error":"Error: 1P event logging: 9 events failed to export\n at ua1.queueFailedEvents (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:261:2038)\n at async ua1.doExport (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:261:1195)","timestamp":"2026-01-15T19:57:05.342Z"},{"error":"Error: {\"stack\":\"Error: Failed to export 9 events\\n at ua1.doExport (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:261:1297)\",\"message\":\"Failed to export 9 events\",\"name\":\"Error\"}\n at TH0.error (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2283:34862)\n at Zn1.error (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:255:10521)\n at file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:255:41546\n at $u3 (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:255:42092)\n at file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:256:20245","timestamp":"2026-01-15T19:57:05.342Z"},{"error":"Error: 1P event logging: 12 events failed to export\n at ua1.queueFailedEvents (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:261:2038)\n at async ua1.doExport (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:261:1195)","timestamp":"2026-01-15T19:58:42.667Z"},{"error":"Error: {\"stack\":\"Error: Failed to export 12 events\\n at ua1.doExport (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:261:1297)\",\"message\":\"Failed to export 12 events\",\"name\":\"Error\"}\n at TH0.error (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2283:34862)\n at Zn1.error (file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:255:10521)\n at file:///home/gaurav-wankhede/.nvm/versions/node/v22.19.0/lib/node_modules/@an
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗