Skip to content

Codex (openai-codex-responses) fails: store=false causes 404 on tool result submission #16829

@koptereli

Description

@koptereli

Bug

When using openai-codex/gpt-5.2-codex as a sub-agent model, the first tool call succeeds but submitting the tool result back fails with:

404 Item with id 'rs_xxx' not found. Items are not persisted when `store` is set to false. Try again with `store` set to true, or remove this item from your input.

Root Cause

OpenClaw uses the OpenAI Responses API for Codex models (openai-codex-responses api type). The Responses API defaults store to false when not explicitly set. This means the response object (with id rs_xxx) is not persisted server-side. When OpenClaw then submits tool results referencing that response id via previous_response_id, OpenAI returns 404 because the response was never stored.

Expected Behavior

OpenClaw should set store: true in the Responses API request body when using Codex models (or any model using the Responses API in agentic/tool-use mode).

Reproduction

  1. Configure a Codex model: openai-codex/gpt-5.2-codex
  2. Spawn a sub-agent with tools enabled
  3. Agent makes a tool call → tool executes successfully
  4. Submitting tool result back fails with the 404 error

Version

openclaw 2026.2.12

Workaround

Use Anthropic models (e.g., claude-opus-4-6) instead of Codex for sub-agents that need tools.

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