[Feature Request] Add compaction quality metrics before triggering next compaction

Resolved 💬 4 comments Opened Dec 5, 2025 by KohlJary Closed Feb 4, 2026

Bug Description
You should be asking the model how well the last compaction went before the next compaction as a metric for compaction quality

Environment Info

  • Platform: linux
  • Terminal: tmux
  • Version: 2.0.59
  • Feedback ID: 73427c9f-d016-4e4d-9377-ba6354cf9f06

Errors

[{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:434:20)\n    at Object.readFileSync (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:299)\n    at eeB (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:4269:17609)\n    at Object.call (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1437:909)\n    at lk3 (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2932:17014)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-12-05T00:14:03.946Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:434:20)\n    at Object.readFileSync (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:9:299)\n    at eeB (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:4269:17609)\n    at Object.call (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1437:909)\n    at lk3 (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2932:17014)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-12-05T00:14:04.284Z"},{"error":"Error: Request was aborted.\n    at Wr._createMessage (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:110:3151)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-12-05T00:35:44.880Z"},{"error":"MaxFileReadTokenExceededError: File content (33918 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n    at teB (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1428:10607)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.call (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1437:963)\n    at async file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1653:1465","timestamp":"2025-12-05T00:42:13.397Z"},{"error":"MaxFileReadTokenExceededError: File content (33958 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n    at teB (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1428:10607)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.call (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1437:963)\n    at async file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1653:1465","timestamp":"2025-12-05T00:57:02.734Z"},{"error":"MaxFileReadTokenExceededError: File content (34457 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n    at teB (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1428:10607)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.call (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1437:963)\n    at async file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1653:1465","timestamp":"2025-12-05T00:59:30.512Z"},{"error":"MaxFileReadTokenExceededError: File content (34714 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n    at teB (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1428:10607)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.call (file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1437:963)\n    at async file:///home/jaryk/.config/nvm/versions/node/v24.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:

Note: Error logs were truncated.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗