Skip to content

OpenAI Responses streaming text is duplicated in terminal events Claude Code

Quick fix

Temporarily avoid duplicate output by changing the provider API Format to OpenAI Chat Completions (openai_chat).

Error output
OpenAI Responses 流式文本在终态事件中被重复输出
English translation

OpenAI Responses streaming text is duplicated in terminal events.

When Claude Code uses `openai_responses` through CC Switch, normal streaming deltas have already output text. Some compatible gateways use incomplete or inconsistent correlation keys in terminal events, so `missing_suffix()` cannot identify sent content and forwards the full text again.

The reporter identified a specific trigger combination: `reasoning` appears before `message` in the stream, terminal `output` omits `reasoning`, and the terminal message has no `id`. The original post suggested content-aware resend logic, but the issue remains open and has no verified official fix.

  1. Change this provider's API Format to OpenAI Chat Completions (`openai_chat`) and avoid the `openai_responses` format.

  2. If `openai_responses` is required, the original post provides no verifiable official solution. Follow #6756 for progress on terminal text resend logic and regression tests.

ToolClaude Code
VersionUnknown
PlatformsUnknown

(No FAQ yet)

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.