Skip to content

My agent gets worse as the run gets long: what Lossless Claw, Hindsight, Mem0, Letta and Argentic each do about it

What Lossless Claw is, and how it, Hindsight, Mem0, Letta, Zep, LangGraph, the OpenAI Agents SDK's compaction and Argentic each handle a long-horizon agent whose window fills up. Read from their docs, with where each is ahead of us.

Neil Luo ·

We read each tool's own documentation on 22 November 2026 and ran none of them. We build Argentic, so weigh what we say about it. Every Argentic number names the engine version it came from, and none of them is a head-to-head against another tool.

Builders describe the problem as "my agent runs out of context and gets worse after many tokens". The symptoms they report are these: the agent forgets an instruction it was given at the start; its running counts drift; it reopens work it already finished; its prompt, and the bill, grow with every step. This post is about long-horizon agents, the ones that work on a single job for hours, and what Lossless Claw, Hindsight, Mem0, Letta, Zep, LangGraph, the OpenAI Agents SDK and Argentic each do about it.

Which one should I use?

It depends on what you run and what "worse" means for you.

  • If you run OpenClaw and its built-in compaction loses detail, Lossless Claw was made for that. It is MIT licensed.
  • If the agent needs to remember things across sessions, a memory layer such as Mem0, Hindsight or Zep holds them for your own loop to read.
  • If you want the agent to keep and edit its own memory, look at Letta.
  • If you want to build the graph your agent runs on, LangGraph is the framework for it.
  • If you already use the OpenAI Agents SDK and want its history rewritten when it gets long, it has a compaction session for that.
  • If one agent works one job for hours and you want the engine to choose what the model reads each time, with the prompt held under a cap, that is Argentic. It is hosted and closed.

The rest of the post is the detail behind each line.

What is Lossless Claw?

Lossless Claw is a plugin for OpenClaw, an agent framework. OpenClaw's default context engine, which it calls legacy, writes a single summary of older messages when the window fills. Lossless Claw replaces that. Past 75% of the model's window by default, it summarizes older messages in chunks, then summarizes those summaries into a graph, and keeps the newest 64 messages as they were. A model you configure writes the summaries.

The part that gives it the name is storage. Every message stays in a SQLite database, each summary links to its sources, and the agent has tools to search the history and expand a summary to get the original wording back. It is MIT licensed, and its README claims no benchmark results.

It is the right fit if you run OpenClaw. We have not run it. Two differences from us are worth knowing. The agent still reads a model-written summary by default and has to choose to expand it, so a detail the summary left out stays out until it goes looking. And it is a plugin inside OpenClaw's loop, which Argentic is not.

What is Hindsight?

Hindsight is an open-source memory system from Vectorize, also MIT licensed. When your agent retains something, an LLM extracts facts, entities and relationships from it. Recall searches them four ways at once (meaning, keywords, a graph and time), merges the results and trims them to fit a token limit. It can run on your own PostgreSQL or as Hindsight Cloud.

Its authors report lifting overall accuracy from 39% to 83.6% on benchmarks including LongMemEval and LoCoMo, against a full-context baseline with the same 20B open model, and 91.4% on LongMemEval with a larger one. Those are the vendor's figures from its paper, on tests that are not ours, and we have not reproduced them. The pages we read describe Hindsight as memory. They do not describe it running your agent's loop or managing the rest of the prompt, so it sits next to a loop you already have.

Mem0, Letta, Zep and LangGraph

Mem0 is a memory layer under Apache 2.0. Your code calls add and search and puts the results in the prompt. Its README reports 92.5 on LoCoMo and 94.4 on LongMemEval for its managed platform and says open-source users should expect similar gains but not identical numbers. Its current algorithm only adds memories, so a changed fact needs a separate update call.

Letta is a platform for stateful agents where the agent edits its own memory, and it supplies the loop. Its legacy V1 SDK docs say that when a history outgrows the window, older messages are summarized to make room. Its current agent docs say less about it.

Zep builds a graph of facts with the times they were true. It handles a fact that changed better than we do today. LangGraph is a framework: you write the nodes, and the docs show how to trim and summarize messages inside them. We read these three on 1 November 2026 and set them out in where Argentic fits.

What does the OpenAI Agents SDK do?

Its compaction session checks a threshold after each turn. When the threshold is met, it calls OpenAI's Responses API compaction endpoint and rewrites the session's history. The docs say compaction clears and rewrites the history. They do not say what it drops. If you already build on that SDK and want the smallest change, it is one wrapper around your session.

What does Argentic do?

Argentic keeps a record of every step the agent takes and builds each prompt from that record, under a size cap. It does not carry a transcript forward and trim it. At each rebuild the engine chooses what goes back in, and the agent can search the whole record for an older detail. For new hosted agents the engine writes no summary of the history.

In our 12-hour shop run (engine 0.48.1, Claude Haiku 5.5, one run) the median prompt was 9,775 tokens over the first 20 calls and 24,428 over the last 100, and the largest of 952 calls was 43,431. The prompt grew as the run went on, but only a little: 8 of the 952 calls went past 40,000 tokens. The study page has the rows. It is one run on one model, and nothing we have measured goes past 12 hours.

Bring your tools, your prompt and your model key. Argentic runs the loop and replaces your framework's. If you run OpenClaw today, moving to Argentic means switching loops and keeping your tools. It is not a plugin you add.

Side by side

Each column is one tool and each row is one question. Every cell links to the page it was read from.

Argentic next to Lossless Claw, Hindsight, Mem0 and the OpenAI Agents SDK's compaction session
QuestionArgenticusLossless Clawplugin for OpenClawHindsightmemory system, VectorizeMem0memory layerOpenAI Agents SDK compactionOpenAI
Built forA hosted engine for long-horizon agents, the kind that work on one job for hours. our pageA context-management plugin for OpenClaw. It replaces OpenClaw's built-in sliding-window compaction with a layered summary graph. GitHubAn open-source memory system for agents that learn over time, from Vectorize. It retains, recalls and reflects. GitHubA memory layer that keeps what an agent learned across sessions. Mem0 docsA framework for multi-agent workflows. Its compaction session wraps one of its sessions. OpenAI docs
Who runs the loopArgentic runs the loop. You bring your tools, your prompt and your model key. our pageOpenClaw runs the loop. You select the plugin as OpenClaw's context engine. OpenClaw docs, GitHubThe pages we read do not describe it running your agent's loop. Your agent reaches it through a REST API, client libraries, an MCP endpoint or a wrapper around the model call. GitHubIt runs no loop. Your code calls add and search, and puts the results in the prompt itself. GitHubThe SDK's Runner runs the loop. OpenAI docs
When the window fillsEach prompt is rebuilt from a record of the run, under a size cap, so the engine chooses what the model reads each time instead of trimming a growing transcript. New hosted agents write no summary of their history. our pageAt 75% of the model's window by default, older messages are summarized into leaf summaries and then into higher-level ones. The newest 64 messages are protected from summarizing. A model you configure writes the summaries. GitHubNot documented as a way to handle a full window. Recall results are trimmed to fit a token limit, and the pages we read do not describe it managing the rest of the prompt. GitHubNot documented as a way to handle a full window. It stores extracted facts and returns the relevant ones when you search. GitHubBy default, after each turn it checks a threshold and, if it is met, calls OpenAI's Responses API compaction endpoint and rewrites the session's history. The docs warn that streaming can stay open a few seconds longer while it runs. OpenAI docs
Where an old detail livesThe record keeps every step as it happened and is not summarized. The agent can search all of it for an old detail. our pageEvery message stays in a SQLite database. Summaries link to their sources, and the agent has tools to search the history and expand a summary to recover the original detail. GitHubAn LLM extracts facts, entities and relationships from what you retain. Recall searches them four ways at once (meaning, keywords, graph and time) and merges the results. GitHubAn LLM extracts facts from the messages you add. The current algorithm only adds, so memories accumulate and nothing is overwritten. GitHubThe docs say compaction clears and rewrites the session history. They do not say what it drops. OpenAI docs
Where it runsHosted by us, with a TypeScript client and a Python one. our pageIt runs inside your own OpenClaw install, and needs Node.js 22 or newer. GitHubSelf-hosted with Docker, pip or Helm on PostgreSQL, or the hosted Hindsight Cloud. GitHubA library, a self-hosted server, or the hosted Mem0 Platform. GitHubA library that runs inside your application. OpenAI docs
Open sourceThe engine is closed source. our pageMIT licensed. GitHubMIT licensed. GitHubApache 2.0. Some features are on the Platform only. GitHub, Mem0 docsMIT licensed. GitHub

Where the others are ahead of us

  • Lossless Claw, Hindsight and Mem0 have code you can read, and all three are open source. Our engine is closed.
  • You can run any of them on your own machines. Argentic is hosted.
  • Hindsight and Mem0 publish benchmark results for recall. We have no public recall comparison against them.
  • The OpenAI SDK's compaction is one wrapper around a session you already have. Moving to Argentic is a larger change.
  • Argentic's beta opened on 21 October 2026. Our longest test is one 12-hour run, and the known issues page lists what it got wrong, including running counts that drift across rebuilds.

What we have not measured

We have never run the same agent on Argentic and on any of these tools, so we make no claim that Argentic is better than any of them. We have not compared cost with them either. We have not tested whether an agent using Lossless Claw's expand tools recovers details that a summary dropped, and we have not run Hindsight or Mem0 beside a loop of ours.

If a cell is wrong

These pages change, and we read each one once. If we got something wrong about your tool, write to hi@getargentic.com and we will correct it. Anyone may benchmark Argentic against any of them with the setup we publish. For the symptoms one at a time, see why your agent forgets after compaction and why long-running agents lose track of counts.

Sources and method: 11 hours 59 minutes on shift: what the agent remembered.

More posts.

  1. LangChain Deep Agents or Argentic: what each does when a run outgrows the window

    Deep Agents offloads big tool results to files and summarizes old history. Argentic rebuilds each prompt from a record of the run. How they differ, where Deep Agents is ahead of us, and what we have and haven't measured.

  2. Does a growing transcript hurt a long agent run? Our early test, and the part we retracted

    An early September test of rebuilding the prompt at each task boundary against a growing transcript. The study reports it found more in all three cells, by less than we first claimed, and the claim that a growing context makes an agent worse did not survive our own re-test.

  3. Why an agent juggling many tasks loses track of what's done, pending and blocked

    Six reasons one agent working through many tasks reopens finished ones, forgets blocked ones and reports done too early, what fixes each, and the one underneath. We have no orchestration benchmark yet, and the post says so.

  4. Why an agent's own memory skips things

    Six reasons notes an agent writes for itself leave out the one detail that mattered, what to do about each, and the one underneath. On our shop shift, stock answers were exact on 22 of 28 with the engine keeping the counts and 4 of 28 with the model writing them (engine 0.51.0, 2 November, one run each).

  5. Why your agent forgets things after compaction

    Six reasons an agent loses details when its context is summarized and restarted, what you can do about each, and the one underneath. Includes our one-run shop-shift numbers and what they don't show.

  6. Why long-running agents lose track of counts

    Six reasons an agent's running totals drift, what to do about each, and the one underneath. On our own 900-event shop shift, stock questions were exact on 22 of 28 with the engine keeping the counts and 4 of 28 with the model writing them (engine 0.51.0, 2 November, one run each). Six answers were still wrong.

  7. Why your agent repeats an action it already took

    Six causes of a repeated refund or email, from a missing stop condition to a record the agent lost, what fixes each, and the one underneath most of them. Our November rerun had no refund applied twice, with a key on the tool in both runs.

  8. Where Argentic fits next to the agent SDKs and the tools around them

    A table-by-table read of the Claude, OpenAI and Amazon agent SDKs, then Mem0, Zep, LangGraph and Letta, from their own docs, with where each is ahead of us.

  9. A plain transcript loop or an engine like ours: when each is the right call

    What the plain loop does well, where it runs out, and what the engine costs you.

  10. Why your agent forgets things from a long history

    On Gemma 4 31B, with histories of about 1.2 million tokens, a loop that keeps only about the newest 100,000 tokens got 5 of 60 right and the engine got 38. What we ran and what it doesn't show. The engine version is not recorded in the public rows.

  11. Does summarizing old context lose details? We measured it

    On Gemma 4 31B, with histories of about 1.2 million tokens, our own note-rewriting loop got 17 of 60 and the engine got 38 of 60. Most of the loop's misses were answers saying the detail wasn't in its notes (29 of 43). The engine version is not recorded in the public rows.

  12. Resuming an agent after a crash without repeating a finished action

    We killed a real server mid-run with SIGKILL and finished the work from another process. What was not repeated, and the one case that is.

  13. Checking what your agent was shown on each turn

    Replay re-checks every prompt against what was recorded: 1,754 of 1,754 turns matched. It checks the prompt side only. The engine version is not recorded in the public rows.

  14. Run your first agent

    Sign in to the Argentic dashboard, make an API key and run an agent that remembers. What you get, what we've measured and what isn't there yet.

  15. Undoing what a bad source caused, from the record alone

    When a source was flagged after the run, the engine undid what it could have caused, using undo functions the host supplies, and finished without it, in 156 of 156 runs: 120 scripted, and 36 live Haiku 5.5 runs, 24 of them with the compromise forced. The live runs were rerun after an engine fix; the first 12 had 2 worlds missing benign effects. The engine version is not recorded in the public rows.

  16. Why we rebuild an agent's context instead of appending to it

    What rebuilding context from a record changes, in plain terms, and the limits of what we have measured so far.