Skip to content

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

Closed as duplicate

Description

@drapetomaniac

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.

Activity

  1. collinbarrett commented on May 28, 2026

    @collinbarrett

    possible duplicate of #3558

  2. added
    area:sessionsSession management, resume, history, session picker, and session state
    area:context-memoryContext window, memory, compaction, checkpoints, and instruction loading
    on May 28, 2026
  3. added theissue type on May 28, 2026
  4. oughnic commented on May 28, 2026

    @oughnic

    Also hitting this on Windows (both Copilot CLI desktop app and the GitHub.com web agent). The error surface differs slightly from the OP (macOS CLI) — it shows as a top-level UI error rather than a session-state log entry:

    Copilot Error
    Copilot has encountered an unexpected error: [runtime:unclassified] Execution failed:
    CAPIError: 400 Duplicate item found with id fc_call_fY9X7T78A5zCwzKmdhjgE2CU.
    Remove duplicate items from your input and try again.
    (Request ID: CC46:2C22C3:162F936:17D4280:6A189DA5)
    

    Key differences from OP:

    • Reproduces on Windows Copilot CLI desktop
    • Also reproduces in GitHub.com Copilot agent (server-side / cloud) — so the duplication is not purely client-side session-state
    • The fact that it hits both the local CLI and the web agent suggests a server-side session reconstruction issue, not just a local replay bug

    Request ID for GitHub tracing: CC46:2C22C3:162F936:17D4280:6A189DA5

  5. oughnic commented on May 28, 2026

    @oughnic

    Update: local session-state clearing does not resolve the issue.

    After deleting all 19 local session-state directories for the affected repo (~/.copilot/session-state/*), the error immediately recurs on a brand-new session with a fresh duplicate ID:

    CAPIError: 400 Duplicate item found with id fc_call_hGo6TjNXMlfBrJvaSGQCuUbQ.
    (Request ID: 07C0:329977:510E68:57FDB6:6A18A31A)
    

    The previous error used fc_call_fY9X7T78A5zCwzKmdhjgE2CU — so this is not a replay of corrupted local state. The service is generating duplicate tool-call IDs on each new session from scratch.

    This conclusively points to a server-side issue in how the Copilot agent constructs its tool-call message payloads, independent of any client session history.

  6. patniko commented on Oct 26, 2026

    @patniko
    Collaborator

    Thanks for the report! This is the same issue as #3558, so I'm closing this one as a duplicate. Please follow that issue for updates and add any extra details there.

    Triaged as part of a Copilot SDK backlog review, with help from GitHub Copilot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:context-memoryContext window, memory, compaction, checkpoints, and instruction loadingarea:sessionsSession management, resume, history, session picker, and session state

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions