sqz
sqz is a Rust command-line tool that compresses tool output AI coding agents send into the model's context, such as build logs and repeated file reads, while leaving source code, stack traces and secrets untouched, and can restore any result exactly.
sqz sits between an AI coding agent and the tool output it would otherwise send into the model's context window unchanged. Per-command formatters keep the parts an agent acts on, such as a failing test's assertion or a file-and-line reference, and drop the rest; content the model has already seen returns as a short reference instead of being resent on every turn.
It works as a single native Rust binary with no LLM calls, running fully offline, and every compressed result can be recovered byte-for-byte with an expand command. It installs hooks, an MCP server and per-tool configuration for whichever coding agents it finds on a machine, and integrates with Claude Code, Cursor, Codex, Kiro, Zed and other MCP clients.
The project reports measured reductions of roughly a quarter of tokens on average across real sessions, with larger savings on content the model already has in context.