We build Argentic, so weigh what we say about it. We read the Claude Agent SDK'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.
Our results against Claude Agent SDK are withdrawn (Superseded 28 November 2026), so we make no claim about accuracy against it until a rerun is published.
A Claude Agent SDK agent that has worked for a long time starts to forget. It loses an instruction from the first message, asks about something you settled, or repeats a step. The SDK has compacted its conversation, and what it kept was a summary. This page says what the SDK's docs promise, the fixes the docs point to, how to tell that compaction is the cause, and where our own results stand.
What does the SDK do when the window fills?
| Question | Claude Agent SDKAnthropic | Argenticus |
|---|---|---|
| What starts it | Automatically, when the context window approaches its limit. Sending /compact as a prompt does it on demand. Claude 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 | 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 | 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 | There is no summary to tune. You can read what each prompt contained. our page |
The SDK's agent loop page says automatic compaction summarizes older history to free space, and that it keeps your most recent exchanges and key decisions. It also says that compaction replaces older messages with a summary, so specific instructions from early in the conversation may not be preserved. That sentence is the symptom: a rule you gave at the start is exactly the kind of thing a summary drops.
What should you try first?
In this order, because each one costs less effort than the next.
- Move persistent rules into CLAUDE.md. The docs say CLAUDE.md content is re-injected on every request, so it is not subject to the summary. Load it with
settingSources, and keep the rules there and not in the first prompt. Content that stays the same across turns is also prompt cached. - Write summary instructions in CLAUDE.md. The compactor reads it like any other context. The docs give a sample: the current objective and acceptance criteria, the files that were read or changed, test results and error messages, and the decisions made and why. Add the things your agent cannot lose, such as IDs and open commitments.
- Archive the transcript with a PreCompact hook. The hook runs before compaction and receives whether it was manual or automatic. Saving the full transcript keeps the detail, but only helps if your code gives the agent a way to read it back. A file nobody searches changes nothing.
- Log the compaction boundary. The SDK emits a system message with the subtype
compact_boundarywhen it happens. Record it with the turn number, so you know when forgetting could have started. - Send subtasks to subagents. A subagent returns only its final response, so the main agent's context grows by a summary and not by the subtask's transcript.
How do I tell it is compaction?
Compare the symptom with the compact_boundary events. If the agent was right before one and wrong after it, that is the cause. If it was already wrong, look at your tool descriptions and results first. Then run the five-fact test: give the agent a rule, an ID, a number, a name and a decision early, change one in the middle, and ask for all five after each boundary. What it loses names the fix. The test is described here.
What do our results say about the SDK?
We have no comparison with the Claude Agent SDK that stands. Our runs of it used context only: every built-in tool and every settings file was switched off, so it had no file tools and no CLAUDE.md. We withdrew those results on 28 November 2026, and a rerun with the SDK's recommended memory setup is pending. Until it is published, this page quotes no score, cost or prompt size for the SDK. None of the five fixes above was in those runs, so they tell us nothing about what the fixes recover.
What do our own results show?
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.
When do the fixes stop being enough?
When the rules you need to keep outgrow CLAUDE.md, or the run is long enough that the summary of the summary is what the agent reads. Then the question is who builds the prompt.
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. You keep your tools and your model key. Each prompt is built from a record of the run under a size cap, and the record is never rewritten or summarized, so no summary decides what survives and the agent can search the record for an old detail. The quickstart shows the shape. The SDK's loop, its hooks and its sessions do not carry over.
Where is Argentic the wrong pick?
Stay on the Claude Agent SDK if you want Claude Code's own tools, such as reading and editing files and running commands, because that is what the SDK is for. Argentic is not a coding-agent harness. Use something else too 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. Argentic is hosted, closed source and early.
Short answers
- Why does the Claude Agent SDK forget instructions from the start of a conversation?
- The SDK's agent loop page says compaction replaces older messages with a summary, so specific instructions from early in the conversation may not be preserved. It says persistent rules belong in CLAUDE.md, which is re-injected on every request, and not in the first prompt.
- How do I keep context when the Claude Agent SDK compacts?
- Move persistent rules into CLAUDE.md and load it with settingSources. Write summary instructions in CLAUDE.md saying what to preserve, archive the full transcript with a PreCompact hook and give the agent a way to read it, log the compact_boundary message, and send subtasks to subagents.
- How do I know the loss is from compaction?
- The SDK emits a system message with the subtype compact_boundary when it compacts. If the agent was right before one and wrong after it, compaction is the cause. A five-fact test run after each boundary shows what it lost.
- How did the Claude Agent SDK do in our tests?
- We have no result that stands. Our runs of it used context only, with every built-in tool and every settings file switched off, so it ran without file tools or a CLAUDE.md. We withdrew those results on 28 November 2026, Reran once with its file tools and auto memory on, at the smaller window, it has its own run post; the agent never wrote to memory in that run, so it shows the SDK with memory tools available and unused. The fixes above were not tested.
- When is the Claude Agent SDK the right pick, and when is Argentic?
- Stay on the SDK if you want Claude Code's own tools for reading and editing files and running commands. Argentic runs your agent's loop on our side and builds each prompt from a record of the run under a size cap, which helps when the run is hours long and the fixes stop being enough. It is not a coding-agent harness, and it is hosted, closed source and early.
Sources and method: Head-to-head on a 12-hour shift.