GitHub · by Ghaleb Dweikat
winnow
A context sieve for Claude Code: Jev judges each tool result before it lands.

Ghaleb Dweikat’s hook splits every large Read, Bash or Grep result into blocks and asks Jev whether each one is needed. Blocks it is confident about are hidden behind a short stub with a key to restore them, so nothing is lost. A shadow mode logs what it would hide before you switch it on.
Results are split into roughly 25-line blocks and the judge is asked one question per block — is this block needed for the current task — with all of them going out in parallel. Blocks judged a confident no are replaced by a three-line stub naming what was hidden, a one-paragraph summary and a key that restores the full text on demand. Without a summarising model the middle line becomes a deterministic digest instead, so the agent still knows the shape of what it lost: for a search result, which files the hidden matches came from and how many each.
Two safety rules are built in and are not optional. If the judge thinks the output shows an error, nothing is hidden at all. If a block’s probability is merely uncertain — between the drop and keep thresholds — it is kept. Both thresholds are tunable; the default drop of 0.1 is the bin that came back clean on hand-labelled replay, and Ghaleb Dweikat says to raise it only with your own evidence.
The hook talks to a small resident server on loopback, started at session start, so a judged call costs about 16 ms plus the judge call rather than a Python startup every time. A second hook runs at prompt time and ranks the project’s memory files against your prompt, injecting the relevant ones so the agent reads what it needs without a round of Read calls. Winnow never judges its own files or commands, and it changes only what the agent sees: files on disk, the commands that ran and the transcript are untouched.
GhalebDweikat/winnow on GitHub
- Stars
- 110
- Forks
- 14
- Language
- Python
- Last push
- Oct 6, 2026
Repository created Sep 16, 2026. Counts read from the GitHub API on Oct 15, 2026, and they move daily — quote them with the date.


