Fix Codex transcript convergence
This commit is contained in:
1 parent
f9c8f640ce
commit
3c19b5a9bb
9 files changed
+192
-48
No files matched your search
@@ -113,6 +113,10 @@ seq N", so there is no separate history path to drift from the live one.
|
||||
- `UserMessage { text }` — echoed into the transcript **by the manager, not
|
||||
by drivers**, so every device renders the conversation from one stream.
|
||||
- `AssistantText { delta }` — streaming text, rendered as markdown.
|
||||
- `AssistantTextFinal { text }` — the provider's authoritative value for the
|
||||
open assistant message. It replaces its preceding provisional deltas while
|
||||
remaining an append-only transcript event, so live SSE, replay and paging
|
||||
converge on the same words.
|
||||
- `ToolStart / ToolUpdate / ToolEnd { tool, input, output }`.
|
||||
The tool vocabulary is common too (2026-09-09), not just the envelope:
|
||||
Codex's `/usr/bin/bash -lc` argv and Claude's Bash call are both
|
||||
@@ -247,13 +251,13 @@ remains the turn's usage. If an older common transcript has no such event yet,
|
||||
the server seeds the same measurement from the last `token_count` in Codex's
|
||||
own rollout, including when that rollout is on an SSH setup.
|
||||
|
||||
App-server assistant text comes only from its durable
|
||||
`item/agentMessage/delta` notifications; the full text on `item/completed` is
|
||||
always the consolidated copy and is ignored. This is decided from the dialect,
|
||||
not an in-memory set of ids: after a backend restart, the previous deltas can
|
||||
be behind the persisted stdout cursor while the completion is still ahead,
|
||||
and forgetting which ids streamed used to append the complete message after
|
||||
its already-recorded prefix.
|
||||
App-server's `item/agentMessage/delta` notifications are provisional: safety
|
||||
buffering can revise their words before `item/completed` supplies the durable
|
||||
text. The driver records that completion as `AssistantTextFinal`; the phone
|
||||
replaces the open message both live and on replay. A distinct append-only event
|
||||
also makes adoption safe: if a backend restart falls between the deltas and the
|
||||
completion, the correction is still meaningful without process-local memory
|
||||
of which item ids streamed.
|
||||
|
||||
### The llama driver
|
||||
|
||||
|
||||
Reference in new issue
Block a user