T10 long threads on a real model. The x86 server guest, 2026-11-15.
Model qwen3:4b-instruct-2507-q4_K_M via ChatOllama 1.1.0, temperature 0, seed 42, num_ctx 8192 (set explicitly), num_predict 160 for the agent, 512 for the summary model (the same model). Ollama 0.31.1 on CPU, one request at a time. Nothing else used Ollama during the four runs.
Stack: create_agent (langchain 1.5.0, langgraph 1.2.22), PostgresSaver on PostgreSQL 16.15, default durability, one thread per variant. Script t10r_long.py; t10r_summarize.py writes 09-summary-table.txt; t10r_probe_after.py ran the late probes of the none variant.
System prompt: "You are a helpful assistant. Answer in one short sentence. Use the add tool for every addition."

Turn plan. Turns 1-5 state five facts (code word ORCHID-7, order number 73914, cat Pixel, city Lisbon, budget 4250 dollars). Then a cycle of three: a plain question, one add call, two parallel add calls (random 3-digit numbers, seed 42).
Quality: each add turn passes when the final answer holds every sum and the tool ran once per addition. Every 25 turns the script asks five recall questions, one per fact, on a fork of the thread (invoke with the checkpoint_id of the main line), so the probes never enter the main conversation. The main line passes its checkpoint_id on every turn.
Recorded per turn: latency, every model call (client ms, Ollama prompt tokens and eval times, request message count, an approximate token count, orphaned ToolMessages), summary calls and their time, framework ms (turn minus model and summary time), and every 10 turns the bytes of the thread in Postgres (checkpoints JSON + blobs + writes), minus the bytes the probes added.

Turn count chosen: 200 per variant. Reason: a rate probe of 40 turns of the none variant (00-rate-probe.jsonl) ran at about 6 s per turn with probes, median turn 5.7 s, and the prompt grew by about 90 tokens per turn, so an 8192-token context fills near turn 90. 2,000 turns would take more than 3 hours per variant even at that rate, and much longer once the context fills. 200 turns is more than twice the fill point and fit a budget of about 70 minutes per variant (a deadline in the script). The none variant hit that deadline at turn 94 (see below).

n: one run per variant, 200 turns (none: 94 turns). Recall: 8 probe points x 5 facts per summarizing variant; none: 3 probe points in the run, plus 4 late probes after the deadline (02-none-probe-after-deadline.log).

Results
- msgs20_keep1 (trigger 20 messages, keep 1): 39 summaries (every 5 turns). Turn p50 5.4 s without a summary call, 57.3 s with one (summary call p50 51 s, about 1.7k prompt tokens). Largest request 1,219 tokens, 19 messages. Add turns 103/130 pass: the sums were right in 129/130, but in 26/130 the model answered without calling the tool. Recall 5/5 to turn 75, then 4/5 at turns 100-200: the code word was lost from the summary ("I do not have access to any code words..."). Thread 6.40 MB at turn 200.
- msgs60_keep7: 13 summaries (every ~14 turns). Turn p50 5.5 s without, 55.2 s with a summary call (summary p50 44 s). Largest request 2,146 tokens, 59 messages. Add turns 126/130 (4 failures were wrong arguments, e.g. a negative number the user never gave; the tool ran 130/130). Recall 5/5 at all 8 probes. Thread 12.42 MB at turn 200.
- tok6000_keep1500: 4 summaries (turns 65, 105, 144, 184). Turn p50 7.5 s without, 108 s with a summary call (summary p50 85 s, about 5.2k prompt tokens). Largest request 5,985 tokens. Add turns 130/130. Recall 5/5 at turns 25 and 50, then 0/5 at every probe from turn 75 to 200: after the first summary the model said it did not know any of the five facts. Thread 38.00 MB at turn 200.
- none: Add turns 59/59, recall 5/5 at turns 25, 50, 75. Turn p50 5.8 s in turns 1-50. The prompt reached the 8192 context at turn 88 (Ollama prompt tokens 8,191). From turn 88 every model call took about 300 s (prompt eval ~300 s; before, the cached prefix kept prompt eval at 2-5 s), so turns took 308-621 s and the run stopped at its deadline after turn 94. The answers stayed correct, but the late probes on the last checkpoint (336 messages, about 8,300 tokens by the approximate count) gave 0/4: code word, order number, cat name and city all came back "I don't know". The fifth probe failed with ollama ResponseError 400 "request (8192 tokens) exceeds the available context size (8192 tokens)". So Ollama cut the oldest messages silently on 4 requests and refused the fifth. Thread 20.52 MB at turn 90.
- Orphan ToolMessages in model requests: 0 in all 1,143 model calls (issue #38352 not seen). Errors in main turns: 0.
- Framework time per turn (turn minus model and summary calls): p50 18.9 to 24.7 ms in all variants. The model was 99% or more of every turn.

Changes against the fake run (2,000 turns, fake model, no delay): the shape holds (without a limit the context grows, with a trigger it stays bounded; storage grows linearly either way). New with the real model: the cost of a summary is a model call of 44 to 85 s on this CPU, so with a trigger the median turn stays flat but every 5th to 40th turn is 10 to 15 times slower; a summary can drop facts (code word lost under msgs20_keep1; all five facts lost under tok6000_keep1500), so a smaller context is not free in quality; without summarization the real limit is the model context, where Ollama first truncates silently (facts lost, each call 300 s on CPU because the cache no longer matches) and then refuses with HTTP 400.
Rows not to use: the probes of 01-turns-*.jsonl are on forks of the thread and their bytes are subtracted from main_total, so use bytes.main_total for thread size. 00-rate-probe.jsonl is a separate 40-turn thread used only to choose the turn count. Only one run per variant: read the times as one sample each.
