Changelog
Distill release history — shipped versions, corrections, and new Claude Code integration points.
Changelog
This page summarises the published distill-mcp npm releases. The full commit-level history lives in CHANGELOG.md at the repository root; each release's PRD captures the story-by-story motivation.
v0.10.1 — 2026-04-22
Patch release. No contract change, no API change, no migration. Two bug fixes surfaced right after v0.10.0 shipped.
Fixes
code_execute— crash on code without areturnstatement. User code that only calledconsole.log(...)without returning a value crashed the tool:JSON.stringify(undefined)returnsundefined(not a string), which broke the downstreamcountTokenscall. A guard atsrc/sandbox/executor.ts:152-153now coerces theundefinedcase to an empty string before serialisation. Pure side-effect scripts work again.smart_file_read—async asyncin TypeScript skeletons. Theskeletonrenderer unconditionally prependedasyncto asynchronous functions without checking whether the captured signature already contained it, producing output likeasync async function fetchData(...). The render line atsrc/tools/smart-file-read.ts:395-414now tests for a pre-existing\basync\btoken before adding the modifier.
Tests and coverage
1,203 passing tests (1 skipped) across 46 files. mcp-server coverage: Lines 72.13% · Branches 58.62% · Functions 73.46% · Statements 71.32%. v0.9.2 floors remain respected with headroom.
v0.10.0 — 2026-04-22
Correctness + native-integration release. No change to the three tools' contracts (auto_optimize, smart_file_read, code_execute). No change to the sandbox, the AST parsers, or the compression algorithms. First release published to npm since v0.8.1 — it consolidates the previously-draft v0.9.1 and v0.9.2 work into one shipped version.
Documentation corrections
Every claim in CLAUDE.md is now pinned to a claude-code/<path>:<line> citation so re-verification against a moving upstream is a single grep.
- The MCP tool-result persistence threshold is 25 000 tokens (
DEFAULT_MAX_MCP_OUTPUT_TOKENS), not "50 000 chars". Thelength/4heuristic gate atmcpValidation.ts:151-163short-circuits at ~12 500 estimated tokens (≈ 50K chars). - The autocompact formula reserves
min(maxOutputTokens, 20_000)tokens — for Haiku (max_output = 4 096) that yields a trigger ~16K tokens higher than a hardcoded 20K would suggest. - A "Claude Code Mechanics — Verified Citations" appendix collects eleven mechanisms (alwaysLoad / searchHint / outputSchema / MCP persistence / autocompact /
structuredContentdrop / PreCompact hook / MCP prompts / custom agent loading /readOnlyHint/ MCP skills), each with a one-line re-verification script.
Code aligned with Claude Code
structuredContentis no longer emitted on the MCP wire. Claude Code parks it inmcpMeta, andmcpMetais explicitly excluded from the Anthropic-API blocks — the model never saw the field.- The
searchHintsmap inserver.tsis removed. The hint is rendered only for deferred tools via ToolSearch, and Distill's three tools declarealwaysLoad: true— the hint was unreachable by construction. annotations.readOnlyHint: trueis now declared onsmart_file_readandauto_optimize. Claude Code maps that hint toisConcurrencySafe(), enabling parallel dispatch alongside other read-only tools on multi-tool turns.
PreCompact hook (opt-in)
[DISTILL:COMPRESSED ratio=X.XX method=<name>]marker contract. Opt-in envelope enabled viaDISTILL_COMPRESSED_MARKERS=1. Thresholds:auto_optimizesavings ≥ 30%;smart_file_read< 50% of source size inskeleton/extract/searchmodes;code_execute'sctx.compress.*helpers under the same rule. Collision handled via[DISTILL-USER-TEXT:COMPRESSED …]escape tokens.packages/mcp-server/scripts/precompact-hook.sh— shipped POSIX hook that emits the "preserve verbatim" instruction Claude Code merges intonewCustomInstructions. Exits 0 on every input shape (malformed JSON, unexpected events) so it can never block compaction.distill-mcp setup --install-precompact-hook— idempotent, atomic (tempfile + rename), with--dry-run,--uninstall-precompact-hook, and--user-dir=<path>for tests. Aborts cleanly on a malformed~/.claude/settings.jsonwith a line/column pointer.
MCP slash commands
Three prompts registered via prompts/list, available as zero-argument slash commands:
/mcp__distill-mcp__compress-session— surveys recent tool results and runsauto_optimizeon the largest./mcp__distill-mcp__analyze-tokens— estimates session token usage and identifies the three heaviest contributors./mcp__distill-mcp__forget-large-results— surfaces disk-persisted tool results (> 25K tokens) and proposes candidates for re-compression.
Full documentation on the Slash commands page.
distill-compressor custom subagent
- Agent markdown template shipped at
packages/mcp-server/assets/agents/distill-compressor.md— read-only toolset (Read, Grep, Glob, Bash +auto_optimize+smart_file_read),code_executeexplicitly indisallowedTools,requiredMcpServers: [distill-mcp]. distill-mcp setup --install-agent— atomic copy to~/.claude/agents/(mode 0644, parent 0755). Idempotent; supports--dry-run,--uninstall-agent, and a diff preview when the target file exists and differs (--forcerequired to overwrite).
MCP skills — NO-GO
The spike at docs/spikes/mcp-skills-exposure.md settled it: on today's shipped Claude Code binary an external MCP server cannot produce commands with loadedFrom === 'mcp'. The loader is gated behind a bundle-time feature('MCP_SKILLS') flag compiled to false in the public build, and the skills/mcpSkills.ts producer module is absent from the open-source tree. The spike report lists the four upstream preconditions that would flip the decision to GO and three strings-based tripwires to re-check whenever Claude Code bumps versions. v0.11 will not include MCP skills.
Migration notes
No migration required. The three tools' signatures and output shapes are unchanged. The marker contract, the PreCompact hook, the slash commands, and the custom agent are all opt-in — existing v0.8.x / v0.9.x integrators keep vanilla behaviour.
Before v0.10.0
Earlier releases have long-form notes under docs/releases/; from v0.9.0 onward the canonical source is CHANGELOG.md.