Skip to content

[BUG] Correct quiz answer leaks into the assistant's message (as "umN") — reproducible on Windows, never on macOS #82138

Description

@shibuya4283-oss

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When Claude Code generates a Claude certification practice quiz (multiple-choice, 4 options), the correct answer leaks into the assistant's own message. Right after Claude prompts the user to answer, and before the user responds, the message ends with "um" followed by the correct option number (e.g. "um3" when option 3 is correct). This reveals the answer prematurely and makes the quiz unusable for self-testing. More broadly, it suggests internal assistant-side state can leak into visible output beyond quiz scenarios.

What Should Happen?

Only the question and its options should be shown. The correct answer should never appear until after the user submits their answer.

Error Messages/Logs

Steps to Reproduce

  1. Ask Claude Code to act as a quiz master and give Claude certification practice questions one at a time.
  2. Claude presents a multiple-choice (4 options) question.
  3. Claude prompts the user to answer (e.g. "回答をどうぞ!" / "Please answer!").
  4. Before the user responds, the correct answer appears at the end of the same assistant message as "um" + the option number (e.g. "um3").

Reproduces consistently on Windows. On macOS, the same steps never reproduced it across 100+ trials.
Note: Adding a prompt-level instruction ("do not reveal the answer first") did NOT prevent recurrence (reproduced again on 2026-07-28).

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.220 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Screenshot

Image Q9: right after "回答をどうぞ!" ("Please answer!"), the assistant's message ends with "um3" — and option 3 is in fact the correct answer, shown before the user responded.

Technical evidence

Verified by inspecting the local session JSONL transcript: the "umN" text is part of the same assistant text content block as the question — not a separate message. Cross-checked against the session's recorded submitted-prompt history (last-prompt entries): "umN" never appears there, confirming it was never sent by the user. The revealed digit matched the objectively correct answer in every observed case — including one case where the user's actual answer differed (and was wrong) — which rules out the extension merely echoing the user's predicted input.

Environment comparison

Both machines run Claude Code for VS Code v2.1.220 (identical extension version), so the issue is NOT tied to the extension version. The differing factors are the OS platform and the VS Code host version.

Windows (issue occurs):

  • Claude Code for VS Code: v2.1.220
  • VS Code: 1.128.1 (user setup), commit 5264f2156cbcd7aea5fd004d29eaa10209155d66, 2026-07-14
  • Electron 42.5.0 / Chromium 148.0.7778.271 / Node.js 24.17.0
  • OS: Windows_NT x64 10.0.26200

macOS (issue does NOT occur, 100+ trials):

  • Claude Code for VS Code: v2.1.220
  • VS Code: 1.117.0 (Universal), commit 10c8e557c8b9f9ed0a87f61f1c9a44bde731c409, 2026-04-21
  • Electron 39.8.7 / Chromium 142.0.7444.265 / Node.js 22.22.1
  • OS: Darwin arm64 25.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions