We build Argentic, so weigh what we say about it. We read each tool's own documentation on 27 November 2026 and quote only what it says. Every Argentic number names the engine version and model it came from.
What we ran ourselves
We ran Argentic, Letta and LangChain on the 12-hour head-to-head shift (Claude Haiku 5.5, seed 20261217, Argentic four runs, the others one each, 25 November 2026, Argentic on engine 0.104.1), each on the setup the run post lists for it.
Of the tools this page compares, we ran LangChain. We have not run OpenAI Agents SDK yet, so we make no claim about accuracy against it. Our results against Claude Agent SDK and LangChain Deep Agents are withdrawn (Superseded 28 November 2026), so we make no claim about accuracy against them until a rerun is published.
An agent works for a while, its context window fills, and something replaces the old history with a summary. Afterward it asks a question you already answered, repeats a step it finished, or breaks a rule you gave it at the start. The summary usually reads fine. It names the goal and the main steps. What went missing is one small, specific thing, and nothing tells the agent that it is missing.
This page covers what the common stacks do when the window fills, what you can do inside each of them, where our own results stand, and when the answer is to change who builds the prompt.
What does each stack do when the window fills?
They differ in three ways that matter for forgetting: what starts the cut, what replaces the old history, and whether the old history is still somewhere the agent can look.
| Question | Claude Agent SDKAnthropic | LangChain Deep Agentsopen source harness | LangChain summarization middlewarea component you add | OpenAI Agents SDKcompaction session | Argenticus |
|---|---|---|---|---|---|
| What starts it | Automatically, when the context window approaches its limit. Sending /compact as a prompt does it on demand. Claude docs | Three steps, all on by default. A tool result over 20,000 tokens is written to the filesystem at once and replaced by a file path and a preview of its first 10 lines. Past 85 percent of the model's window, older tool calls are truncated. Summarization starts when the context nears the limit and nothing more can be offloaded, at 85 percent of the model profile's maximum input tokens by default. LangChain docs | Only when you set a trigger: a token count, a fraction of the model's context or a message count, alone or combined. With no trigger it does not summarize on its own. LangChain docs | Checked after each turn against a threshold, by default. Overriding should_trigger_compaction to return false turns that off, and you call run_compaction yourself. OpenAI docs | Nothing to trigger. The engine keeps a record of the run and builds each prompt fresh from it under a size cap. our page, our page |
| What takes the old history's place | A summary of the older history. The docs say the most recent exchanges and key decisions are kept, and warn that specific instructions from early in the conversation may not be preserved. Claude docs | A model-written structured summary of the session's intent, the artifacts created and the next steps. The newest 10 percent of tokens stays in full. LangChain docs | A summary of the older messages. The most recent messages stay, and the default is to keep the last 20. LangChain docs | OpenAI's Responses compaction endpoint clears and rewrites the session's history. OpenAI docs | Nothing is replaced. The record is never rewritten or summarized, and each prompt is chosen from it. The engine can choose badly: it still decides what fits. our page |
| Where an old detail is afterwards | The docs describe no copy of the old history that the agent can search. CLAUDE.md content is re-injected on every request, so a rule kept there is not lost. A PreCompact hook lets your own code archive the full transcript before the summary replaces it. Claude docs | A text rendering of the original messages is written to the filesystem as a record, one running markdown file per run. The docs say a detail the summary dropped is recovered by searching the filesystem, so the agent has to go and look. LangChain docs, reference.langchain.com | The page does not say whether the original messages are kept anywhere. Older images and other media survive only as the generated text. LangChain docs | The docs do not say what is dropped or whether the originals are kept. OpenAI docs | The record is still there, and the agent can search the whole of it for an old detail. our page |
| What you can set | Summary instructions you write in CLAUDE.md, a PreCompact hook, and a manual /compact. Claude docs | You can override the summarization middleware, including the model that writes the summary. The docs give the offload and summary thresholds as defaults and do not say whether they can be changed. LangChain docs | The trigger, how much to keep, and how many tokens of the old messages go to the model that writes the summary. LangChain docs | The threshold callback, and the choice to run it by hand. Streaming can stay open a few seconds longer while it runs. OpenAI docs | There is no summary to tune. You can read what each prompt contained. our page |
Two of the four, the Claude Agent SDK and the OpenAI Agents SDK, replace the history and keep no copy the agent can search, as far as their docs say. Deep Agents writes the original messages to a file, so the detail exists but the agent has to go and look for it. LangChain's middleware leaves the question open in the page we read.
Why does a detail go missing?
Whoever writes the summary has to guess what the next hour will need, and guesses once. A fixed amount survives, and the rest is gone from the prompt. If the summary is the only copy, an order number, an amount, a date or a decision that the paraphrase blurred cannot be recovered, and each later cut starts from the last summary, so the loss compounds. Why your agent forgets after compaction goes through six separate causes, and the post on summarizing old context has a test of one of them. Both are dated records from November.
What can you do without changing your stack?
Most of these work on any of the four, and none needs us.
- Keep hard rules where the cut cannot reach them. Put standing rules, IDs and open commitments in the system prompt, in a file your code prints into every prompt, or, on the Claude Agent SDK, in CLAUDE.md, which the docs say is re-injected on every request. A rule that lives only in the first message is the first thing a summary drops.
- Tell the summarizer what to keep. The SDK lets you write summary instructions in CLAUDE.md. LangChain's middleware and Deep Agents let you change the model that writes the summary. A list of the things that must survive costs little.
- Keep the full history somewhere the agent can search. Deep Agents does this by default. On the SDK a PreCompact hook can archive the transcript, and your code has to give the agent a way to read it. A copy nobody searches does not help, so tell the agent in its instructions to look before it says it does not know.
- Cut at a task boundary. A size trigger can fire in the middle of a step. Where the stack lets you, compact by hand between tasks and say what to keep.
- Move subtasks into subagents. A subagent returns only its final answer, so the main agent's history grows by a summary and not by the whole subtask.
How much does a cut history cost in accuracy?
We have no measurement of that for the Claude Agent SDK or Deep Agents that stands. We withdrew our results for both on 28 November 2026. Deep Agents ran without the persistent memory option its documentation recommends, and the SDK ran with context only, with every built-in tool and settings file switched off, so it had no CLAUDE.md. A rerun of each with its recommended memory setup is pending, and this page quotes no score, cost or prompt size for either until those are published. None of the fixes in the list above was in those runs.
The comparison that stands is with Letta. Against Letta, across the two conditions both ran (Claude Haiku 5.5, seed 20261217, one run of each stack in each row, November 27, 2026 to November 28, 2026; Argentic on engine 0.116.3), Argentic was level over 12 hours at a 200K window (engine 0.116.3 0.83 against Letta 0.82, first of two; within 0.03, which one run cannot separate); scored higher over 12 hours at a 100K window (engine 0.116.3 0.80 against Claude Agent SDK with memory 0.62 and Letta 0.59, first of three). With its step fee counted it cost less over 12 hours at a 200K window and cost more over 12 hours at a 100K window. None of these rows has been rerun on the newest engine (0.116.4), so they describe an older build. Each row is its own shift (the events and the question set differ between rows), so compare the stacks within a row and not a stack with itself down the table. Every row is one run of each stack on Claude Haiku 5.5; a gap of a few hundredths in one run is not a result. The smaller-window row sets the window below the model's own to test what a stack keeps once its history has to be cut. It is a test condition, not stock settings.
On its own, Argentic's five-day run is this. Held its score over five working days. Argentic engine 0.116.4: 0.88 on day 1, then 0.83 to 0.88 on each later day. One run on Claude Haiku 5.5 at a 200,000-token window. The window was set to 200,000 tokens, smaller than the model's own; that is a test condition, not stock settings. One run, on Claude Haiku 5.5. Identical runs of one Argentic engine on a 108-hour shift at a 200,000-token window have differed by up to 0.09 pooled (2 runs, engine 0.116.1), so a gap that small is noise. This five-day shift has not been repeated, so its own spread is not measured.
A cut history is a problem once a run reaches the cut, and a larger window or a shorter run postpones it.
When is a different loop the answer?
When the run is hours long and the list above stops being enough. Rules you have to keep outgrow a file, the summary instructions grow into a second prompt, and you are building a record of the run and a way to search it.
Argentic is an engine that keeps AI agents right for hours while prompt size is bounded. It runs your agent's loop on our side. Each prompt is built fresh from a record of the run under a size cap. The record is never rewritten or summarized, so there is no summary to lose a detail, and the agent can search the whole record for an old one. The engine still chooses what fits in the prompt, and it can choose badly. The losses in the comparison above are these: With its step fee counted, Argentic cost more than Letta over 12 hours at a 100K window.
It is not a drop-in. You keep your tools and your model key and replace the loop, so the framework's cut, its middleware and its sessions no longer apply. The quickstart shows the shape.
Where is Argentic the wrong pick?
Argentic is hosted, closed source and early. Use something else if the agent is a coding agent that needs the Claude Code tools, if you must self-host or read the code, if the run lasts an hour or two with a person watching, or if you depend on exact running counts: our known issues page says where counts drifted. For a short run, the fixes in the list above are usually enough.
Short answers
- Why does my agent forget things after its context is compacted or summarized?
- Whoever writes the summary has to guess what the next hour will need, and guesses once. A specific number, ID or rule that the paraphrase blurred or dropped is no longer in the prompt, and if the summary is the only copy it cannot be recovered. Each later cut starts from the last summary, so the loss can compound.
- How do I stop my agent forgetting after compaction?
- Keep hard rules and IDs where the cut cannot reach them, such as the system prompt, a file your code prints into every prompt or the Claude Agent SDK's CLAUDE.md. Tell the summarizer what to keep, keep the full history somewhere the agent can search, cut at a task boundary, and move subtasks into subagents. These work on any of the common stacks.
- Do Claude Agent SDK, Deep Agents, LangChain and the OpenAI Agents SDK keep the old history?
- As far as their docs say, the Claude Agent SDK and the OpenAI Agents SDK replace the history and describe no copy the agent can search. Deep Agents writes the original messages to a file, and the agent has to search it. LangChain's summarization middleware page does not say whether the originals are kept.
- How much accuracy does a cut history cost?
- We have no measurement of that for the Claude Agent SDK or Deep Agents that stands. We withdrew our results for both on 28 November 2026 because neither ran with its recommended memory setup, and the reruns do not settle it: Deep Agents with its memory option has no score, and the Claude Agent SDK with memory ran once, at the smaller window. The comparison that stands is with Letta. Against Letta, across the two conditions both ran (Claude Haiku 5.5, seed 20261217, one run of each stack in each row, November 27, 2026 to November 28, 2026; Argentic on engine 0.116.3), Argentic was level over 12 hours at a 200K window (engine 0.116.3 0.83 against Letta 0.82, first of two; within 0.03, which one run cannot separate); scored higher over 12 hours at a 100K window (engine 0.116.3 0.80 against Claude Agent SDK with memory 0.62 and Letta 0.59, first of three). With its step fee counted it cost less over 12 hours at a 200K window and cost more over 12 hours at a 100K window. None of these rows has been rerun on the newest engine (0.116.4), so they describe an older build.
- When should I change the loop instead of tuning the summary?
- When the run is hours long and the fixes stop being enough, because the rules you need to keep outgrow a file and the summary instructions grow into a second prompt. Argentic builds each prompt from a record of the run under a size cap and never rewrites or summarizes the record, so there is no summary to lose a detail. It is hosted, closed source and early, and a short run rarely needs it.
Sources and method: Head-to-head on a 12-hour shift.