Skip to content
Made with Jev

GitHub · by Kun Chen

compact-adviser

Tells you when your session is at a safe point to compact.

Kun Chen

@kunchenguid

almost every day i hear people ask "when should i /compact my session" there's no easy answer because it depends on how likely your future action will need detailed context in the existing window but we have Jev now! introducing compact-adviser - an agent plugin you can use in claude and pi today to help determine whether you're likely at a task boundary that's safe to compact https://github.com/kunchenguid/compact-adviser i built a private eval set from 40 real sessions and manually labeled all the safe vs unsafe checkpoints to evaluate this, and hillclimbed the Jev prompt till it performed quite well i also made it so that the classifier will - optimize for precision (not triggering a compaction prematurely) when context window is small - and gradually shift to optimize for recall (not missing an opportunity to compact) when context window fills up, because the cost of not compacting becomes higher, and at the end the agent will be forced to compact anyway it supports a "hint" mode (just give you a hint and it's up to you to run /compact) vs "auto" mode which runs compaction whenever Jev says it's safe to do so if you have Jev and want to put your compaction on autopilot, try this out and let me know how it goes! support for more harness is coming soon as well

Sep 18, 2026 · 595 likesOpen on X

Kun Chen’s plugin for Claude and Pi answers the question people keep asking: when should I compact. Jev judges whether the session is at a task boundary where compaction is safe. He built a private eval set from 40 real sessions with hand-labelled safe and unsafe checkpoints, then tuned the question against it. The classifier favours precision while the context window is small, and shifts towards recall as it fills up.

Open the source

More like this