Drop stale tool output from long coding agent sessions
Have Jev judge which earlier tool results are still needed and drop the rest, so long agent sessions stay inside the context window.
Author's figure: Author's figure: about 1M tokens down to 86K (Tamara Tran). Reported by the builder, not measured by us.
The use case
Developers running long sessions in Claude Code, Codex or Pi hit context limits, and a written summary loses exact details. These plugins score each tool result in the context for whether the work in progress still depends on it and drop the stale ones, so what remains is kept word for word. Some split large file reads into blocks and keep only the relevant ones. Originals stay retrievable. The developer should watch for the agent losing a detail it needed and can turn pruning off for sensitive tasks such as migrations.
Example workflow
- Install a compaction or pruning plugin for Claude Code or Pi
- Set a size limit that triggers pruning
- Let Jev judge each tool result against the work in progress
- Keep originals retrievable on disk
- Review sessions where the agent lost context and adjust
Tools
- Jev (TypeSafe AI)
- Claude Code
- Codex CLI
Risks and guardrails
- Dropping a needed detail causes subtle mistakes
- Plugins can break with agent updates
- Context sent to an API may include secrets
Sources
Written by Agents Lookup. Credits and official pages for the tools this use case names:
- fast-jev-compaction by Tamara Tran on Made with Jev: madewithjev.com/builds/fast-jev-compaction
- fast-jev-compaction: original post or repo by Tamara Tran: github.com/tamaratran/fast-jev-compaction
- winnow by Ghaleb Dweikat on Made with Jev: madewithjev.com/builds/winnow
- winnow: original post or repo by Ghaleb Dweikat: github.com/GhalebDweikat/winnow
- pi-jev-compaction by Nour on Made with Jev: madewithjev.com/builds/pi-jev-compaction
- pi-jev-compaction: original post or repo by Nour: github.com/nourhelmi/pi-jev-compaction
- jev-pruner by Tamara Tran on Made with Jev: madewithjev.com/builds/jev-pruner
- jev-pruner: original post or repo by Tamara Tran: github.com/tamaratran/jev-pruner