github / github/copilot-cli

Frequent websocket_error: Duplicate item found (fc_call_* replay from session-state)

オープン
#3,559 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:context-memory area:sessions
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

## Summary
I am repeatedly hitting this failure in Copilot CLI:

```
Execution failed: CAPIError: 400 {"error":{"code":"bad_request","type":"websocket_error","message":"Duplicate item found with id fc_call_<...>. Remove duplicate items from your input and try again."}}
```

This appears to be session-state replay/corruption of prior `fc_call_*` items. Once it starts in a session, subsequent prompts in that same session fail quickly with the same duplicate-id error.

## Frequency (from local `~/.copilot/session-state/*/events.jsonl`)
- Sessions affected: **10**
- Duplicate-item error events: **29**
- Time window observed: **2026-05-28 ~18:46Z to ~19:43Z**
- Worst session: `3604526b-3b17-4790-b5f5-9d4359783706` with **15** events in ~4.5 minutes

Additional affected sessions:
- `893105c9-9726-497f-a54c-c384bd5b51b3` (3)
- `6257b848-6652-450c-b949-b8d0477d3b56` (2)
- `63d34bda-bddd-4246-aca5-5258e94d88dd` (2)
- `ce4e9dd9-bca8-4181-ac70-7c398be8e204` (2)
- plus 5 more sessions with single occurrences

## Repro pattern
1. Normal interaction with tool calls.
2. A turn fails with duplicate `fc_call_*` id.
3. Retrying in the same session keeps failing with duplicate-id style websocket 400s.
4. Only workaround is deleting the bad session directory or resetting session-state.

## Impact
This happens frequently enough to materially disrupt use; repeated manual session resets are not productive.

## Environment
- Copilot CLI version: 1.0.54
- OS: macOS (Darwin)

Please advise on mitigation and whether a client-side de-dup guard can be added before sending websocket payload items.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start by examining the session data under ~/.copilot/session-state/*/events.jsonl and reproduce the duplicate fc_call_* failure with Copilot CLI 1.0.54 on macOS. Trace how session-state items are replayed into websocket payloads; done means affected sessions no longer resend duplicate IDs and the existing recovery or reset behavior is covered by verification.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
macos
領域
cli
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。