History Is Derived
Resume is not 'load the last messages array.' There is no parallel store of history. transcript(record, dialect) is a deterministic, dialect-parameterized fold. A crash leaves an open step, marked interrupt on load, never rewritten. One shared pre-pass runs before any dialect renders: prior thinking is downgraded to text because no dialect replays unsigned thinking natively — a silent drop would lose context the operator watched. Orphan calls get synthetic error results. Opaque attachments render only to their own dialect; a cross-dialect fold drops them and records that drop once per unique item.
Every outbound request then passes a positional call/result validator before it is recorded or transported. If the model emitted three calls, the next request has to carry three results in that order. A missing positional result is not a style bug. It is how a model starts answering the wrong call.
Compaction Is a Marker, Not a Rewrite
When a local window fills, a summary lands once in a content-addressed artifact. A compaction marker names the summary, the first kept sequence, and the coverage. Resume refolds as summary fragment plus the retained operator suffix. Record bytes are not deleted. A marker that cannot fit its own window or does not reduce context is ignored during refold. The trailing operator prompt is excluded from the summarizer request because feeding it lets conversational momentum hijack the summary — measured, then fixed.