Back to browse
GitHub Repository
1 starsShell

Sift – save AI tokens in Codex/Claude by summarizing command output

by piotrwilczek·Apr 22, 2026·2 points·3 comments

AI Analysis

●●SolidSolve My ProblemNiche Gem

Nested agent summarization cuts token costs ~45% for command-heavy workflows.

Strengths
  • Targets specific pain point: verbose test/build output bloating agent context
  • Honest about limitations—doesn't guarantee correctness, workflow-dependent savings
  • Simple implementation with clear CLI options for Codex and Claude
Weaknesses
  • Only helps when commands produce large noisy logs, minimal benefit for short outputs
  • Summary may lose details that matter for debugging
Target Audience

Developers using AI coding agents like Codex or Claude Code

Similar To

Custom agent middleware · Token optimization scripts

Post Description

I made a small skill/script for agentic coding workflows:

https://github.com/panpeter/sift-skill

The idea is simple:

when a command like cargo test, pytest, npm test, or ./gradlew test prints a lot of output, that raw log often gets pulled into the context even though only a small part is actually useful.

Sift runs the command, captures the full output, and asks a nested cheaper agent call to return only a compact summary. The goal is to keep the main thread smaller and easier to work with.

In one command-heavy Codex workflow I used as a baseline, this looked like roughly ~45% lower total token cost. That number is an estimate, not a benchmark claim, and it will depend a lot on the workflow. It should help most when commands produce large noisy logs. It probably does very little for short commands.

Would be interested in how others handle this problem in Codex / Claude / other coding-agent setups.

Similar Projects

Developer Tools●●●Banger

I built Panda to get up to 99% token savings

BERT-based filtering cuts token bills 99% without changing your workflow.

Solve My ProblemBig Brain
AssafPetronio
441mo ago