Lossless Context Management (LCM) plugin for OpenClaw
open sourceMITself-hostablefree
Lossless Claw is a context engine plugin for OpenClaw that replaces its sliding-window compaction with Lossless Context Management, based on Voltropy's LCM paper. It stores every message in a SQLite database, summarizes older chunks with your configured model and condenses those summaries into a DAG, then builds each turn's context from summaries plus recent raw messages. Agents get lcm_grep, lcm_describe and lcm_expand tools to search compacted history and drill back into the original messages. It also ships an lcm CLI for reading the database, /lossless commands for backups and repairs, and a migration tool that backfills existing OpenClaw sessions. It's MIT licensed and maintained by Martian Engineering.
Problems it solves
- my OpenClaw agent forgets things from earlier in a long conversation
- stop OpenClaw from truncating old messages when the context window fills up
- let my agent search and recall details from weeks-old conversation history
- keep every agent message stored locally instead of throwing it away on compaction
- import my existing OpenClaw session history into a searchable database
Features
- every message persisted in SQLite, by conversation
- DAG of summaries condensed from older messages
- context assembled from summaries plus recent raw messages each turn
- lcm_grep, lcm_describe and lcm_expand recall tools for agents
- lcm shell CLI with JSON output for reading the database
- /lossless commands: status, backup, doctor and repairs
- bundled lossless-claw skill
- session migration CLI to backfill OpenClaw JSONL sessions
- context explorer panel in OpenClaw
Limitations
- Doesn't work outside OpenClaw: it needs OpenClaw 2026.9.2 or newer with plugin context engine support, and Node.js 22+1
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what Lossless Claw does.
- Mem0 The memory layer for AI agents
- MemPalace Local-first AI memory. Verbatim storage, pluggable backend, 96.6% R@5 raw on LongMemEval, zero API calls.
- OpenViking The context database for AI agents
