GhalebDweikat/winnow on GitHub
- Stars
- 79
- Forks
- 7
- Language
- Python
- License
- MIT
- Last push
- 19 Sep 2026
Read from GitHub on . Counts change daily.
winnow is a Claude Code hook that judges every large Read, Bash or Grep result before it enters Claude’s context. A judge model answers one yes/no question per block, “is this block needed for the current task?”, and blocks it’s confident aren’t needed get replaced with a three-line stub: what was hidden, a one-paragraph summary, and a key that restores the full text on request. Nothing is deleted, it just stops costing tokens until asked for.
By default the judge is Jev, which answers a hundred such questions in one call in a few hundred milliseconds; a fallback adapter can answer the same questions by prompting Claude Haiku 4.5 instead, which works today but isn’t calibrated the way Jev’s probabilities are. Two safety rules apply regardless of which judge is used: a block is never hidden if the judge thinks it shows an error, and a block with a probability that falls in an uncertain middle band, between two tunable thresholds, is kept rather than guessed on. The default drop threshold of 0.1 comes from what tested clean on a hand-labeled replay set, and raising it is left to the user’s own evidence.
A small resident server, started once per session, keeps a judged call’s overhead to about 16 milliseconds plus the judge call itself, rather than paying a fresh process startup on every hook invocation.

