LosslessClaw: The Fix for OpenClaw's Biggest Weakness
You know the feeling. You’re 45 minutes into a complex session with your OpenClaw agent. You’ve explained the architecture, set up the workflow, walked through three edge cases. Things are going well.
Then the context window fills up. Compaction kicks in.
And your agent — politely, confidently — asks you to explain the architecture again.
The Compaction Problem
OpenClaw’s default compaction is a rolling summary. When the context window gets full, it compresses old messages into a paragraph and moves on. On paper, that sounds reasonable. In practice, it’s lossy in exactly the ways that hurt.
What survives compaction: the gist of what you were doing.
What doesn’t: the specific file path you were editing, the decision you made about why not to use approach B, the error message from three steps ago that explains why you’re on step seven, the exact version of the library you pinned, the fact that the API uses POST not GET for that one endpoint.
Those specifics are the entire point. Without them, the agent isn’t resuming work — it’s starting over with a hazy briefing.
Peter Steinberger’s Fix
Peter Steinberger, OpenClaw’s creator, recently posted about this directly. His recommendation: LosslessClaw, a community plugin that replaces the compaction system entirely.
The post hit 277K+ views and 3,200+ likes in hours.
That number tells you everything. This isn’t a niche complaint from power users. It’s the most common failure mode in production OpenClaw usage, and people have been quietly suffering through it.
LosslessClaw’s approach is structurally different. Instead of summarizing conversation history, it serializes agent state — the structured representation of what the agent actually knows and is doing:
- Active tasks and their current status
- Key decisions made and the reasoning behind them
- Working files, paths, and their modification history
- Environment state (variables, tool configurations)
- Recent tool call history with outcomes
When compaction is needed, it doesn’t compress prose. It prunes state: old completed tasks, resolved decisions, stale tool calls. The things that actually don’t matter anymore.
How to Get It (If You Already Have OpenClaw)
LosslessClaw installs through OpenClaw’s plugin system. Three commands:
# 1. Install
openclaw plugin install lossless-claw
# 2. Set as default compaction strategy
openclaw config set memory.compaction lossless
# 3. Restart
openclaw restart
No migration, no data loss. Your existing MEMORY.md and memory/*.md files are untouched — LosslessClaw operates at the session layer, below persistent memory. It just replaces what happens when the context window fills up mid-session.
If you’re on an older OpenClaw version (pre-plugin system), update first:
npm update -g openclaw
openclaw --version # confirm you're on latest
openclaw plugin install lossless-claw
Verify it worked: trigger a long session until compaction fires, then run openclaw session status. You should see structured state entries (active tasks, key decisions, working files) rather than a prose summary under the memory section.
Plugin names can shift as community plugins stabilize. If
lossless-clawdoesn’t resolve, check ClaWHub or runopenclaw plugin search losslessfor the current canonical name.
Why This Matters More Than It Looks
The compaction problem isn’t just about convenience. It’s about reliability.
If your agent can’t maintain state across a long session, you can’t trust it to do long tasks. You become the human RAM — mentally tracking all the context the agent dropped, feeding it back in piece by piece. That’s the opposite of what autonomous agents are supposed to do.
LosslessClaw makes long-horizon tasks tractable. And long-horizon tasks are the entire value proposition.
How It Fits With soul.py
soul.py addresses a related but different problem: between-session memory. When your agent shuts down and restarts, soul.py is what prevents it from waking up as a stranger to your project.
LosslessClaw addresses within-session compaction. You need both:
| Problem | Solution |
|---|---|
| Agent forgets within a long session | LosslessClaw |
| Agent forgets between sessions | soul.py |
| Agent forgets across team members | SoulMate |
The ideal stack is all three. LosslessClaw keeps the agent coherent while working. soul.py persists the outcomes. SoulMate shares memory across your whole team.
The MEMORY.md Pattern
If LosslessClaw isn’t an option for your setup, the next best thing is the MEMORY.md pattern: a curated, human-maintained file that the agent reads at the start of every session and updates at the end.
It’s manual, but it forces discipline. You decide what’s important enough to survive compaction. The agent doesn’t get to decide by summarization.
The weakness is that it doesn’t help during a session — it only helps at the start of the next one. Which is exactly the gap LosslessClaw fills.
The Bigger Picture
277K views on a plugin recommendation isn’t just a data point about LosslessClaw. It’s a signal about where AI agents are in their development curve.
We’re past the “can it do the task at all” phase. We’re in the “can it do the task reliably, over time, without losing the thread” phase. That’s a harder problem. Memory — at every timescale, within sessions and across them — is the core unsolved piece.
LosslessClaw is one good answer to one slice of it. It won’t be the last.
Related reading: OpenClaw-RL: Training Your Agent by Talking to It · soul.py: Persistent Memory for LLM Agents · Hindsight Agent: Biomimetic Memory That Learns