copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Duplicate Item Errors

Open psulightning opened this issue 6 months ago • 5 comments

Describe the bug

After initial prompt during processing, I receive errors of this format: Execution failed: CAPIError: 400 {"error":{"code":"bad_request","type":"websocket_error","message":"Duplicate item found with id fc_call_3L6mbkYELCQh2XxmHQlVommW. Remove duplicate items from your input and try again."}} (Request ID: 00000-63415e69-425e-45d5-8f8b-23bcb99c727d)

With a subsequent prompt, I see this output: ● Request failed (transient_bad_request). Retrying...

● Request failed (session_token_refresh). Retrying...

● Request failed (session_token_refresh). Retrying... ✗ Execution failed: CAPIError: 400 Duplicate item found with id fc_call_3L6mbkYELCQh2XxmHQlVommW. Remove duplicate items from your input and try again. (Request ID: 5CA2:F9304:7D0A:8E64:6A189465)

I have quit the session and resumed, cleared the session, and quit and started fresh. I have switched between GPT-5.4, Sonnet 4.6 and auto and still receive errors.

Affected version

GitHub Copilot CLI 1.0.54

Steps to reproduce the behavior

  1. copilot cli in interactive mode
  2. use an agent defined at user-level
  3. run prompt

Expected behavior

No duplicate request errors

Additional context

macOS Tahoe 26.5 zsh shell gh installed via homebrew

psulightning avatar May 28 '26 19:05 psulightning

Confirming this from a different setup. Reliably reproducing today (2026-05-28) against models gpt-5.5 and gpt-5.4 in a GitHub Actions runner via Copilot CLI invoking a custom skill. Error fires on the very first skill(...) tool call, after two transient_bad_request retries. Three back-to-back runs, three different fc_call_* IDs, same Duplicate item found outcome each time. No prompt / agent / skill changes vs. a successful run on 2026-05-19, so the trigger appears to be entirely server-side.

tjaensch avatar May 28 '26 19:05 tjaensch

I'm suspecting this is linked to a Copilot outage here based on when we started seeing the same issue: https://www.githubstatus.com/incidents/rhqcgg8lg6mm

But, perhaps Copilot CLI could be patched to show a more useful error message if it's a cloud issue in the future.

collinbarrett avatar May 28 '26 19:05 collinbarrett

I’m seeing the same issue on Windows with Copilot CLI 1.0.54.

I fully reset local state by deleting %LOCALAPPDATA%\copilot and reproduced it again from a clean start, so this does not seem to be caused by stale session data on disk.

I also did not install any extra plugins or custom MCP servers. The logs only show the built-in remote github-mcp-server.

In my case, the failure happens during task/subagent execution, and after the first error the CLI retries with the same exact fc_call_* id (fc_call_hQX8mWYeH4kmsw1OFJWCHKec).

That makes it look like a CLI runtime/retry bug where an already-used tool/function-call item is being re-sent from in-memory agent state.

If useful, I can share the relevant log excerpt showing repeated WebSocket 400 errors for the same fc_call_* id.

yuriyp avatar May 28 '26 20:05 yuriyp

I am seeing the same issue via the Python Copilot SDK

async with await client.create_session(session_config) as session: 
  for prompt in prompts: 
    response = await session.send_and_wait({"prompt": prompt}, timeout=6000)

This failed for me when the session config had {"streaming": True} The same sequential same-session flow appears to work after changing to {"streaming": False}

eavidan avatar Jun 14 '26 16:06 eavidan

This appears to be resolved as of GitHub Copilot CLI v1.0.114. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.

copilot-cli-bot[bot] avatar Nov 21 '26 09:11 copilot-cli-bot[bot]