[BUG] User messages selectively vanish from terminal display; assistant output sometimes duplicated (CJK input, Windows Terminal, v2.1.218)
Status Open
Reported on v2.1.218
Maintainer reply None cached
Activity 0 comments · opened Jul 24, 2026
Claude Code CLI display bug — session log excerpt (2026-07-24)
Summary (EN)
- Environment: Windows 11 Pro, Windows Terminal, Claude Code CLI 2.1.218, Japanese (CJK) input via IME.
- Symptom 1: User messages selectively vanish from the terminal display mid-conversation. Only user prompts disappear; assistant output never vanishes. Gaps appear in the middle of the visible history (not a scrollback cutoff).
- Symptom 2: Assistant output is sometimes rendered twice (duplicated blocks).
- Timing: The user believes messages disappear when the next turn re-renders the screen (consistent with #40497: visible during loading, gone after the response finishes rendering). Exact trigger not observable from the user side.
- Delivery is unaffected: all vanished prompts were confirmed present in the session JSONL and in a UserPromptSubmit hook log, and the assistant had processed them (deliverables exist). Display-layer only.
- Related: #40497, #41814, #49985, #53492, #59025. This report adds the combination: CJK input / Windows Terminal / user-side-only vanishing / v2.1.218 still reproduces.
Conversation excerpt (EN translation)
User (15:47)
Damn, my prompt vanished from the CLI again. Is the text preserved anywhere?
Assistant
[Tool run: displayed the tail of the UserPromptSubmit hook log — confirmed all three vanished prompts were captured. Log contents redacted (unrelated work).] It's preserved. The line that vanished is recorded in full; you can copy it straight from the hook log file. To sort the situation out: this log is written by a hook at the moment submission succeeds. So submission itself succeeded, and what disappeared is most likely only the CLI's on-screen display. Conversely, if a text is NOT in this log, it died before submission (input-box loss) and exists nowhere, because the hook never fired.
User
No, that's not it. I mean the messages where I talked about redefining the target segments and the product's value, and then told you to add them to the slide deck. Those have disappeared from the CLI display. Are they preserved as text? What hurts is that I can't tell exactly when things disappear.
Assistant
Preserved, completely. All three (15:06:27 / 15:07:45 / 15:10:34) are in the log as raw text. And this time only the display vanished — everything was delivered and processed; the deliverables exist. Nothing was lost. One question to narrow down "can't tell when": is it (a) everything above a certain point is gone (scrollback limit), or (b) specific exchanges missing from the middle (CLI re-render bug)?
User
It's (b) — specific exchanges vanish from the middle, leaving gaps. And only MY prompts vanish. Yours never do, but they sometimes get duplicated. I can't tell exactly when either happens, but my feeling is the vanishing happens on the new turn, when I type the next prompt.
Assistant
That observation is consistent with the mechanism. The CLI redraws the history area every time a new turn starts; the biggest redraw fires when the next prompt is typed, so it's no coincidence the vanishing appears tied to that moment. When the reflow calculation goes wrong, short blocks (a user prompt = a few lines) are easy to drop entirely, while long output gets committed twice — the gaps and the duplication are two faces of the same bug. Lines containing full-width (CJK) characters or images are prone to width miscalculation. [Tool run: claude --version → 2.1.218 / searched GitHub issues] Confirmed — both are known bugs, and the timing hunch is corroborated: - #40497 — only the user's messages disappear, right after the assistant's response finishes rendering (visible while processing, gone when the response completes). - #41814 — messages disappear from display since v2.1.89; scrolling does not recover them. - Duplication reported separately: #49985 (conversation rendered multiple times), #53492, #59025 (sections of output duplicated). Both symptom families remain open across multiple versions; 2.1.218 is newer than the reported versions, so updating is unlikely to fix it.
User
"File a reproduction report on GitHub" — what's the point? Isn't that different from reporting to Anthropic?
Assistant
It's the same thing — anthropics/claude-code is Claude Code's official bug tracker, run by Anthropic itself. Writing there IS reporting to Anthropic's dev team. Honestly the impact is moderate: adding an environment combination not yet in the existing reports (user-side-only vanishing / CJK input / Windows Terminal / on response completion / still reproduces on 2.1.218) gives the developers material to narrow the cause, since bugs get fixed starting from reports with complete repro conditions — but the backlog is large and one more issue guarantees nothing.
Conversation excerpt (JA, original verbatim; tool outputs redacted where noted)
User (15:47)
くそ、また俺のプロンプトがCLIから消えた。テキスト残ってるか?
Assistant
[ツール実行:UserPromptSubmitフックのログ末尾を表示——消えた3件のプロンプトが全件記録されていることを確認。ログの中身は本件と無関係の作業内容のため伏せる] 残ってる。ログの末尾を上に出した(直前の15:46:35に消えた一文が丸ごと記録されてる)。~\.claude\prompt_log\2026-07.txt からそのままコピペできる。 状況を整理しておく:このログは送信が成立した瞬間にフックが書く。つまり送信自体は成立していて、消えたのはCLIの画面表示だけの可能性が高い。逆に、探してる文がこのログに無いなら、入力欄で送信前に消えた型で、その場合はどこにも無い(フックが呼ばれる前だから)。
User
ちげーよ。俺がターゲット層の再設定、そしてプロダクトの価値について話して、そのあと、パワポに追記しろと命じたことだ。それがCLI上から消えているってことだ。それがテキストとして残っているか? さらにどのタイミングで消えるか、こっちにはわからんのが痛いな。
Assistant
残ってる、完全にだ。15:06:27・15:07:45・15:10:34の3件とも生テキストでログにある。そして今回は表示が消えただけで、中身は全部届いて処理も済んでる——成果物(スライド・引き継ぎ文書への反映)が実在する。失われたものはゼロ。痛いのは送信前に入力欄ごと消える型だけで、今回はそれじゃない。 「どのタイミングで消えるか分からん」——切り分けの質問を一つ:消え方は「ある時点から上がまるごと無い」(スクロールバック上限)か、「途中の特定のやり取りだけ歯抜け」(CLIの再描画バグ)か?
User
途中の特定のやり取りだけが歯抜けで消えてる、だ。ちなみに消えるのは俺のプロンプトだけ。おまえのは消えないが、なぜか二重になったりする。いつ消えたのか、いつ二重になるのかは、正確にはわからない。しかし、たぶん次のプロンプト打った時の新しいターンで消えるような気がしている。
Assistant
その観察は筋が通ってる。CLIは新しいターンが始まるたびに画面の履歴領域を描き直す。一番大きな再描画が走るのが「次のプロンプトを打った瞬間」だから、消えるのがそのタイミングに見えるのは偶然じゃない。描き直しの計算がズレたとき、短い塊(ユーザーのプロンプト=数行)は丸ごと落ちやすく、長い出力は逆に二重にコミットされる——歯抜けと二重が同じバグの表と裏だ。全角文字や画像混じりの行は幅計算が狂いやすい。 [ツール実行:claude --version → 2.1.218/GitHub Issueを検索]
Assistant(続き)
裏が取れた。両方とも既知バグで、タイミングの読みまで裏付けがある。 - Issue #40497——ユーザーのメッセージだけが、アシスタントの応答描画が終わった後に消える。処理中は見えているのに、応答が完成した瞬間に消える。 - Issue #41814——v2.1.89以降でメッセージが表示から消える(スクロールしても戻らない)。 - 二重化も別立てで複数報告——#49985(会話が丸ごと複数回描画)、#53492、#59025(出力の一部セクションが重複)。 歯抜け(ユーザー側だけ消える)と二重(アシスタント側が重複)は、それぞれ別番号で報告が積まれてる進行中のバグで、複数バージョンにまたがって未解決。2.1.218は報告版より新しい=アップデートで直る見込みは薄い。
User
「GitHubに再現報告を一本立てる」これなんの意味があるんだ。アンソロピックにあげるってわけじゃないのか?
Assistant
同じことだ。anthropics/claude-codeリポジトリはAnthropic自身が運営してるClaude Codeの公式バグ窓口だ。そこに書く=Anthropicの開発チームに上げる、そのものだ。 意味があるかどうかは正直に言うと「多少」だ。既存の報告(#40497等)に、この環境でしか出てない条件(消えるのはユーザー側のみ・日本語入力・Windows Terminal・応答完成時・2.1.218でも再現)が積まれると、開発側が原因を絞る材料になる。バグ修正は再現条件が揃った報告から順に潰されるからだ。効かない理由も一つ——未処理のIssueが大量に積まれていて、一本足したところで順番が来る保証はない。
---
Log clipped and redacted by mutual agreement: hook-log contents (unrelated work) removed; everything else verbatim from the session.