Repository navigation
Releases: amarkum/kompactor
Release list
Kompactor 0.8.7
- Configuration shows approximate savings from Kompactor's benchmark, not from your own sessions.
bench/sessions.pyruns real headless Claude Code sessions on cobra (Go), Flask and click (Python) and zustand (TypeScript) in four lengths, from one command (about 2 turns) to twenty steps (about 27 turns): without Kompactor, at each level, and with each technique switched on by itself. Each level card shows one approximate cost saving, rising from Max quality to Max savings: the level's measured trimming and reply rules, plus compacting earlier at the level's size. Each switch shows what its technique saved by itself, and the cards and "Your settings" update as you pick a level, flip a switch or change a setting. Results are inevidence/sessions. - Each technique measured on its own (
evidence/techniques, 144 Claude Code sessions): short replies −8.5% cost and −21% reply tokens; lean-code rules, the code graph and trimming made no clear difference to cost by themselves in these short sessions. The Configuration page shows each figure with its 95% range on the technique's switch, and the techniques switched on combined, updating as you flip them. kompactor proveleaves out~/.claude/settings.json(--setting-sources project,local), so on a machine with Kompactor installed its hooks no longer run in the baseline arm.- The selected level card's top edge is no longer clipped when the cards scroll sideways.
Kompactor 0.8.6
-
Levels now cut cost where it's spent. Every request re-sends the whole conversation, and in long sessions that is most of the bill, so each level also sets how large the conversation may grow before Claude Code compacts it (Claude Code's
autoCompactWindow): Max quality leaves Claude Code's default, Quality 780K, Balanced 650K, Savings 430K, Max savings 240K tokens. On 65 real Opus 5.5 sessions replayed withkompactor estimate, the levels save about 0, 10, 19, 35 and 50% of cost; trimming output alone saved under 2%. The window is set while Kompactor runs and removed bykompactor stopanduninstall; a window you set yourself with/autocompactor in settings is never changed. New setting:compact_window. -
Changing the level or the reply and code rules now reaches sessions that are already open: Claude gets the new rules with your next message (a
UserPromptSubmithook), instead of only in new sessions. Trimming and file-read settings already applied on the next tool call. -
Configuration: "What Kompactor does" has a switch for each technique: compacting the conversation earlier, trimming command output (rtk-style), outline-first reads, the code graph (graphify-style), lean-code rules (ponytail-style) and short replies (caveman-style), each with what it saved on your past sessions where that can be measured. Switching one on goes back to the level's strength for it.
-
kompactor estimateand the dashboard's replay simulate compacting earlier and report it next to the trimming saving. The Configuration page shows each level's estimated cost saving on your own past sessions. -
Dashboard Overview, reworked to be read at a glance: a one-sentence summary ("shortened tool output in 21 of Claude's 31 replies… worth $0.35 at Opus 5.5 API prices"), cards for tokens saved, dollars, output shortened and replies helped, and a "What do these numbers mean?" note.
-
Claude's replies can be filtered by command or file (e.g.
pytest), saving size, kind of saving and session, and sorted by newest, oldest, biggest saving or dollars. The chart and list show the matching replies, with what each one shortened and what it was worth; click one for its before and after. -
Before and after: the Overview shows real command outputs Kompactor shortened, line by line, next to exactly what Claude was given. Long runs of removed lines fold into "⋯ 323 more removed lines", which opens on click. It replaces the live preview, which showed what Claude would get rather than what it got.
-
"Quality vs tokens" is now Configuration, with clearer level cards (strength, what each level does, savings on your outputs). "Projects & languages" is now Projects.
-
Languages are always detected from each repo's files. The "Always use" switch is gone, and a list pinned with it before is ignored.
-
The light/dark switch is one icon in the top-right corner. Copy buttons in the Guide and Setup are an icon in the corner that shows on hover. Project paths are shown in full, cut with "…" at the start when they're long.
-
Evidence:
evidence/real-reposmeasures compaction on real test suites, builds, git and grep output in 6 repositories (Python, TypeScript, C, Swift, Java), with planted failures: median −61% per output at Balanced, every planted failure line kept at levels 1, 3 and 5.bench/real_repos.pyreproduces it. -
Fixed: at the Max savings level (lines clipped at 200 characters), an error line that starts with a long path lost its message at the end, so a failing
swift testor a Java compile error could reach Claude without the actual failure. Error lines are now kept whole up to 2,000 characters and past that clipped in the middle. Found by the real-repository benchmark. -
Swift, Maven and Gradle output: XCTest's per-test started/passed lines and suite banners, Swift's build progress, Maven's plugin banners, routine [INFO] lines and fixed help footer, Gradle's up-to-date tasks and the JVM's sun.misc.Unsafe notices are dropped; failures, summaries and a test that started but never finished are kept.
swift,dotnet,mixanddenobuilds and tests now go through the shell prefix, so their failing runs are compacted too. Found by the real-repository benchmark:swift testwent from 2,779 to 244 tokens and a failingmvn testfrom 1,242 to 425, with the failure kept. -
kompactor rules: the reply and code rules plus code-graph tips for Cursor, Windsurf, Cline, Codex (AGENTS.md), GitHub Copilot, Gemini CLI and Aider, in each one's rules file. Shared files get a marked block that is updated in place;--removetakes it out. -
Choose which subagents get the reply and code rules: a pattern matched against the subagent's type (dashboard setting or
KOMPACTOR_SUBAGENT_MATCHER, e.g.explore|general). Subagents whose type isn't reported, or a bad pattern, still get them. -
Fixed: the dashboard saved "Keep history for" as true/false, so changing it could prune history older than 1 day instead of the chosen number. General settings now keep their types, and an old true/false value falls back to 30 days.
-
Docs in the code graph: Markdown and reStructuredText headings become searchable sections, and backticked names, paths and local links tie them to the code.
graph impactlists "docs that mention it" andgraph explainadds "documented in". Docs never count as modules, areas or callers. -
kompactor graph export json|graphml|mermaid|obsidian: the graph as data, for Gephi or yEd, as a Mermaid diagram grouped by area, or as an Obsidian vault.kompactor graph hook installadds a background graph refresh to the repo's post-commit, post-merge and post-checkout hooks, beside any hooks already there (uninstallremoves only its own line). -
Callers and
explainlabel each link: exact (same module, or it imports the definition), likely (the only definition of that name), ambiguous (several definitions, none imported) or external (not defined in the repo), with a count per label. -
Code graph communities: modules that import each other are grouped into areas (label propagation over the import graph, folder-mates weighted a little higher).
graph reportlists them with their hub; the dashboard's module map colours nodes by area with a named legend. -
kompactor mcp: an MCP server (stdio) with read-only tools for graph query, callers, impact, deps, explain, path, report, unused, outline and symbol, so any MCP client can use the code graph.claude mcp add kompactor -- kompactor mcp. -
Code graph for Rust, Java, Kotlin, Scala, C#, Swift, C, C++, Ruby and PHP: symbols, methods, visibility, doc comments, imports resolved to files, calls and inheritance. Each gets a language profile (detection, library stack frames, generated and lock files) and test-file recognition. Existing graphs rebuild once.
-
Dashboard: tool outputs passed to Claude unchanged are listed with why; every project appears in the picker; each turn can be previewed (raw output and what Claude saw); the live preview and level figures use your own latest outputs only; delete history by project and time range; an All configuration reference; dates like "22nd Oct 2026, 6:24 PM".
Kompactor 0.8.5
- Dollars saved are worked out at the API price of the model each session ran on (read from the status line: Opus 5.5 $4 per million input, cache writes $5, cache reads $0.20), instead of a flat $3.
- Each saved token is counted once as a prompt-cache write and again at the cache-read price for every later request that would have re-read it (one per tool call and one per new prompt), stopping at compaction. Before, only later turns were counted, and compaction was ignored.
- VS Code / Cursor: amounts show to the cent or a hundredth of a cent, each recent reply shows what it saved in dollars, and the note names the prices used.
kompactor.pricePerMillionTokensnow defaults to 0 (use the model's price); set it to override. kompactor gainprints the dollar figure.
Kompactor 0.8.4
Status summary shows savings as (−44%). See CHANGELOG.md.
Kompactor 0.8.3
Standard kompactor help, typo suggestions, compact status; the VS Code / Cursor sidebar shows what Kompactor shortened in each reply. See CHANGELOG.md.
Kompactor 0.8.2
VS Code / Cursor sidebar with tokens and dollars saved per session, project, day and turn. kompactor start installs the extension automatically; kompactor uninstall removes it and all data. See CHANGELOG.md.
Kompactor 0.8.1
Dashboard: the Rebuild button's refresh icon is drawn correctly. See CHANGELOG.md.
Kompactor 0.8.0
Three commands: kompactor start (turn on + dashboard), kompactor stop, kompactor uninstall. setup is folded into start. See CHANGELOG.md.
Kompactor 0.7.9
Fixes kompactor: command not found after pip install: run python3 -m kompactor setup once and the command is linked onto your PATH. See CHANGELOG.md.
Kompactor 0.7.8
Claude Code: /plugin marketplace add amarkum/kompactor, then /plugin install amarkum@kompactor. PyPI: pipx install kompactor. VS Code: the .vsix below. See CHANGELOG.md for what's new.