What is lossless-compaction?
lossless-compaction is a Claude Code mod by yottayoshida that lossless context compaction for Claude Code: old tool output moves to local files and comes back unchanged by id, or by what it is about with a Jev key. It is listed under Context & memory and has no public popularity data yet.
| Type | Claude code mod |
|---|---|
| Author | yottayoshida |
| Repository | yottayoshida/lossless-compaction |
| Popularity | no public popularity data yet |
| Category | Context & memory |
| Security | High risk (40/100) |
| Rank | #5,212 of 5,272 Claude Code mods; #484 in Context & memory |
| License | Apache-2.0 |
| Last commit | 2026-10-08 |
| Hooks | 7 events |
| Sees | compaction, every prompt, every tool call, mcp__lossless-compaction__find calls, mcp__lossless-compaction__recall calls |
| Draws on | nothing |
Is lossless-compaction safe to install?
lossless-compaction scores 40/100 on the MCPMods security check: High risk. Things to review: sends data over the network; starts processes outside the sandbox; writes files or config; reads environment variables; watches every prompt or event. It passed 3 of 8 checks.
Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.
| Check | Result |
|---|---|
| Sends data over the network | Review |
| Starts processes outside the sandbox | Review |
| Writes files or config | Review |
| Reads environment variables | Review |
| Watches every prompt or event | Review |
| Doesn't drive Claude | Pass |
| Passes claude plugin validate | Pass |
| Has an open-source license | Pass |
API calls in its code
| Call | What it means |
|---|---|
$.clock.sleep | |
$.command.register | |
$.env.get | reads env vars |
$.env.set | sets env vars |
$.fs.exists | reads files |
$.fs.list | reads files |
$.fs.read | reads files |
$.fs.stat | reads files |
$.fs.write | writes files |
$.http.fetch | network requests |
$.process.run | runs processes |
$.session.id | |
$.session.messages | reads the transcript |
$.session.usage | |
$.session.version | |
$.settings.read | reads settings |
$.store.get | keeps its own state |
$.store.set | keeps its own state |
$.tool.register | drives Claude |
$.ui.log | draws interface |
$.ui.toast | draws interface |
How do I install lossless-compaction?
- Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
claude --version
- Read its footprint. This lists every event it hooks and every API call it makes, without running it.
git clone https://github.com/yottayoshida/lossless-compaction claude plugin validate ./lossless-compaction/.
- Install it. Run this in your terminal, then /reload-plugins in an open session.
git clone https://github.com/yottayoshida/lossless-compaction && claude --plugin-dir ./lossless-compaction/.
Or ask Claude to set it up
Paste this into Claude Code and it installs lossless-compaction for you:
Install the "lossless-compaction" Claude Code mod from https://github.com/yottayoshida/lossless-compaction. Run claude plugin validate on it first and show me what it can access before you enable it.