compact-keeper

Reviewed at commit 76f583d

After a compaction, adds one message with exact facts from before it: your latest prompt in full, up to 4 earlier ones, the files edited, the todo list and…

Made by
Vedant Andhale
What we checked

After a compaction it adds one message to the conversation with facts copied from before it: your latest prompt in full, up to four earlier ones, the files edited, the todo list and the last failed shell command, capped at 4,000 characters. It makes no model calls, reads no files, runs no programs and sends nothing anywhere; it only keeps these facts in memory for the session.

Review details

Static review of the source at the pinned commit; not run. Registers session.start (registers the /compact-keeper command), prompt.submit (records typed prompts after the chain ran, last 5), tool.call (after the call: records edited file paths and counts for Edit, MultiEdit, Write and NotebookEdit, the TodoWrite list, and the command and exit code of a failed Bash or PowerShell call; main agent only), session.compact (after the compaction, appends one user message with the kept note; skips subagents and precompute passes), session.end (clears state) and command.run/ui.render (a pane that shows the last note). Runtime calls used: $.command.register, $.ui.toast, $.ui.open, atom read/update for the last note held in plugin state. No fs, process, env, network or model calls. Prompts, commands and paths are kept only in module memory and in the note added to the conversation, so a command that held a secret would be repeated in that note. npm dependencies: none. The types file in the plugin folder is a type-only declaration.

What it uses
  • Reads your prompts: yes
  • Sees tool calls: yes
  • Blocks or changes tool calls: no
  • Reads or writes files: no
  • Runs programs on your machine: no
  • Calls the model (uses tokens): no
  • Sends data over the network: no
  • Stores data: yes
  • Shows something on screen: yes
Hooked events
Screenshot of compact-keeper

After a compaction, adds one message with exact facts from before it: your latest prompt in full, up to 4 earlier ones, the files edited, the todo list and the last failed shell command. At most 4,000 characters. No model calls.

Made this mod? Add a badge to your README

modsforClaude badge for compact-keeper

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/compact-keeper.svg)](https://modsforclaude.com/mods/compact-keeper/)

← All mods