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 UserPromptSubmit hook appends one timestamp per submission to a file.
  • A separate script parses queue-operation entries out of the session transcript.

Findings (one session, 2026-08-11):

  1. The two counts disagree — 14 hook marks vs 17 recorded transcript entries.
  2. A Stop hook's stderr output was recorded verbatim as a user input, including the hook's shell invocation line.
  3. 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.
  4. User messages appear with the literal prefix user attached to the front of the text.
  5. 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.
  6. 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.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗