User-role messages appear in context that were never submitted by the user (after resume)
Status Open
Reported on v2.1.226
Maintainer reply None cached
Activity 1 comment · opened Aug 10, 2026
Environment: Claude Code 2.1.226, Windows 11, Git Bash + PowerShell.
Summary: Messages appear in the model's context with the user role that the human never typed. I detected this with two independent local hooks and cross-checked them.
Instrumentation:
- A
UserPromptSubmithook appends one timestamp per submission to a file. - A separate script parses
queue-operationentries out of the session transcript.
Findings (one session, 2026-08-11):
- The two counts disagree — 14 hook marks vs 17 recorded transcript entries.
- A
Stophook's stderr output was recorded verbatim as a user input, including the hook's shell invocation line. - An English string resembling an auto-generated conversation title appeared twice as a user message. The entire session is in Japanese; the user types no English.
- User messages appear with the literal prefix
userattached to the front of the text. - Recorded text differs from what the user actually typed — the record contains what looks like a Japanese IME pre-confirmation state (a kana string stored as partially converted kanji/katakana), while the delivered message has the correctly converted text.
- All 7 occurrences happened after
resume. Zero occurrences before resume in the same session.
Impact: In a prior session the model acted on a fabricated approval (a short affirmative that the user never sent) before the user caught it.
Not included: the message contents themselves — they are personal.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗