Skip to content

missing field `call_id`: Codex automation HTTP 400

Quick fix

No verified published fix is available. Normalize orphaned output without call_id during proxy forwarding and retain cross-task message content.

Error output
CC Switch local proxy failed while handling Codex endpoint /responses.
Provider: DeepSeek; model: deepseek-v4-flash; upstream_status: HTTP 400;
cause: Failed to deserialize the JSON body into the target type: input: missing field `call_id`

These reports share orphaned `function_call_output` entries in Codex session history, with no usable `call_id` or no matching preceding `function_call`. Strict upstream validation rejects the whole request; because the entry is resent with the history, reporters observed persistent HTTP 400 after retries. `automation_update` is described as task metadata, with task instructions in a separate `user` message. Output from cross-task `send_message_to_thread` may be the only carrier of task text, so dropping it directly can lose instructions. Local tests mentioned in comments say request-time cleanup can restore affected sessions, but this is not a confirmed published fix.

#6697 also describes persistent session 400, but with a different trigger: an upstream without vision support drops image-only tool output during conversion, leaving unpaired `tool_calls`. This is not the same data shape as a missing `call_id`; use placeholder tool messages or pairing validation to preserve the response relationship. Comments on #7230 mention a proposed PR and conversion strategy, but the original posts remain open, so this cannot be treated as fixed.

  1. The original posts do not provide a verified, published solution. Retain the affected session and proxy request logs, and follow the source discussions for proxy forwarding-layer handling of orphaned `function_call_output`.

  2. For metadata output such as `automation_update` without `call_id`, the discussion suggests filtering during forwarding or locally rejecting empty or missing `call_id`; do not fabricate or reuse `call_id`.

  3. For cross-task output such as `send_message_to_thread` and `create_thread`, do not only filter it. The discussion suggests converting only identified delegated content into a normal `user` message to retain the delivered text.

  4. For image-only tool output when the upstream does not support vision, #6697 suggests sending a text placeholder tool message to avoid leaving unpaired `tool_calls`.

ToolCodex
VersionUnknown
PlatformsWindowsmacOS
Has anyone tried DeepSeek's official method for connecting Codex, and can it avoid this issue?
A reply in the thread says it was tried independently, but the same error still occurred.

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.