Context & memory·terminal · desktop·MIT
SuperLcm
One local archive for Claude Code and Codex chats, with summaries ready before compaction.

SuperLcm keeps your conversations from Claude Code, Codex, Hermes, Pi and dsh harness in one archive on your computer: every original record word for word, plus layered summaries that point back to it. All five tools read the same archive, so a task started in one can continue in another. In Claude Code, the plugin’s mod can also take over compaction: summaries are written in the background after each turn and swapped in at the threshold, so the session does not stop to summarize.
What it does
- Archive. Hooks save each turn as it happens: your messages, Claude’s replies and its tool calls, each as a numbered record that can be cited and read back later.
- Layered summaries. Each run of about 12,000 characters (adjustable) becomes a short summary, and neighboring summaries merge into higher layers. The top layer reads like a table of contents, and every entry carries the record numbers it came from.
- Lookup tools. Claude gets
lcm_find,lcm_outline,lcm_readandlcm_continueas MCP tools to search summaries and originals, open the tree one level at a time and read exact records. After a compaction, Claude is told where the full record lives. - Continue in another tool. When you hit a usage limit or want a second model, tell the other tool
Continue #6e94e via SuperLcm, where#6e94eis the conversation’s code.lcm_continuehands over the top-level outline and the latest messages, and older detail stays onelcm_readaway. It works in any direction, and the continued work is archived too. - Compaction takeover, Claude Code only. At Claude Code’s threshold, 300K tokens by default (200K, 500K, 800K or a custom size up to 950K), SuperLcm replaces the older messages with the fewest summaries that cover them and keeps the newest 40K tokens (20K, 80K or a custom size) word for word. No model is called at that moment, so the swap takes milliseconds. In the author’s example, a 300K context of about 12,000 records came back at roughly 70K, most of it Claude Code’s own system prompt and tool definitions.

lcm takes a similar lossless approach inside Claude Code alone. SuperLcm’s difference is one archive shared with Codex, Hermes, Pi and dsh harness, and handing a task from one tool to another.
Install
Needs Claude Code 2.1.287 or later, plus Node.js 22.16 or newer on PATH.
claude plugin marketplace add yu381792/superlcm
claude plugin install superlcm@superlcm
Run /superlcm:console to open the local console: settings, your stored conversations, and the connections to Codex, Hermes, Pi and dsh harness. The takeover is off until you turn it on under Settings › Compaction, and turning it off again restores your previous compaction setting. If you connected Claude Code from the console before installing the plugin, its Claude card offers to remove the older hooks and superlcm MCP entry, with a backup first.
How it works
The plugin has two halves. Classic command hooks (SessionStart, UserPromptSubmit, Stop, PostCompact, SessionEnd) run node src/launch.js hook to capture each turn, and an MCP server provides the lookup tools. Both work on Claude Code versions without mods. The mod, compact-mod.js, adds only the background summaries and the takeover. According to the author, it runs in the terminal and in the Code tab of Claude Desktop.
session.startpasses the main session’s id to the local SuperLcm CLI (summary-host).turn.completestarts a background run, one per session at a time, that asks the CLI for waiting summary pieces and writes each withmodel.completeon the session’s own login. The turn does not wait for it. Subagents are skipped.session.compactsends the messages being compacted (text cut to 2,000 characters each), any compaction instructions and the context usage to the CLI, which plans the swap. If the takeover is on and the summaries cover the older part, the module returns a summary packet followed by the newest messages untouched. If the takeover is off, the summaries lag behind, anything fails or the session is a subagent, Claude Code compacts the usual way.session.endhands what is left to a separateclaude -pworker, which also takes over after a failed model call.
process.run only starts node <plugin>/src/launch.js with one of five commands (summary-host, summary-claim, summary-save, summary-handoff, compact-packet) and a 60-second timeout. When to compact is still Claude Code’s own threshold, which the console sets; the module never starts a compaction itself.
Storage and network. The archive keeps your prompts, Claude’s replies and its tool calls in full, on your computer; the README does not give its path. Tools connected from the console point at a fixed entry file, ~/.superlcm-claude/superlcm.js, that follows plugin updates. The author marks the four lookup tools as read-only, the two summary tools as writing only SuperLcm’s own summaries, and none as reaching outside your computer. Conversation text leaves the machine only for the summary writer you pick.
Tokens. Writing summaries costs tokens; the swap itself does not. You choose the writer per tool in the console:
- The agent itself (the default): Claude writes each part right after it happens, through
lcm_summary_taskandlcm_summary_submit, on your main model. The author says this costs almost nothing. - Own tool, in the background: in Claude Code with the plugin, this is the mod’s
model.completepath. Each call summarizes one segment or merges summaries, with the answer capped at 2,048 tokens, on the model set on the console’s Claude Code card. The author suggestshaiku; with no model set, the module uses the session’s current model. Leftovers go to theclaude -pworker on the same account. - Your own API: any Anthropic or OpenAI-compatible endpoint, including a gateway on your own computer.
- Off: everything is still saved and searchable.
The author gives no token total per session.
Limitations
- The takeover covers the main Claude Code conversation and dsh harness. Subagents always compact the usual way, and Codex, Hermes and Pi get the archive and continuation without a takeover for now.
- Runs wherever Claude can start local programs, such as Claude Code and Cowork on your own computer. Not in claude.ai on the web or in the mobile chat.
- The module’s events and methods can change between Claude Code versions.
Similar Claude Mods
hunch
Chips above the prompt for the session's card, agents and memory, and shorter replies.
storybloq
A board of the tickets and issues kept in .story/, in a pane beside the transcript.
kindex-modern
Task tools backed by a Kindex store in your repo, plus repo memory on every prompt.
commonplace
Your notes as a wiki Claude maintains: ingest papers, ask questions, keep it healthy.
Popular Claude Mods
The whole directory →Agent Time Machine
Every tool call on a branching timeline with snapshots: inspect, restore, branch, rerun.
glowup
A live side pane for changes, subagents and context, shareable themes and a pixel pet.
prompt-rail
Your session's prompts as a rail: hover to read one, click to jump back to it.
shared-session
Share a session by link: teammates join from their Claude Code and prompt it live.



