Skip to content

Broken assistant message persists after interrupting conversation, making thread permanently unusable #22602

@zgzyq

Description

@zgzyq

What version of the Codex App are you using (From “About Codex” dialog)?

Codex Desktop (latest)

What subscription do you have?

plus

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What issue are you seeing?

After manually interrupting a conversation mid-response, subsequent messages in the same thread fail with: Invalid assistant message: content or tool_calls must be set — the thread becomes permanently unusable. Root cause: #7310 switched to inline response recording. When interrupted mid-stream, an incomplete assistant message (content=null, tool_calls=null) is already persisted. Strict third-party providers reject it. Codex Review Bot flagged this during #7310 review as P1. Related: #7275, #7038

What steps can reproduce the bug?

  1. Configure a third-party OpenAI-compatible API (e.g. DeepSeek V4 Pro)
  2. Start any coding task that involves tool calls
  3. While the model is streaming output or executing tool calls, manually interrupt
  4. Send a new message in the same thread
  5. Error appears

What is the expected behavior?

Interrupted conversations should recover gracefully. Incomplete messages should be cleaned from history before the next request, or partially-recorded items should be rolled back on interruption.

Additional information

Model: DeepSeek V4 Pro, Third-party OpenAI-compatible API

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentIssues related to the core agent loopappIssues related to the Codex desktop appbugSomething isn't workingtool-callsIssues related to tool calling

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions