Skip to content

openai-codex provider: pipe-delimited tool call IDs written to transcript break Codex API validation #35528

@aurelius-lynyx

Description

@aurelius-lynyx

Summary

When using the openai-codex provider, tool call IDs are written to session transcripts as compound pipe-delimited strings (e.g. call_LfY3urEtRi084Bpt2xnm9MjO|fc_07c5279fe4cc6c630169a4995d1e4881969b0c0467ae5301ae).

The Codex API strictly requires IDs to match [a-zA-Z0-9_-]+. The pipe character (|) causes every subsequent API request to fail with a non-recoverable error:

{"type":"error","error":{"type":"server_error","code":"server_error","message":"An error occurred while processing your request..."}}

or more specifically a string_pattern_mismatch on the input[N].id field.

Impact

  • Persistent, 100% reproducible failure — once the transcript contains a bad ID, every future request fails because the full history is replayed to the API
  • Agent appears broken; errors look like transient OpenAI outages but are not
  • Requires manual transcript surgery to recover

Repro

  1. Configure an agent with model: openai-codex/gpt-5.3-codex
  2. Have the agent invoke several tools
  3. Inspect session transcript — tool call IDs will contain | separators
  4. All subsequent messages to that session will return server_error

Expected

Tool call IDs stored in transcripts should only contain [a-zA-Z0-9_-] characters. The fc_... portion (or the call_... prefix) should be chosen as the canonical ID, not a pipe-joined compound.

Workaround

Strip the |fc_... suffix from all id and tool_use_id values in affected .jsonl transcript files.

Environment

  • OpenClaw 2026.2.26 (bc50708)
  • Provider: openai-codex
  • Model: gpt-5.3-codex
  • Observed in agent: developer (Rho)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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