Skip to content

fix(agents): keep Codex reasoning payloads stateless#4572

Open
kevin-dp wants to merge 1 commit into
mainfrom
kevin/codex-store-false
Open

fix(agents): keep Codex reasoning payloads stateless#4572
kevin-dp wants to merge 1 commit into
mainfrom
kevin/codex-store-false

Conversation

@kevin-dp

Copy link
Copy Markdown
Contributor

Summary

#4557 forced store: true on built-in reasoning payloads for both openai and openai-codex so OpenAI Responses continuations can replay rs_* reasoning items. But the ChatGPT-login Codex endpoint is stateless-only and hard-rejects any stateful request:

pi-adapter message_end ERROR stopReason=error errorMessage={"detail":"Store must be set to false"}

Since #4557 merged, every Codex (gpt-5.x via ChatGPT login) run fails immediately, even a plain "Hi" with no tool calls.

Fix

Scope the stateful default to the regular OpenAI Responses API only — the openai-codex payload keeps the upstream store: false default (pre-#4557 behavior). This means the rs_* not found continuation issue #4557 addressed remains possible on Codex, but stateful requests can never work against that endpoint anyway; a stateless fix there would need the encrypted reasoning-content replay path (explicitly a non-goal in #4557).

Test plan

  • pnpm exec vitest run test/model-catalog.test.ts in packages/agents (15 passed) — adds a regression test that openai-codex payloads get no store override (and an incoming store: false survives), while the existing openai store-true coverage still passes
  • pnpm typecheck clean in packages/agents
  • Manually reproduced against the desktop app: gpt-5.5 runs failed with the store error before this change

🤖 Generated with Claude Code

#4557 forced store: true on both openai and openai-codex reasoning
payloads to keep rs_* continuations replayable. But the ChatGPT-login
Codex endpoint is stateless-only and rejects any stateful request
with {"detail":"Store must be set to false"}, so every Codex
(gpt-5.x) run failed at message_end. Scope the stateful default to
the regular OpenAI Responses API and leave the Codex payload on the
upstream store:false default, restoring pre-#4557 behavior there.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant