PaPoo
cover

TelemetrySafeError: VirtualMessageList: itemKeys/messages le が出るときに見えていたもの

この件は、まず「自分のケースかどうか」を切り分けるのが先です。報告されているのは、同じエラー文字列を含む 2 件の issue で、どちらも Opus 5 の安全フィルタまわりで誤検知が起きた、という内容でした。

両方に出ているエラーは同じです。

TelemetrySafeError: VirtualMessageList: itemKeys/messages length desync (keys=126 messages=125 range=[118,126))
    at nPv (/$bunfs/root/src/entrypoints/cli.js:23184:8181)
    at NAm (/$bunfs/root/src

この文字列だけを見ると、itemKeysmessages の件数がずれている、という内部不整合に見えます。ただし、issue の本文から読み取れる範囲では、最終的に「CLI の一般的な壊れ方」なのか「Opus 5 の安全スキャン経由で出る誤検知」なのかは切り分けきれません。少なくとも、報告者は同じエラーを、連続リクエスト時の誤検知として受け取っています。

筆者の環境では、Claude Code CLI は次の状態でした。

$ 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.

ここで確認できるのは、native (2.1.207) が動いていて、同時に npm-global の古いインストールが残っていたことです。claude doctor はそれを警告しています。ですが、今回の TelemetrySafeError とその残存インストールが直接つながるかどうかは、提示された一次情報だけでは分かりません。少なくとも、健全性チェック上は「複数インストールがある」という事実はあります。

現時点で書けるのはここまでです。
この症状について、issue 上で確立した恒久対処は読み取れませんでした。[#87541](https://github.com/anthropics/claude-code/issues/87541) は closed ですが、与えられた本文だけでは何が直ったのか分からず、[#87543](https://github.com/anthropics/claude-code/issues/87543) は open のままです。

もし同じ文字列が出ていて、しかも Opus 5 を使った連続リクエストの直後に起きるなら、今回の issue 群とかなり近いケースだと思われます。逆に、その条件に当てはまらないなら、少なくともこの 2 件だけからは同一原因だと断定できません。


検証環境

claude --version : 2.1.207 (Claude Code)
OS          : Darwin 25.3.0 (arm64)
Python      : 3.14.2
検証日時    : 2026-08-19T02:01:01+09:00

参照した Issue(anthropics/claude-code): #87543, #87541

同じ著者の記事