[BUG] Mid-turn assistant text silently dropped: never persisted to session .jsonl, never shown — but still present in the model's live context
Environment
- Claude Code 2.1.220, CLI on Windows 11 Pro for Workstations (win32)
- Model:
claude-fable-5 - Long multi-tool session (~120k tokens at time of forensics)
Summary
Text the assistant emits mid-turn (followed by further tool calls in the same turn) is sometimes lost end-to-end: it is absent from the session's .jsonl transcript, and the user never saw it. The model's own context still contains the lost text — in later turns it quoted its earlier answers verbatim and believed it had answered — so the live conversation state and the persisted/displayed record diverge silently.
Practical impact: the user asked two substantive questions, the assistant (by its own account) answered mid-turn and continued working, and both answers vanished. The user had to re-ask both, then challenged the assistant to prove it had answered — and transcript forensics proved the opposite.
Forensics
We enumerated every assistant text content block in the 324-row session .jsonl:
- 14 assistant text rows persisted in total.
- Three substantial mid-turn texts the model claims (and its context confirms) it emitted are absent: two long answers to user questions and one status report ending in a question to the user. A raw
grepover the whole file for distinctive phrases from those texts finds zero hits outside the forensic probe scripts themselves. - Five other mid-turn texts from the same session did persist, so mid-turn text is not categorically dropped.
- Adjacency pattern, for what it's worth: each of the three lost texts was immediately followed by a
Bashtool call (all three happened to invoke the same project-ledger CLI); each of the five surviving mid-turn texts was followed by other tool types (Grep/Read/Write/Bash). We can't propose a mechanism where the content of the next shell command matters, and the correlation is confounded (substantive answers attracted that particular follow-up call), but the 3/3 vs 5/5 split is what the record shows. - Two of the three lost texts were responses to messages the user sent mid-turn (the "user sent a new message while you were working" path), which may be relevant.
Expected
Every assistant text block that is generated is persisted to the session .jsonl and rendered to the user — or, if the harness intends to suppress non-final mid-turn text, the model-facing contract should say so and the text should still be persisted for the record.
Related
#47657 ("responses silently dropped — not written to session store", closed stale) describes the same in-memory-vs-session-store divergence on desktop/macOS. This report adds: CLI on Windows, current version, a full-session enumeration method, and the mid-turn/tool-call adjacency detail.