The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
sqz
Context compression for AI coding agents: compresses tool output before it enters the model, dedups repeats to 13-token refs. Claude Code, Cursor, Codex, Kiro, Zed, any MCP…
Install
npm install -g sqz-cliInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →███████╗ ██████╗ ███████╗ ██╔════╝██╔═══██╗╚══███╔╝ ███████╗██║ ██║ ███╔╝ ╚════██║██║▄▄ ██║ ███╔╝ ███████║╚██████╔╝███████╗ ╚══════╝ ╚══▀▀═╝ ╚══════╝
Pre-injection context compression and session deduplication for AI coding agents
<strong>Real session stats:</strong>
3,003 compressions ·
<strong>178,442 tokens saved</strong> ·
24.7% avg reduction · up to
<strong>92%</strong> on output the model already has
Docs · Install · How It Works · Supported Tools · MCP Proxy · Benchmark · Changelog · Discord
English | 简体中文 | 日本語 | 한국어 | Español | Português (Brasil)
AI coding agents spend most of their input tokens on tool output: build logs, test runs, git status, the same file read again after every edit. All of it goes into the context window raw, and it is re-sent on every turn after that.
sqz compresses tool output before it enters the context. Per-command formatters keep what an agent acts on (the failing test, the assertion, the file:line) and drop what it does not. Anything the model already has in context comes back as a short reference instead of the content. Source code passes through unchanged, and so do stack traces, migrations and credential lines.
cargo install sqz-cli sqz-mcp # or: brew install ojuschugh1/sqz/sqz · npm i -g sqz-cli · pipx install sqz
sqz init # hooks + MCP server + agent guidance for every client it finds
Real output from the release binary (assets/demo.tape). Regenerate with vhs assets/demo.tape.
Without sqz: With sqz:
cat auth.py (200 lines): 1,300 tokens 1,300 tokens (source is served in full)
cargo test (1 failure): 366 tokens 185 tokens (failure, assertion, file:line)
sed -n '41,80p' auth.py: 260 tokens 35 tokens (§ref:…:L41-80§ to the read above)
git status, unchanged: 166 tokens 37 tokens (§ref:…§)
───────────────────────────────────── ─────────────
Total: 2,092 tokens 1,557 tokens (26% saved, nothing dropped)
Single Rust binary, deterministic, no LLM calls, works offline. Every compressed result can be recovered byte-exact with sqz expand, except output that mentions credentials, a stack trace or a migration, which sqz never caches.
[!NOTE] Name disambiguation: this repo, ojuschugh1/sqz, is an independent project and is not affiliated with any other similarly named or working tool or other compression projects that shorten "squeeze". If you installed
sqz/sqz-cli/sqz-mcpfrom crates.io, npm, PyPI, or Homebrew, it comes from this repository.
Token Savings
24.7% average reduction across 3,003 real compressions · 13-token refs for output the model already has · 100% of agent-critical facts kept in the quality benchmark · 0% on source code, and on stack traces and credential lines
One developer's week, measured from actual sqz gain output:
Similar plugs
Reverse engineer anything with agents, from app behavior down to native binaries.
Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io