Hook-based token compressor for Claude Code, Copilot CLI, OpenCode, Gemini CLI, and Codex CLI. Compresses bash output up to 95%, provides session memory via MCP tools, and manages token optimization across multiple AI CLI hosts.
Squeez is a specialized token-compression analytics and metadata server with 17 read-only tools. All tools have descriptions (50-500 chars, baseline 194) and visible schemas with typed parameters. Naming is verb-noun style and consistent (squeez_* prefix). However, critical gaps emerge: (1) No error handling guidance, tools lack recovery hints or actionable errors; (2) Output schemas are undocumented, the rubric requires documented return types for A+ (100% compliance), but squeez provides none; (3) Parameter descriptions are minimal, most are single-sentence stubs like 'max files to return (default 20)' with no format/range guidance; (4) No tool annotations (readOnlyHint explicitly present and correct, but destructiveHint/idempotentHint absent); (5) Security headers undocumented (no scope declarations, no audit trail guidance). The tools themselves are functionally sound for their intended domain (session introspection), but fall short of production-grade composition patterns. Average per-tool score: 62.
Sub-agent usage tracking: number of Agent/Task tool spawns this session, estimated hidden context cost (~200K tokens per spawn), and per-call breakdown.
Current context pressure: budget used %, calls remaining, tokens_saved this session, and an actionable recommendation (ok / compact_soon / use_state_first). Call this to decide whether to /compact or save state and /clear.
Enterprise-transport mode (Bedrock/Vertex/OTEL) plus USD-saved estimate for the current session at Anthropic's public Sonnet 4.6 rate. Use this to quantify the dollar value of compression on usage-based enterprise workspaces.
Show prior sessions where a given file path was touched or committed. Returns session dates and token savings.
Per-handler cumulative compression stats across sessions: calls, in/out tokens, savings %. Flags under-performers (savings <10%) and over-performers (≥90%) when a handler has ≥5 calls. Use to spot handlers that warrant tuning or broader matching.
Output schemas not documented in tool definitions. Rubric baseline: 100% of A+ tools have documented return types. No visible schema declaration for response structures (e.g., what fields does squeez_session_summary return? what types?). LLMs cannot plan downstream operations without knowing response shape.
No error handling guidance. Tools lack recovery hints, when a call fails (e.g., invalid date format in squeez_session_detail, missing key in squeez_retrieve), no actionable error message guides the LLM. Rubric pattern: 'Error responses must tell the LLM what to do next: try search_users() with a partial name.'
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 64 | 2026-07-28+ | v2 |
Read the most recent finalized prior-session summaries from memory/summaries.jsonl. Includes files touched, files committed, test results, errors resolved, and git activity per session.
Returns the squeez memory protocol + output marker spec. Read this once per session to understand the headers and `[squeez: ...]` markers in compressed output.
List the most recent bash invocations squeez has compressed in this session, with output hash and length. Use to check whether you've already run a similar command before re-running it.
Expand a compressed output back to its verbatim original. When squeez compresses a large bash output it prints a marker like `[squeez: full N-line output stored — call squeez_retrieve with key=\"<id>\" to expand]`. Pass that id as `key` to get the full original text back. Optionally pass `start_line`/`count` to get a slice instead of the whole blob (e.g. to page through a large stashed output). Use only when the compressed view dropped something you actually need.
Search prior session summaries for a keyword (case-insensitive substring). Returns sessions where the query appears in files, errors, git events, or structured summary fields. Scans up to 200 sessions.
List error snippets (first 128 chars) for unique errors seen this session. More informative than squeez_seen_errors which returns only fingerprints.
List the count of distinct error fingerprints squeez has observed this session. Errors are normalized (digits, paths, hex collapsed) so reruns don't double-count.
List the files this session has touched via Read or via paths extracted from bash output, with the call number where each was last seen.
Return a structured view of a specific prior session by date (YYYY-MM-DD). Shows total events, files, errors, git events, and test results. Truncated to 2 KB if large.
Session efficiency scoring: compression ratio, tool choice efficiency (direct vs agent), context reuse rate, budget conservation. Scores in basis points (0-10000 = 0-100%).
Compression statistics for the current session: exact/fuzzy dedup hits, summarize triggers, intensity ultra calls, and token savings by handler category.
Token accounting and call counts for the current session: tokens by tool category (Bash/Read/Other), total calls, files seen, errors seen, git refs seen.
Parameter descriptions are minimal stubs. Examples: squeez_recent_calls: 'max calls to return (default 10)' (29 chars; baseline param description 72 chars). No format guidance (is n an integer 1 - 1000?), no dependency hints, no rationale. Descriptions must explain WHAT the param controls and WHY it matters.
No pagination or limits documented in numeric parameter descriptions. Param 'n' (squeez_recent_calls) and 'limit' (squeez_seen_files, etc.) lack explicit bounds. Rubric: 'Specify minimum and maximum for numeric parameters (e.g. page_size 1 - 100, days 1 - 365). Unbounded numbers let LLMs pass absurd values.'
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) visible in source. All tools are read-only and idempotent, annotations would reinforce safety for LLMs and enable optimizations. Spec 2026-07-28 supports tool.annotations.
No scope declarations or security documentation. Rubric: 'Each tool should declare what permissions it requires (e.g. read:email, write:calendar).' Squeez tools lack audit trail guidance and permission hints, important for least-privilege agent configurations.
squeez_retrieve parameter 'start_line' and 'count' lack type and range documentation. Descriptions say 'optional, default 0' and 'optional, default all', vague. Should clarify: 'integer, 0 - N where N is file length; omit for all lines.'
squeez_session_detail expects date in YYYY-MM-DD format but no regex or validation rule is visible in schema. Description states format but LLMs often deviate (2024/01/15, Jan 15 2024, etc.). Should use JSON Schema format:'date' or pattern constraint.