Credentials. The setup stores API keys in ~/.winnow/env or in ~/.claude/settings.json, so those files must be kept private.
Who it is forA developer using Claude Code on a large repo whose sessions fill up with long file reads and command output.
The problemLarge tool results add many tokens to context, and most of the lines are not needed for the current task.
The outcomeLow-relevance blocks are replaced by a three-line stub with a summary and a key to restore the full text, and a [Winnow] line marks each rewrite.
What you need first
- Python 3.10+
- uv installed
- Claude Code 2.1.260 or newer with function hooks enabled (early access)
- A Jev key from TypeSafe, or an Anthropic API key for the adapter judge
- Git to clone the repo
Steps
- In ~/.claude/settings.json, add { "env": { "CLAUDE_CODE_ENABLE_FUNCTION_HOOKS": "1" } }.
- Clone the repo with
git clone https://github.com/GhalebDweikat/winnow.git, then runclaude plugin marketplace add ./winnowandclaude plugin install winnow@winnow. - Put TYPESAFE_API_KEY in ~/.winnow/env, or set WINNOW_JUDGE=adapter with ANTHROPIC_API_KEY to use the adapter.
- Run
uv run --project winnow/sidecar winnow doctorto check which keys were found and whether each backend starts. - Open a new Claude Code session and read a file longer than about 1,500 characters; a [Winnow] line in the result means it is working.
Prompt for your agent
Using the winnow repo at <repo path>, install it as a Claude Code plugin and run `uv run --project winnow/sidecar winnow doctor`. Report which judge backend initialized. Then read <target file> in a new session and confirm a [winnow] line appears in the result if the file is longer than 1,500 characters.
Caveat. Hidden blocks are judged by an early-access model or by Claude Haiku 4.5 through your Anthropic account, and Winnow changes only what Claude sees, not files on disk.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for GhalebDweikat/winnow and "Trim large Claude Code tool results before they fill context"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer