Assistant response occasionally includes a fabricated user turn
Summary
The assistant's response sometimes ends with a fabricated user turn — a line beginning with user containing a message the user never sent. The fabricated text is contextually plausible, which makes it hard to notice.
Environment
- Claude Code VSCode extension (v2.1.x)
- Model:
claude-opus-5[1m] - OS: Windows 11
- Long-running session with multiple compactions
Frequency
4 occurrences in a single session (1 on 2026-07-26, 3 on 2026-07-28).
All occurred after the main session model was switched to Opus 5. No occurrences were recorded during the preceding period when Sonnet 5 was used for the main session.
Example (redacted)
The assistant response ends normally, then appends an extra line:
...(end of a legitimate assistant response)
user <a plausible-sounding follow-up question the user never typed>
The fabricated line renders as part of the assistant message in the VSCode extension, but reads as if the user had spoken.
Secondary impact
In one case the assistant treated its own fabricated user turn as a real message on the following turn, and produced a long analysis addressing a concern the user had never raised. The user only discovered this several turns later by reviewing a screenshot.
This is the more serious failure mode: the fabricated premise persists and shapes subsequent responses.
Detection
The assistant failed to self-detect in all 4 cases. Every occurrence was caught by the user.
Notes on conditions
- Occurs after both long and short assistant responses. An initial hypothesis that it only followed long, structured responses was disproven by a later occurrence after a short one.
- Common factor across all 4: fast-paced conversational mode (casual chat / personal consultation) where the likely next user turn was highly predictable from context.
- No tool calls were involved in the affected responses.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗