[Feature Request] Configurable auto-compact threshold for earlier context management

Resolved 💬 3 comments Opened Apr 28, 2026 by oxoxDev Closed May 2, 2026

Bug Description
Feature request: configurable auto-compact threshold Today, auto-compaction only fires near the hard context limit. By that point a lot of useful state has already been pushed past the cache window, and the compact summary is forced to lose detail because there's just too much to summarize at once. Please add: 1. A user-configurable threshold (e.g. settings.json key autoCompactThreshold: 0.4) that triggers compaction when context usage exceeds that fraction of the model's window. Same compaction behavior, just earlier. 2. OR: extend the existing PreCompact hook (or add a new ContextUsageThreshold hook) that fires with the current usage % so users can implement custom-threshold compaction via shell hooks. Why: I want to compact at ~40% so the model isn't reasoning through a half-full conversation when it picks up subtle cues. Manual /compact works but I forget at exactly the moments where remembering matters. Either path solves it.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.121
  • Feedback ID: 859f26db-5b55-416f-acff-4479308c0f1a

Errors

[{"error":"Error: Tool mcp__sequential-thinking__sequentialthinking not found\n    at xP7 (/$bunfs/root/src/entrypoints/cli.js:3113:36240)\n    at tA (/$bunfs/root/src/entrypoints/cli.js:497:21131)\n    at Mz (/$bunfs/root/src/entrypoints/cli.js:497:39898)\n    at F4 (/$bunfs/root/src/entrypoints/cli.js:497:50707)\n    at c7H (/$bunfs/root/src/entrypoints/cli.js:497:87769)\n    at UJ6 (/$bunfs/root/src/entrypoints/cli.js:497:86724)\n    at d7H (/$bunfs/root/src/entrypoints/cli.js:497:86544)\n    at fkH (/$bunfs/root/src/entrypoints/cli.js:497:82869)\n    at oH (/$bunfs/root/src/entrypoints/cli.js:497:6549)\n    at kH (/$bunfs/root/src/entrypoints/cli.js:497:5003…

Note: Content was truncated.

View original on GitHub ↗

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