Skip to content

finish_reason: "stop" and no tool_calls, Codex

Quick fix

The original post provides no verifiable solution; the issue was reported only in the cc-switch and Codex Chat Completions conversion chain.

Error output
模型在 agent loop 多轮交互后,突然返回 `finish_reason: "stop"` 且不生成 tool_calls,导致 Codex 认为任务已完成而停止。
English translation

After multiple rounds in the agent loop, the model suddenly returns `finish_reason: "stop"` without generating tool_calls, causing Codex to consider the task complete and stop.

The report states that when using an upstream provider that supports only `/v1/chat/completions` through the Responses→Chat→Responses conversion chain in cc-switch + Codex desktop, the model directly returns `finish_reason: "stop"` without `tool_calls` after more than ten tool-call rounds in the agent loop. Codex then treats the task as complete; the reporter can only manually enter “continue” to resume.

The interruption did not occur with the same model in Claude Code, WorkBuddy, or Hermes, so the reporter limited the scope to the cc-switch + Codex desktop combination. The original post provides no confirmed root cause or verifiable fix. Although the issue is closed, its label is `question`, so it cannot be considered fixed.

  1. The original post does not provide a verifiable solution; follow the discussion and later updates in Issue #4966.

ToolCodex
Versionv3.16.5(报告的受影响版本)
PlatformsWindowsmacOS

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