Firstpass v0.2.1
DocsGuaranteeBenchmarksCLIGitHub

Docs / How Agents Talk to Models / Statelessness & multi-turn

Part A · The core pathModule 3 of 13

Statelessness & multi-turn

The model is stateless, so a chat “remembers” only because the client resends the entire conversation every turn. Turn N re-reads all of turns 1…N−1 as input. Summed over a session, input cost grows with the square of the turn count — the real reason long agent sessions bill far more than their answers suggest.

Here's the twist that surprises people. The model is stateless — it remembers nothing between calls. So how does a chat “remember” what you said three turns ago? The client resends the entire conversation every single turn. Turn 2's request is turn 1's request with the last exchange appended. Turn 12 carries all of turns 1–11 in its body. Continuity lives in the bytes you resend, not in the model.

json
// TURN 1 — one message in the body
"messages": [ { "role": "user", "content": "Does POST /orders reject a missing total?" } ]

// TURN 2 — turn 1 kept verbatim, the reply + your follow-up appended.
// The model re-reads ALL of it as input, and you pay for it again.
"messages": [
  { "role": "user",      "content": "Does POST /orders reject a missing total?" },
  { "role": "assistant", "content": "No — it reads req.body.total unchecked." },
  { "role": "user",      "content": "Now add the guard and a test." }
]

Because the transcript only grows, the input tokens on turn N are roughly N times a single turn's worth. Summed across a conversation, input cost grows with the square of the turn count — the classic reason a long agent session bills far more than its individual answers would suggest.

Across a ten-turn conversation the client resends the entire transcript every turn, so the input tokens billed per turn climb steadily from turn one to turn ten. Small stacks above turns one, five and ten show the transcript growing — turn N carries all of turns one through N. Because each turn re-pays for every earlier turn, the conversation's total input cost grows with the square of the turn count. Every turn resends the whole transcript — so input billed per turn only climbs turn N carries all of turns 1…N · summed, the total grows with the square of the turn count input tok t1 t5 t10 1 turn 5 turns 10 turns resent 10-turn coding session ~1.5k tokens added / turn history re-read ≈ 82k tok ≈ $0.25 just to re-read the past, on sonnet input illustrative — your tokens vary
Statelessness is why context works and why it costs: the client resends the whole thread each turn, so input tokens — and the bill — climb with every message. The stacks show why: turn 10's request carries all ten turns. Nothing here is Firstpass; this is just how chat with a stateless model works.
Under the hood The client isn't obliged to resend everything — it resends whatever it wants the model to still “know.” That's a client decision, not a model feature. Trim the array and the model genuinely forgets: drop the early turns and it can't reference them. Every “memory” strategy — full replay, sliding window, summarize-and-truncate — is just a different rule for which bytes to resend. Keep this in your pocket for Part B: shrinking the resent history is the client's job, not the router's.
Continuity is an illusion the client pays for: it resends the whole transcript each turn, so input — and the bill — grows quadratically over a long session.