We build Argentic, so weigh what we say about it. It is one of the three stacks reported in this post, and it did not win on score. Every Argentic number names the engine version it came from.
If you run a LangChain or LangGraph agent for hours, the first thing that changes around hour 6 is probably the size of its prompt. People call what follows context rot; we call it context degradation, and it is an agent getting less accurate as a long run grows. We wanted to see what that does to the bill and to the answers, so we ran one simulated 12-hour shift through five stacks and logged every model call. Two of the five, LangChain Deep Agents and the Claude Agent SDK, ran without the memory setup their own documentation recommends, so on 28 November 2026 we withdrew their results and this post does not report them. We have no comparison against either that stands, and a rerun with each stack's recommended setup is pending. The three stacks below are LangChain, Letta and Argentic. Argentic is an engine that keeps AI agents right for hours while prompt size is bounded.
What did we run?
One shift at a bakery's operations desk: orders, price changes, stock counts, owner messages, standing instructions that get amended or revoked, and updates that contradict earlier ones. A fixed program with no model in the loop grades its questions, and 403 of them fall in hours 1 to 8, the hours Letta and Argentic ran in full. Every stack got the same seed, the same questions, the same grader and the same model, and each had a spend cap. Nothing was tuned. This was 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).
The stacks reported here were a plain LangChain agent loop at its defaults, Letta with its memory tools on, and Argentic. We ran the JavaScript packages, so the Python versions are not measured here.
| Question | Argentic 0.104.1us | Letta 0.34.67 | LangChain 1.6.7 |
|---|---|---|---|
| Spend | $2.24 ($0.75 model spend plus $1.49 in step fees at the $1 per 1,000 agent steps rate listed on 25 November 2026) | $8.02, a floor: its cap stopped it | $5.09, a floor: its cap stopped it |
| Where it stopped | Finished all 12 hours. | Its $8.00 spend cap, in hour 10. | Its $5.00 spend cap, in hour 6. |
| Score, hours 1 to 8 | 0.87 | 0.89 | None: stopped before hour 8. |
| Calls over 100K tokens | 0 of 1,487 | 809 of 1,232 | 47 of 580 |
| Largest prompt | 55K tokens | 269K tokens | 109K tokens |
Spend is token usage at list prices, not an invoice. A stack stopped by its cap has a spend that is a floor, not what finishing would have cost.
What does hour 6 look like?
Letta and LangChain each sent a prompt over 100K tokens between hour 5 and hour 6 of the shift (Claude Haiku 5.5, 25 November 2026). Argentic's largest prompt was 55K tokens, and none of its calls went over 100K (engine 0.104.1).Letta sent 809 of its 1,232 calls over 100K tokens, and its largest prompt was 269K. The plain LangChain loop sent 47 of its 580 calls over 100K before its spend cap stopped it in hour 6, and its largest prompt was 109K (Claude Haiku 5.5, 25 November 2026).
Over hours 1 to 8, the stretch Letta and Argentic both ran in full, Letta scored 0.89 and Argentic 0.87 on its first run, with 0.86 to 0.89 across its four runs. Letta scored higher than Argentic's first run and matched the top of its range. Argentic spent less: $0.75 in model spend, or $2.24 with its step fee counted, against Letta's $8.02, which is a floor because its $8.00 cap stopped it in hour 10. Which matters more depends on your agent and your budget.
Letta is ahead of Argentic on 5 of 8 kinds, by the most on commitments (0.65 against 0.35). Argentic is ahead of Letta on 2 of 8, by the most on recall at distance (0.81 against 0.74) and contradictions caught (0.05 against 0.01).How do I check whether my own loop crosses the line?
You need the prompt size of every call. LangChain puts it on the response message as usage_metadata. This callback writes it to a file, one line per call:
import json
from langchain_core.callbacks import BaseCallbackHandler
class UsageLog(BaseCallbackHandler):
def __init__(self, path="usage.jsonl"):
self.path = path
def on_llm_end(self, response, **kwargs):
for generations in response.generations:
for g in generations:
u = getattr(getattr(g, "message", None), "usage_metadata", None)
if u:
with open(self.path, "a") as f:
f.write(json.dumps({"input_tokens": u["input_tokens"]}) + "\n")
Pass it with config={"callbacks": [UsageLog()]} on your agent's invoke call. Check one call by hand to confirm that input_tokens includes cached tokens for your provider. Then summarise the file with jq:
jq -s '
[.[] | .input_tokens] as $p
| { calls: ($p | length),
over_100k: ($p | map(select(. > 100000)) | length),
first_over: ((($p | map(. > 100000) | index(true)) // -1) + 1),
largest: ($p | max) }
' usage.jsonl
first_over is the call number where you first crossed 100K, and 0 means you never did. Other models price long prompts differently, so check your model's price page for a step like this before you trust any estimate.
How do I keep the prompt down?
There are three common ways. You can cap how much history you send, which is simple but forgets whatever you cut. You can add a summarizing step, which keeps the gist but rewrites history, so details can degrade each time it runs. We did not measure that loss here. Or you can move long-lived facts out of the transcript and look them up when the agent needs them. Context degradation covers what each costs.
Argentic takes the third route. It builds each prompt from a record of the run, under a size cap, so the prompt stays small without throwing the record away.
What does this not show?
On one 12-hour Longshift shift (seed 20261217, Claude Haiku 5.5, Argentic four runs, the others one each), Argentic on engine 0.104.1 finished for $0.75 in model spend ($2.24 with its step fee counted), while Letta ($8.02) was stopped by its $8.00 spend cap in hour 10 and LangChain ($5.09) by its $5.00 cap in hour 6, both at their stock settings. Over hours 1 to 8, which Letta ran in full, Argentic scored 0.87 on its first run and 0.86 to 0.89 across its four runs on this seed and engine (mean 0.87), and Letta scored 0.89 (at the top of that range); the later hours were not asked of the stopped ones, so nothing is compared there. The seed was new: no earlier Argentic run had used it.It is one seed, and the benchmark's own guide asks for at least three. Runs per stack: Argentic four runs, the others one each, so a rival's score carries noise we have not measured. Letta and LangChain were stopped by spend caps before the shift ended. The rivals ran on the Anthropic API and Argentic on a local copy of the hosted engine. The raw files for every run, with a SHA-256 for each, are on the head-to-head page, and the benchmark and its rerun commands are in open-haul-bench. Argentic's own prompts and internal logs are not published. We have no comparison against LangChain Deep Agents or the Claude Agent SDK that stands, and the rerun with their recommended memory setup is pending.
Short answers
- What happens to a long-running LangChain agent after hour 6?
- On our 12-hour shift Letta and the plain LangChain loop sent prompts over 100K tokens in hour 5 or 6, and every call after that carried that size. The plain LangChain loop reached its spend cap in hour 6.
- Is this context rot?
- It is the symptom people call context rot, which we call context degradation: an agent getting less accurate as its prompt grows over a long run. We measured prompt size, spend and score on one shift. We did not isolate the cause of any one wrong answer.
- How do I check whether my own agent crosses the line?
- Log input_tokens on every model call with a callback, then count the calls over 100K tokens and find the first one. The post has the callback and a jq command.
- Did Argentic win?
- No. It spent the least of the stacks reported, and Letta scored higher over hours 1 to 8 (0.89 against 0.87 for Argentic's first run, at the top of the range of its four runs). The post says what the run does not show.
- Why does this post leave out LangChain Deep Agents and the Claude Agent SDK?
- Both ran this shift without the memory setup their documentation recommends, so we withdrew their results on 28 November 2026. We have no comparison against either that stands, and the reruns with each stack's recommended setup give no comparison: Deep Agents with its memory option has no score, and the Claude Agent SDK with memory ran once, at the smaller window.
Sources and method: Head-to-head on a 12-hour shift.