Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 10 Oct 13:42
· 47 commits to main since this release

sqz 2.0.0 is a security and correctness release. Upgrade if you use sqz's Claude Code, Copilot CLI, Cursor or OpenCode hook: up to 1.9.0 these hooks answered every rewrite with an approval, so a rewritten command could run without the approval prompt your settings would have shown. In 2.0.0 the hooks leave that decision to the client. It is a major version because sqz-engine's public API changed (CollapseArraysConfig has a new public field, max_chars, which breaks code that builds it with a struct literal, and process_hook_cursor now always returns Err) and some CLI behaviour changed, such as sqz uninstall and sqz reset now refusing to run without --yes when stdin is not a terminal.

Upgrade

Install 2.0.0 the way you installed sqz:

# Cargo
cargo install sqz-cli sqz-mcp

# Homebrew
brew upgrade ojuschugh1/sqz/sqz

# npm
npm install -g sqz-cli

# PyPI
pipx reinstall sqz

# Install script, macOS and Linux
curl -fsSL https://raw.githubusercontent.com/ojuschugh1/sqz/main/install.sh | sh

# Install script, Windows (PowerShell)
irm https://raw.githubusercontent.com/ojuschugh1/sqz/main/install.ps1 | iex

Then run sqz doctor --fix, after upgrading and never before, since the repairs come from the 2.0.0 doctor. sqz doctor --fix and sqz uninstall treat the current directory as the project and can delete files there that hold only sqz content, so run them from the directory you mean.

sqz doctor --fix

If doctor prints <file> runs <path>, not this sqz binary, that hook still runs the other copy, so upgrade that copy too. Then restart or reconnect your MCP clients so they start the new sqz-mcp.

Changelog

Security

  • sqz no longer approves commands on your behalf. The Claude Code hook returned permissionDecision: "allow" with every rewrite, and in Claude Code an allow skips the permission prompt, so a command like git push --force or rm -rf build ran without the prompt your settings would have shown (deny and ask rules still applied). Copilot CLI 1.0.66 and later treat its allow the same way. The Claude Code and Copilot CLI hooks now return only the rewritten input and leave the decision to the client. Checked against Claude Code 2.1.286: a command that needed approval before still needs it after the rewrite, and one your rules allow still runs without a prompt.
  • sqz hook cursor and sqz hook opencode no longer approve commands. From 0.7.0 through 1.9.0 the Cursor hook answered every rewrite with "permission": "allow", which lets Cursor run the command without its own approval, and from 0.6.0 through 1.9.0 the OpenCode hook answered with "decision": "approve". sqz init 0.4.0 through 0.7.0 wrote .cursor/hooks.json running <sqz path> hook cursor (0.4.0 to 0.6.0 in Claude Code's hook format), and later versions left the file in place, so in a project set up with 0.7.0 every command the hook rewrote was approved. Cursor reads any answer to a permission hook as a decision and takes a new command only together with one, so sqz hook cursor now prints nothing, writes one line to stderr and exits 1, which Cursor treats as a failed hook: its normal approval applies and the command runs as written, uncompressed. sqz doctor reports such a hook in .cursor/hooks.json or ~/.cursor/hooks.json, and sqz doctor --fix and sqz uninstall remove it, keeping any other hooks and deleting the file when nothing else is left. The OpenCode hook now returns only the rewritten command; sqz init has never installed it, since OpenCode gets the plugin.

Added

  • Claude Code commands keep your permission rules when rewritten. Claude Code checks its rules against the rewritten command and treats a grouped { ...; } | sqz command as too complex to match any of them, so the hook now gives each command its own pipe instead: set -o pipefail; cd sub && cargo test 2>&1 | sqz compress --cmd 'cargo test'. pipefail keeps each command's exit status and the &&/|| logic, and cd, export and source stay outside the pipes, so lists that change shell state are compressed too. sqz init adds two allow rules for the parts the rewrite adds, Bash(set -o pipefail) and Bash(sqz compress --cmd *); neither runs anything. Until they are there the hook leaves commands alone, and sqz doctor flags an older install (--fix adds them and keeps the hook's sqz binary while it resolves, a bare sqz on PATH included). Pipelines, loops and heredocs are left as written, except in bypass mode where nothing is checked. A list is also left as written, in every mode, when one of its piped commands could stop the shell on a failed expansion (${DEST:?}, $((1/0)), and unless $SHELL is bash an unquoted glob that matches nothing, =cmd or ~user) and another command follows after ;, a newline or ||: piped on its own the failing command would stop only its pipe, and the rest would run. && is fine, since pipefail stops the list there. On 12,676 real agent commands, 56.3% are rewritten in default mode with zsh as $SHELL (56.4% with bash; 1.9.0 rewrote 26.7%, and approved all of them) and 95.4% in bypass mode; 4,261 of the rest contain a pipe, where the agent is usually filtering the output already.
  • Claude Code PostToolUse hook. When a command the PreToolUse hook left alone exits 0, sqz hook claude-post compresses its stdout and stderr in place through updatedToolOutput, which keeps the Bash result's shape. Output Claude Code has already cut to a preview (BASH_MAX_OUTPUT_LENGTH, 30,000 characters by default), images and interrupted commands are left as they are. It always answers with the compressed text, never a §ref to earlier output, so a second copy of the hook can't point the model at output it never saw; the original is still stored for sqz expand. A repeated output shows in sqz stats and sqz gain as an ordinary compression, not a dedup hit or a quick re-run.
  • sqz-mcp --version. It printed nothing and started the stdio server, which then waited on stdin; it now prints sqz-mcp <version> and exits, like --help. Flags it doesn't know still start the server, as before. 1.9.0 and earlier started the server.

Changed

  • sqz adds fewer tokens to every model request. The sqz-mcp tool and parameter descriptions went from 4,907 to 1,871 characters, so tools/list dropped from 8,705 to 5,779 bytes (about 2,177 to 1,445 tokens by doctor's estimate), and §ref:HASH§ is explained once, on expand. The guidance sqz init writes for Kiro, Codex, Zed, Cursor, Windsurf and Cline is one shared text of under 1 KB; the files it goes into went from 13,337 to 5,282 bytes together. It keeps the pipe with the absolute binary path, what not to pipe, which MCP tools to prefer, how to read and expand §ref tokens and «A1» symbols, and the opt-out variables, and drops the rest, including every percentage. Codex and Zed share one AGENTS.md block (sqz-guidance) instead of writing one each.

  • Older sqz guidance is upgraded in place. sqz doctor flags AGENTS.md and .rules blocks, Kiro steering, and Cursor, Windsurf and Cline rules written by an older sqz; --fix rewrites them keeping the binary path they point at, and sqz init rewrites them with its own. The old sqz-agents-guidance and sqz-zed-guidance blocks become one block where the first of them was. Text outside the sqz markers stays as it is, but anything you added inside an old block, or inside the text an older sqz wrote at the top of .clinerules, is replaced, so move it below first. Cline's rules are now the same marked block, so your own rules in .clinerules survive later upgrades and sqz uninstall, and the old text in .windsurfrules is removed without the rules that follow it. Files sqz did not write are never touched, and a current copy saved with CRLF line endings counts as current. Doctor's overhead report counts the shared block once, on a line for each file Codex and Zed read.

  • sqz doctor shows the integration tier of every client. Transparent clients (Claude Code, Copilot CLI, Gemini CLI, OpenCode) have a hook that routes shell commands through sqz on its own. Advisory clients (Kiro, Cursor, Windsurf, Cline, Codex, Zed) can't let sqz rewrite tool calls, so sqz saves tokens there only when the agent chooses to pipe output through sqz compress or call the sqz MCP tools; their built-in shell and file tools bypass it. Before this, doctor showed both as "configured", which is how "sqz saves nothing in my Kiro sessions" looked like a bug instead of a limit.

  • Doctor reports what sqz adds to every model request: the size of the installed sqz-mcp tool definitions and every copy of sqz guidance Kiro loads (user and project steering, AGENTS.md blocks).

  • sqz init no longer writes project-level Kiro steering when the user-level copy exists. Kiro applies ~/.kiro/steering to every workspace, so the project copy was the same guidance sent twice.

  • The MCP read tools cap what they return. sqz_read_file returned up to 4 MB (about a million tokens) by default; it now stops at 256 KB, cuts on a line boundary, and puts continue_with_offset in the header. The cap applies after offset/limit, so a ranged read deep into a big file still works, and files over 64 MB are refused instead of loaded. sqz_grep clips a match line over 400 chars to a window around the hit (one minified bundle used to return its whole line) and stops at 100 KB of output. sqz_list_dir stops at 1000 entries. Every cap is a tool parameter (max_bytes, max_line_chars, max_entries; 0 lifts it) and the header says when one cut the output.

  • sqz discover --replay estimates what sqz can actually reach. 1.9.0 ran every tool output through the full lossy pipeline, so web fetches (which sqz can't intercept) and built-in file reads (which the sqz read tools return losslessly) made up almost all of its estimate, including the README example. Replay now handles each output the way sqz could have reached it on that client: shell output through the hook path (on Claude Code, split into commands the hooks compress and ones they skip), file reads dedup-only, other MCP servers exactly what sqz-mcp proxy does, and web fetches, edits and sub-agent results counted as out of reach. The report gives two totals, saved with no help from the agent and saved if the agent uses every route, and says how much of the second is the proxy's lossy first pass. Kiro IDE sessions (~/.kiro/sessions/<workspace>/<session>/, sub-agent runs included) are new, and Kiro CLI shell and MCP results, which the 1.9.0 parser skipped because they are JSON items, are read.

  • The shell hook rewrites pipes, lists, loops and heredocs. It skipped any command containing |, &&, ;, > or <<, which left 73% of one machine's 12,676 real agent commands uncompressed. A quote-aware scanner now pipes the whole command through sqz as one group (Gemini CLI, Copilot CLI, and Claude Code in bypass mode; other Claude Code sessions get the per-command form above), keeps a leading cd dir && outside it so the directory change sticks, and leaves alone anything that changes shell state (export, source, set, a later cd, a variable set in a loop or if body), backgrounds a job, follows output (tail -f, docker logs -f, kubectl get -w), runs a server (npm run dev, rails s, docker compose up without -d), already runs sqz (a Windows path to sqz.exe included) or nests more than 64 levels deep. It also leaves a command alone when the group could run different commands than the original: when a leading cd dir && is followed by ;, || or another line, all of which a failed cd would skip along with the group, and, with bash as $SHELL, when more lines follow one with an arithmetic expansion or a ${...} such as ${VAR:?} or ${VAR^^}, since bash goes on to the next line after some failed expansions. On those commands the share rewritten went from 26.7% to 94.9%, and every rewrite parses in bash and zsh wherever the original did. Lists and pipelines skip the per-command formatters, since their output is partial or comes from several commands. python and node running a script, -c code or -m module are rewritten too; bare REPLs, -i and dev servers still aren't.

  • sqz compress is faster on large and error-heavy output. The checks that make sure no error line is lost searched the whole output once per error line, so a 1 MB log where every line is an error took 1.5 s; they now find every line in one pass, and that log takes 0.38 s. The tokenizer also ran over the same text up to five times per call and now counts each text once. At 1 MB an app log went from 604 to 404 ms and a kubectl get table piped in from 580 to 401 ms. Output that now keeps all its data still costs more than in 1.9.0: 1 MB of JSON 378 to 490 ms, cargo test with failures 404 to 531 ms, and kubectl get through the shell hook 65 to 397 ms. Calls under 10 KB are unchanged at about 40-45 ms.

  • Safe mode is decided by structure, not by words. A whole output went to safe mode if it mentioned a panic, a password, an api key or legal text anywhere, so a git log whose commit messages mention a panic, a README with a password: &str example or an HTML page with a privacy policy footer was cut and never stored, and nothing dropped from it could be expanded. Safe mode now needs a trace header followed by frames (Rust, Python, JVM, JavaScript, Go), DDL at the start of a line, a PEM block, or a credential line with a real value; everything else gets the normal pipeline, stored and expandable. Python tracebacks now pass through whole like the others. Output that looks like it holds a secret is still never stored, on every path including the MCP compress tool.

  • The docs say what sqz measures and does. The integration tables list Cursor, Windsurf, Cline and Kiro as advisory instead of hooked, the benchmark tables, quality benchmark and white paper come from fresh runs, and the latency claim (p99 under 5 ms up to 100 KB, never measured) is replaced by measured numbers: about 40 ms per sqz compress call up to 10 KB, most of it process start and building the tokenizer, 76-86 ms at 100 KB and 330-525 ms at 1 MB, on an Apple M4 Pro.

  • The docs site, extension guides and npm README are corrected. Links on the docs site that led nowhere now resolve, the Chrome and Firefox guides describe the wasm-pack --target no-modules build that background.js loads (Firefox 140 or later), and the npm README lists the same clients and commands as the main one.

  • Large outputs can need more memory than in 1.9.0. Output that now keeps most of its data also feeds more text to the n-gram abbreviation pass. Piped into sqz compress without --cmd, a 10 MB cargo test log peaks at about 1.05 GB and an error-heavy log at 1.1 GB, against 353 and 731 MB in 1.9.0. With the command as the label, as the hooks pass it for a single command, the cargo test log peaks at 128 MB against 122 MB in 1.9.0, and the error log, labelled kubectl logs api, at 1.1 GB against 132 MB, since the 1.9.0 kubectl logs formatter cut it to 4 KB. SQZ_NO_ABBREV=1 brings the unlabelled cargo test run down to 250 MB and the labelled error log to 274 MB.

  • sqz init leaves Claude Code hooks to the user-level settings. When ~/.claude/settings.json already has the sqz hooks, sqz init at project scope no longer adds them to .claude/settings.local.json and says why. sqz doctor flags hooks installed at both scopes, and --fix removes the project copy, keeping its permissions; the file is deleted only if nothing else is left.

  • sqz doctor checks which sqz binary each hook runs. It reports hook and plugin files whose sqz binary no longer exists (Claude Code, Gemini CLI, Copilot CLI, OpenCode), and --fix points them at the running binary; it never writes a hook whose binary does not exist. It also notes hooks that run a different sqz binary than the one running doctor, so after an upgrade reinstall sqz first, then run sqz doctor --fix.

  • sqz uninstall and sqz reset need an answer. Without --yes, an empty answer counted as yes, so with stdin closed or piped from nothing they went ahead. When stdin is not a terminal and gives no answer they now stop with a message; y or yes on a pipe still works, and a terminal keeps the [Y/n] default. 1.9.0 and earlier went ahead.

Fixed

  • Gemini CLI commands kept only their command argument. Gemini's scheduler replaces a call's arguments with the hook's tool_input rather than merging it, so a rewritten command lost dir_path and ran in the project root. The hook now sends every original argument.
  • A command's own stderr redirect lost to the hook's. The one-line rewrite put 2>&1 after the command, so cargo build 2> errors.log sent its errors into the pipe and left errors.log empty, and 2>/dev/null stopped hiding anything. The redirect now sits on the group, where the command's own wins.
  • sqz uninstall deleted a project's whole .claude/settings.local.json. Claude Code saves your "don't ask again" answers in that file, so they went too. It now removes only sqz's hooks and rules, and the file only if nothing else is left.
  • A trailing # comment broke the rewritten command. The comment ran on over the closing } of the group, so the shell hit end of file instead of running the command.
  • Background tool calls are no longer piped through sqz. Claude Code's run_in_background, Gemini's is_background and async calls stream their output while they run; through sqz nothing showed until the command exited, so a server started in the background looked dead.
  • sqz compress passes binary output through. Input that wasn't UTF-8 made it print a read error and exit 1, losing the output. It now writes the bytes back unchanged and exits with the command's status.
  • The OpenCode plugin keeps the command's exit status. Its rewrite, cmd 2>&1 | sqz compress, exits with sqz's status, so a failing command reported success. Outside Windows it now uses the exit-status trailer the other hooks use; Windows keeps the old form because PowerShell and cmd.exe can't run it.
  • sqz_list_dir listed two levels by default. Its schema says max_depth 1 means the immediate children; it now does.
  • The compress MCP tool cut its input to 500 characters. It compressed the serialized {"text": …} request instead of the text, so the pipeline saw one long JSON string and returned its first 500 characters as TOON:{text:"…"}. It now compresses the text field.
  • Entropy truncation no longer drops error lines. A log without blank lines is scored in 10-line windows, and a window holding an ERROR line could fall below the median entropy and be dropped with the routine ones. A segment that mentions an error, panic, traceback, failure or exception is now always kept.
  • sqz-mcp proxy says how to recover every lossy result. On first pass the pipeline can cut long JSON strings and large arrays, but only entropy-truncated results carried the sqz_expand hint, so an agent shown ... and 5 more items had no ref to ask for. Every first-pass compression now ends with the hint, and the net-win gate counts it.
  • JSON output keeps every record and field. Arrays over five elements were cut to five unless every element had the same keys, so a mixed search result (issues next to pull requests, Slack messages with and without threads) showed half its entries, and arrays that did share keys became a text table that printed nested objects as {6 keys} (every Jira summary and status) and cut strings at 50 characters. JSON projection stripped any key starting with _, debug, internal, trace or x_ (an Elasticsearch hit's _source, HAL's _embedded, a traceback), summarized anything five levels down (Notion page titles), dropped cursor and _links (the next page), and kept one timestamp per day, so closed_at went when an issue closed the day it opened. Arrays are now cut only past 32,000 characters of compact JSON (max_chars in a preset's collapse_arrays; 0 restores the count-only cap), projection removes only __v, etag and request or correlation ids, and an array of objects is written as a lossless TOON table: one header row of keys, one line per object, an empty cell for a missing key. On seven MCP payloads (GitHub, Jira, Notion, Elasticsearch, MongoDB, Slack) the proxy now keeps every id and title, against about half before, and saves 36% instead of 67%; most of the 67% was the dropped data. The proxy and the compress MCP tool also get the verifier's safe-mode fallback that sqz compress already had. The browser extension's WASM source has the same array fix; its bundled build predates it.
  • TOON keeps non-ASCII text as-is. é was written as \u00e9 and an emoji as a 12-character surrogate pair, which costs more tokens than the character itself. Control characters are still escaped.
  • Failed commands no longer come back as "ok". Several per-command formatters answered "ok" whenever they didn't find their success line, so a failed npm install (ERESOLVE) or pip install showed the agent "ok", git push rejected or without an upstream showed "ok" or "ok ! [rejected]", a git pull that stopped on a merge conflict showed "ok", kubectl apply reduced its output to "applied: 1 configured" and dropped the Error from server line, and gradle, dotnet and xcodebuild fell back to the last line of the output. Every formatter result is now checked: if a line that reports a failure (error:, fatal:, npm error, Error from server, CONFLICT, panicked at, ! [rejected] and similar, as whole words) is missing, the formatter isn't used and the output goes through the generic pipeline, which keeps error lines. Lines that only restate the failure (Build FAILED., could not compile) may go when the output still says it failed. Push and pull now drop only transfer progress, so pull request links from remote: survive.
  • Formatters no longer replace the data an agent asked for with a summary. kubectl get -o json became List: 2500 items (showing 30) with no items, -o yaml lost its indentation, kubectl logs dropped the middle of long logs; gh pr view --json body,comments kept only number, title, state and author, and gh pr diff, gh pr view and gh run view were cut at 30 lines; an aws or gcloud object holding an array of more than 30 items became a one-line summary with none of them; ls showed five file names, find printed dir/ (40 files) without the names, and grep kept three matches per file. git log -p and --stat kept only commit subjects, git diff --stat and --name-only kept their first line, git show rev:path stripped the file's indentation, git branch showed three branches, and git diff dropped rename, mode and binary lines. terraform plan dropped every attribute change (# forces replacement included) and terraform apply kept only Apply complete!, losing the outputs. kubectl get and logs, gh, aws, gcloud, ls and find now go through the generic pipeline; grep output is written in ripgrep's heading layout, each path once with every match under it; terraform drops only refresh and progress lines; git log keeps commit bodies and passes anything else through; curl drops only its progress meter, not blank lines or lines starting with %; tree keeps every entry outside node_modules-style directories.
  • Lists under 16,000 characters are no longer entropy-truncated. Entropy truncation drops the segments below the median, about half of any long output, so 60 grep matches came back as 30 and a find of 80 files as 40. Output where most lines are records (path:line: matches, bare paths, ls -l entries, git log --oneline, aligned tables) keeps every line up to that size.
  • Prose pruning no longer removes words that carry meaning. The built-in trigram table pruned the only completion it knew for a pair, so "there are no failing tests" became "there are failing tests", "does not exist" became "does not", and "at the same time" became "at the time". Those entries are gone.
  • Formatter savings are judged in real tokens. The formatter path counted chars/4 while the pipeline counted BPE tokens, and collapsing column padding shrinks chars/4 a lot but tokens hardly at all, so whitespace-only reformatting passed the net-win gate and was logged as savings. Both paths now use the same token counter.
  • sqz doctor --fix repairs log rows written by the pre-1.8.0 token estimator. sqz-mcp before 1.8.0 counted a read tool's input with chars/4 and its output with the BPE tokenizer, so verbatim sqz_read_file / sqz_grep / sqz_list_dir results logged as larger than their input; on one machine this pushed the all-time total negative, which sqz stats rendered as "0 tokens saved". --fix now raises the input count to the real output count, recording those calls as saving nothing, instead of deleting them (the version of this fix that never shipped deleted the rows, which also dropped their real volume from the totals). The database is backed up first with VACUUM INTO, which includes writes still in the WAL.
  • Doctor and --fix handle stale and duplicate Kiro steering. Steering written by an older sqz is refreshed in place, keeping the binary path it points at; a project copy next to the user-level one is removed. Files without the sqz marker are never touched.
  • The shell block no longer overrides your own preexec or DEBUG trap. The zsh block defined a preexec() function and the bash block installed trap … DEBUG; both only exported a variable nothing read, and both replaced any hook of the same kind defined earlier in the rc file. sqz init and sqz doctor --fix rewrite the sqz block in place, touching only the lines between its markers.
  • Doctor no longer reports a missing shell block as lost savings. The block only defines the optional sqz_run helper and compresses nothing on its own.
  • test_init_exits_zero ran sqz init against the real HOME and this repository, which rewrote the developer's shell rc during cargo test. It now runs in a throwaway HOME and project.
  • The same input gives the same output. The §dict§ header listed equal-length patterns in hash-map order, and abbreviations with tied savings were picked and numbered («A1», «A2») in hash-map order, so the same output could come back different from one run to the next. Ties are now broken on the text itself.
  • The opt-out examples in the guidance never reached sqz. They put the variable before the first command, SQZ_NO_DEDUP=1 git log | sqz compress, which sets it for git log only. The guidance and the CLAUDE.md block now put it right before sqz compress.
  • Stack traces, migrations and keys come through whole. sqz routes them to safe mode and said they pass through unchanged, but past about 500 characters the pipeline still cut them, and since safe-mode output is never stored the cut lines could not be expanded: in 1.9.0 a 40-frame Rust panic lost 40 lines, a SQL migration 26, and a key file its -----END RSA PRIVATE KEY----- line. The per-command formatters ran before the check, so ./gradlew test turned a 22-line JUnit trace into 81 bytes and a build-script panic under cargo build lost 42 of its 55 lines. Safe-mode output now comes back unchanged apart from ANSI codes, and a formatter's summary is used only when every line of each paragraph holding a trace, migration, key or credential line is still in it.
  • Counts are exact after repeated lines are merged. Ten identical lines came back as one line marked [×3], a folded diff reported 11 unchanged lines for 18, and cargo build after downloading crates reported ok (5 crates compiled) for 30, because the step that merges identical lines ran first. The same step shortened pretty-printed JSON arrays ([0,0,0,0,0,0,1] came back as [0,0,0,1] in safe mode). Counts now come from the original lines, and that step leaves JSON and diffs alone.
  • sqz discover no longer prints reduction figures nobody measured. Its suggestions gave a reduction range per command, none of them measured, including kubectl get, which no longer has a formatter. It now names the commands without numbers.
  • The exit status survives an expansion error. A rewritten { cmd; printf trailer; } | sqz printed no trailer when cmd stopped the shell on an expansion error, such as ${X:?}, a zsh =cmd that isn't found or a zsh for loop over a glob that matches nothing, so sqz exited 0 and the agent saw success. The command now runs in a subshell inside the group, so the trailer always reports its status. Gemini CLI, Copilot CLI, Windsurf, the OpenCode plugin and Claude Code in bypass mode use this form; it shipped for single commands in 1.6.1 through 1.9.0.
  • Negative and wide exit codes in the trailer. PowerShell reports a crashed native command as a negative $LASTEXITCODE such as -1073741819, and the trailer parser took only digits, so the marker stayed in the output and sqz exited 0; a code of 256 also came out as 0. sqz now exits with the low byte on Unix (1 when that byte is 0) and the full code on Windows. Shipped in 1.6.1 through 1.9.0.
  • Copilot CLI's toolArgs as a JSON string. GitHub documents toolArgs as a string of JSON, and the hook read only an object, so it rewrote nothing for that form. It now parses the string and still answers with a modifiedArgs object. Shipped in 1.5.0 through 1.9.0.
  • sqz hook opencode keeps the command's exit status. It piped the command straight into sqz, so a failing command reported success. Outside Windows it now uses the same trailer as the other hooks, as the OpenCode plugin already does. Shipped in 0.6.0 through 1.9.0.
  • Large non-ASCII output no longer crashes sqz compress. The verifier cut its scan at byte 1,048,576, and when that byte fell inside a multibyte character sqz panicked and the command's whole output was lost. It now cuts on a character boundary. 1.9.0 had the same bug.
  • git log and git show no longer crash on a non-ASCII commit line. Their formatters cut the hash by bytes. 1.9.0 had the same bug.
  • Long runs of one character no longer stall or crash token counting. tiktoken-rs is quadratic on a long run of one character class and overflows its stack at about 1 MiB, so 256 KB of = took about 14 s and 1 MiB crashed sqz on every path. Runs over 2,048 bytes are now counted in slices, which can be off by about 1% plus 4 tokens, and counts for other text are unchanged. 1.9.0 had the same problem.
  • A panic during compression no longer loses the output. sqz compress prints its input unchanged, keeps the command's exit status and prints one line on stderr, and sqz hook claude-post leaves the result as it was. With RUST_BACKTRACE set (and not 0), the stderr line names the file, line and column of the panic. In 1.9.0 and earlier a panic lost the output.
  • Token pruning no longer rewrites whole lines. Once it removed one filler word anywhere, it rebuilt every prose-looking line with single spaces. That collapsed indentation in unlabeled diffs and markdown, turned CRLF into LF and dropped words from error lines. It now rewrites only lines that lose a word, keeps their spacing, and leaves diff lines, indented lines, lines starting with - and error lines alone. 1.9.0 had the same bug.
  • Colored traces, DDL, PEM blocks and credential lines are protected like plain ones. The router read raw lines, so ANSI color codes hid them: a colored 40-frame backtrace kept 50 of 83 lines and was cached. Routing, never-store and protected-line checks now strip ANSI first. 1.9.0 had the same bug.
  • sqz stats counts what was printed. The stats line and the session database logged the compressed size from before the abbreviation legend and expand hint were added, so savings were overstated by a median of 19 tokens per affected command. 1.9.0 had the same bug.
  • sqz compress --cmd -j works. A label starting with - was parsed as a flag, so sqz exited 2 with no output. 1.9.0 had the same bug.
  • A panic in one request no longer stops sqz-mcp. A panic while handling a request ended the server, and in sqz-mcp proxy it left a lock poisoned, so the next message ended the proxy too; the tokenizer overflowing its stack on a long run of one character was one way to get there. Each request is now caught: compress returns its input unchanged, other tools answer with JSON-RPC error -32603, the proxy passes the upstream result on as it came, and the next request is served as usual. 1.9.0 had the same crash.
  • A line that is not UTF-8 no longer ends an MCP session. One invalid byte made sqz-mcp exit. In sqz-mcp proxy a bad line from the client ended the proxy without an answer, and one from the upstream lost that response and every later one. The server now answers such a line with -32700 and a null id and keeps reading; the proxy forwards it with the bad bytes replaced. 1.9.0 had the same bug.
  • sqz-mcp answers ping. MCP expects an empty result; it returned -32601 method not found. 1.9.0 had the same bug.
  • sqz-mcp proxy stops an upstream that ignores end of input. After the client closed stdin, the proxy waited for the upstream to close its stdout, so an upstream that kept running kept the proxy running, and a later SIGTERM to the proxy left it orphaned. The proxy now closes the upstream's stdin, waits up to 2.5 seconds for it to exit, then kills it and waits up to another 2.5 seconds while it finishes passing on a result it had already read. A response the upstream had not sent by then is lost; MCP clients keep stdin open while they wait, so this mostly affects scripted one-shot use. A SIGTERM to the proxy itself still leaves such an upstream running. 1.9.0 had the same bug.
  • Deltas number lines from 1 and account for every line. The position of removed lines was 0-based, and the unchanged lines next to each change were neither shown nor counted. A delta now shows one unchanged line on each side of a change, and its skip counts add up to the whole file. This applies to every delta sqz-mcp returns: sqz_read_file, sqz_list_dir, sqz_grep, compress and the proxy. The context lines make a delta longer, so a re-read with edits spread through the file now comes back in full. 1.9.0 had the same bug.
  • No reference where it costs more than the content. Empty and tiny results (13 tokens or fewer, such as an empty file or a search with no matches) came back as a 13-token §ref:HASH§, and a ranged sqz_read_file of an unchanged file could come back as a delta against the previous range. Both are now sent in full and still stored, so expand and sqz_recall find them. A ranged re-read of a file read in full is still a line-range reference. 1.9.0 had the same bug.
  • The compress tool says how to get dropped segments back. When it dropped low-information segments from text it stores, nothing in the output said how to recover them. The output now ends with [full output: call expand with prefix "<16 hex>"], and the tool's sqz:transforms list names the step. 1.9.0 gave no hint either.
  • sqz-mcp proxy --no-cache no longer offers sqz_expand. Nothing is stored with --no-cache, so every call to it failed. The tool is left out, and the instructions note no longer mentions §ref:HASH§. 1.9.0 had the same bug.
  • sqz uninstall no longer deletes a .gemini/settings.json sqz didn't write. It removes only sqz's hook and deletes the file only when nothing else is left. 1.9.0 and earlier deleted the whole file.
  • sqz init adds its Gemini CLI hook to an existing .gemini/settings.json. It skipped the file when it existed, and doctor's suggested fix then had nothing to do. A file with comments, or one that doesn't parse, is left alone, and sqz init and sqz doctor give the entry to add by hand. 1.9.0 and earlier skipped the file silently.
  • User hooks that look like sqz's survive. sqz recognised its own Claude Code hooks by substring (resume, hook precompact, hook claude), so sqz init, sqz doctor --fix and sqz uninstall deleted user hooks such as /usr/local/bin/on-resume.sh or ~/bin/save-notes --hook precompact, and replaced ones that wrap sqz, such as /usr/bin/time /opt/sqz hook claude. An entry is now sqz's only when its command is sqz or sqz.exe, bare or as a path, quoted or not, followed by exactly the arguments sqz writes. Since an unquoted path may contain spaces, a wrapper that runs sqz by a relative path, such as /usr/bin/time ./sqz hook claude, still counts as sqz's. 1.9.0 and earlier deleted and replaced them.
  • sqz uninstall removes the CLAUDE.md guidance block and the mcpServers.sqz entry in ~/.claude.json. 1.9.0 and earlier left both.
  • An outdated CLAUDE.md guidance block is replaced. Once written, the block was never refreshed, so it still described the 1.9.0 rewrite and the SQZ_NO_DEDUP=1 git log | sqz compress placement that never reached sqz. sqz doctor now reports an old block, and sqz init and sqz doctor --fix replace it in place, keeping the binary path it names while that resolves and every byte outside the markers; a current block saved with CRLF line endings counts as current. 1.9.0 and earlier never refreshed it.
  • Removing the shell rc block keeps every other byte. Uninstall collapsed every run of blank lines in the whole file and dropped its final newline. It now removes exactly the sqz block and the blank line install added before it. 1.9.0 and earlier had the same bug.
  • JSON configs sqz edits keep their final newline and file mode. 1.9.0 and earlier dropped the final newline, gave opencode.json one it didn't have, and left Claude Code settings at 0600. Key order still changes.
  • Hook files older sqz versions wrote are cleaned up. sqz doctor reports them, and sqz doctor --fix and sqz uninstall remove sqz's entries from .windsurf/hooks.json, .cline/hooks.json and Cursor's hooks.json and the old .clinerules/hooks/PreToolUse script, deleting a file when nothing else is left in it. Uninstall ends by listing the files it keeps, such as the preset and shell completions. 1.9.0 and earlier left them all.
  • The uninstall plan lists only files that hold sqz entries, so a second sqz uninstall says there is nothing to uninstall; 1.9.0 and earlier listed every existing config file. The plan also names the user-level Kiro steering and ~/.kiro/settings/mcp.json (when it has mcpServers.sqz), which uninstall changed without listing them, and when they are the only sqz files left uninstall removes them instead of saying there is nothing to uninstall.
  • cargo test no longer writes to your home directory. Several tests wrote the Copilot CLI hook, the Codex and Zed configs and the session database under the real home directory; they now use temporary directories. In 1.9.0, test_reinit_is_idempotent_at_project_scope already wrote the Copilot CLI hook there whenever ~/.copilot existed, pointing it at /usr/bin/sqz.
  • pipx install sqz fetches the right release. The PyPI wrapper downloaded the 0.1.0 binaries whatever its own version, asked for a .tar.gz on Windows, where releases ship a .zip, and used a type hint that fails on Python 3.8. It now takes its version from the installed package and the archive each release target ships. 1.9.0 and earlier had all three bugs.
  • The npm package declares its licence as Elastic-2.0 and ships LICENSE. package.json said ELv2, which is not an SPDX id, and the publish jobs did not copy LICENSE into the package. 1.9.0 and earlier had both.
  • sqz proxy, its help and its guide say what it does. sqz --help called the command "[Coming soon]"; it now says the local endpoint compresses an OpenAI, Anthropic or Google AI request body and sends it back without forwarding it. When it started, the endpoint told you to set OPENAI_BASE_URL or ANTHROPIC_BASE_URL to its address, which hands your client the compressed request instead of a model response; it now says what it does and shows a curl example, and a body it cannot compress is reported as sent back rather than forwarded. The API proxy guide described forwarding, a proxy.toml sqz never reads and two options that do not exist, --upstream and --dry-run; it now describes the endpoint and its one option, --port. 1.9.0 and earlier had the same help text and, from 0.5.0, printed the base URL advice.

Full changelog: https://github.com/ojuschugh1/sqz/blob/main/CHANGELOG.md