4.9K ·GitHub
What is this?
Lossless Claw is a plugin for OpenClaw that replaces its sliding-window context compaction with a DAG-based summarization system, so every message is preserved while active context stays within the model's token limit.
Is this a standalone app or a plugin for something else?
It is a plugin installed into OpenClaw, not a standalone application; it hooks into OpenClaw's context engine and command system.
How do I install this into OpenClaw?
Install it through OpenClaw's built-in plugin installer, which records the plugin, enables it, and applies compatible slot selection; local checkouts can instead be built with pnpm and linked for development.
What do I need before installing it?
You need OpenClaw with plugin context-engine support, Node.js 22+, and an LLM provider already configured in OpenClaw for the summarization step.
Will this work with my current OpenClaw version?
It requires OpenClaw 2026.7.2-beta.2 or newer; the stable 2026.7.1 release lacks the transcript projection feature lossless-claw depends on, so you may need to stay on an older plugin release if you can't upgrade.
Where does my conversation history actually go?
Every message is persisted locally in a SQLite database organized by conversation; only chunk summarization calls go out to your configured LLM provider, and the CLI never modifies that data.
How can an agent recall details that got summarized away?
The plugin ships tools called lcmgrep, lcmdescribe, and lcmexpand so agents can search summarized history and drill back into the original raw messages whenever needed.
What does the /lossless doctor command do?
It scans for broken or truncated summaries and reports compaction maintenance debt; with apply it can repair broken summaries or close eligible stale debt after taking a SQLite backup.
What is the lossless-claw-migrate-sessions tool for?
It is a one-time CLI that backfills existing OpenClaw JSONL session files into lcm.db for cases where lossless-claw was disabled, missing, or installed after sessions already existed. It supports a dry-run mode before applying changes.
Can I tune how aggressively it compacts context?
Yes, settings like LCMCONTEXTTHRESHOLD, LCMFRESHTAILCOUNT, and leafChunkTokens let you control when compaction triggers and how many recent messages stay untouched.
What are similar projects?
memory-lancedb-pro, MemOS, pragma, operator-memory, pi-optchat, context-mode, gitagent, brigade