TelemetrySafeError: VirtualMessageList: itemKeys/messages le が出たときに確認したいことこの症状は、少なくとも今回集めた issue では「Claude Code の実行中に TelemetrySafeError: VirtualMessageList: itemKeys/messages length desync が出る」という形で報告されています。
検索しやすいようにエラー文字列をそのまま書くと、keys=17 messages=16 range=[0,17) のように、itemKeys と messages の件数がずれている例と、keys=109 messages=108 range=[66,109) のように別の件数で出ている例がありました。いずれも同じ症状クラスタとして集まっています。
まず、自分のケースかどうかは「Claude Code の内部エラーとしてこの文字列が出ているか」で切り分けるのがよさそうです。今回の報告に出ているのは、ユーザーのコマンド失敗というより、VirtualMessageList の整合性が崩れたと見えるエラーです。少なくとも issue の本文からは、Shell の PATH 変更のような別の機能不具合と直接つながる説明はありませんでした。後者は同じ症状クラスタに含まれてはいますが、報告されている現象自体は「mid-session の PATH 変更が Bash/PowerShell tool に反映されない」という別内容です。
実際の報告は次のとおりです。
TelemetrySafeError: VirtualMessageList: itemKeys/messages length desync (keys=109 messages=108 range=[66,109))
at A_b (B:/~BUN/root/src/entrypoints/cli.js:14712:8188)
at f8p (B:/~BUN/root/src/
もう一件はこうです。
TelemetrySafeError: VirtualMessageList: itemKeys/messages length desync (keys=17 messages=16 range=[0,17))
at A_b (B:/~BUN/root/src/entrypoints/cli.js:14712
このクラスタには、#79937 と #79627 がありました。#79937 は closed で、コメントでは duplicate として閉じられています。
Closing as a duplicate of #79922 — please follow and 👍 that issue instead so we can track it in one place. If you think this was closed in error, comment here and we'll reopen.
ここで言えるのは、少なくとも #79937 の時点では個別対応ではなく重複扱いに寄せられていた、ということだけです。#79627 は open で、本文では shell tool が session start 時点の PATH を snapshot しているように見える、という指摘がされています。ただし、これは issue 投稿者の観察であって、こちらで再現確認した事実ではありません。
筆者の環境で確認できたのは、Claude Code CLI は 2.1.207 で、claude doctor ではインストール状態に別経路が混在している警告が出ていたことです。これは今回の VirtualMessageList エラーの原因だと断定はできませんが、実機の状態としては共有できます。
$ claude --version
2.1.207 (Claude Code)
$ claude doctor
Claude Code doctor
Running: native (2.1.207)
Commit: bc512d563325
Platform: darwin-arm64
Path: ~/.local/share/claude/versions/2.1.207
Config install method: native
Search: OK (bundled)
Auto-updates: enabled
Auto-update channel: latest
Last update attempt: none recorded
Multiple installations found
- npm-global at /usr/local/bin/claude
- native at ~/.local/bin/claude
Remote Control
Control this session from claude.ai/code or the Claude mobile app
1 warning found
- Leftover npm global installation at /usr/local/bin/claude
Fix: Run: npm -g uninstall @anthropic-ai/claude-code
For a full setup checkup that can also fix issues, run /doctor in a Claude Code session.
現時点で、このエラーに対して issue と実測出力の両方から裏が取れる対処は多くありません。はっきりしているのは、同じ文言の報告が複数あり、少なくとも一件は重複として扱われ、別件では未解決のまま残っていることです。再現時は、表示された keys と messages の数、range、発生時の操作をそのまま控えておくのが有用です。これ以上の原因特定は、手元の情報だけでは分かりません。
claude --version : 2.1.207 (Claude Code)
OS : Darwin 25.3.0 (arm64)
Python : 3.14.2
検証日時 : 2026-08-20T22:39:09+09:00