Repolode
Martian-Engineering

Martian-Engineering/lossless-claw

A context management plugin for OpenClaw that keeps every message in SQLite and replaces truncation with DAG-based summaries.

Stars
4,917
Forks
457
Open issues
263
Last commit
2 days ago

What is it?

Lossless Claw is a plugin for OpenClaw, an agent framework, that changes how long conversations are compacted. Instead of dropping older messages when a conversation exceeds the model's context window, it stores every message in a SQLite database, summarizes older chunks with the configured LLM, and condenses those summaries into higher-level nodes that form a directed acyclic graph.

Each turn, the agent's context is assembled from the summaries plus the most recent raw messages. Agents can use the lcm_grep, lcm_describe and lcm_expand tools to search compacted history and drill back into the original detail behind any summary. Raw messages are never deleted, and summaries link back to their sources.

The plugin also ships a lcm shell CLI for reading the database and viewing or setting configuration, native /lossless chat commands for backups and summary health checks, and a session migration tool for importing existing OpenClaw JSONL session files.

Key features

  • 01Stores every message in SQLite organized by conversation, so nothing is truncated.
  • 02Builds a DAG of summaries that condenses as history accumulates.
  • 03Assembles each turn's context from summaries plus recent raw messages.
  • 04Provides lcm_grep, lcm_describe and lcm_expand tools for searching and recovering compacted detail.
  • 05Includes an lcm CLI, in-session /lossless commands, and a one-time session migration tool.

Use cases

  • Running a long-lived personal OpenClaw assistant that should remember earlier conversations.
  • Recovering exact details from old discussions that would otherwise be lost to context truncation.
  • Inspecting or backing up the conversation database of an OpenClaw deployment.
  • Importing existing OpenClaw session history into LCM storage after enabling the plugin.

Quick start

  1. 1

    Install the plugin with OpenClaw's plugin installer

    openclaw plugins install @martian-engineering/lossless-claw@latest
  2. 2

    Set the context engine slot to lossless-claw and enable its conversation prompt hook in openclaw.json

  3. 3

    Restart OpenClaw after configuration changes

Things to know

  • Requires OpenClaw 2026.9.2 or newer, and it is a plugin that only runs inside OpenClaw.
  • Summarization uses an LLM provider you must configure in OpenClaw, which may add API cost.

In collections

Topics

FAQ

What is lossless-claw?
A context management plugin for OpenClaw that keeps every message in SQLite and replaces truncation with DAG-based summaries. Lossless Claw is a plugin for OpenClaw, an agent framework, that changes how long conversations are compacted. Instead of dropping older messages when a conversation exceeds the model's context window, it stores every message in a SQLite database, summarizes older chunks with the configured LLM, and condenses those summaries into higher-level nodes that form a directed acyclic graph.
Is lossless-claw free to use? What license does it have?
lossless-claw is open source under the MIT license. Check the license terms before using it in commercial products.
Is lossless-claw still maintained?
Actively maintained. The last commit to lossless-claw was on Nov 5, 2026.
What can I use lossless-claw for?
Running a long-lived personal OpenClaw assistant that should remember earlier conversations. Recovering exact details from old discussions that would otherwise be lost to context truncation. Inspecting or backing up the conversation database of an OpenClaw deployment. Importing existing OpenClaw session history into LCM storage after enabling the plugin.
How do I install lossless-claw?
Install the plugin with OpenClaw's plugin installer: openclaw plugins install @martian-engineering/lossless-claw@latest Set the context engine slot to lossless-claw and enable its conversation prompt hook in openclaw.json Restart OpenClaw after configuration changes
Where can I get lossless-claw?
The source code and installation instructions are on GitHub: https://github.com/Martian-Engineering/lossless-claw

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects