Skip to content

tool_calls without matching tool messages causes conversation to freeze #26865

Open

Description

@kakoZeka

环境: Codex CLI (Desktop App)

问题描述:
在对话中,助手回复包含 tool_calls 后,API 返回 "An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. (insufficient tool messages following tool_calls message)",对话卡死,只能关闭重开。

复现频率: 多次出现,尤其在涉及 Obsidian 的对话中。

预期行为:
tool_calls 的响应消息应正确回传,对话正常继续。

实际行为:
缺少对应的 tool 角色消息,API 校验失败,对话不可恢复。

Activity

  1. added
    bugSomething isn't working
    CLIIssues related to the Codex CLI
    tool-callsIssues related to tool calling
    on Jun 7, 2026
  2. github-actions commented on Jun 7, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

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

    CLIIssues related to the Codex CLIbugSomething isn't workingtool-callsIssues related to tool calling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions