fix(openai-codex): avoid stale Responses replay state#76832
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. for the transport payload path: current main can be inspected to show session-scoped native Codex request IDs, Next step before merge Security Review detailsBest possible solution: Land this transport-scoped fix after normal maintainer review and keep the linked bug report available for any remaining lossless-claw or live-channel validation. Do we have a high-confidence way to reproduce the issue? Yes for the transport payload path: current main can be inspected to show session-scoped native Codex request IDs, Is this the best way to solve the issue? Yes for the core transport portion: the PR changes only native ChatGPT Codex cache/replay identity while preserving custom Codex-compatible proxy behavior and adding focused regression coverage. Remaining lossless-claw reconciliation, if still needed, should stay a separate follow-up. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against ab032675ce09. |
2401b0c to
e8f3eff
Compare
06b4ffd to
b82f4e5
Compare
b82f4e5 to
cc76c2f
Compare
|
Landed via rebase onto
Thanks @MkDev11! |
Summary
prompt_cache_key, and avoid replaying prior Responses reasoning/message/function item IDs for native Codex.Change Type
Scope
Linked Issue/PR
Root Cause
prompt_cache_key, and prior Responses item IDs across turns.prompt_cache_keyand replay IDs to survive.Regression Test Plan
extensions/openai/transport-policy.test.tssrc/agents/openai-transport-stream.test.tsx-client-request-idprompt_cache_keyUser-visible / Behavior Changes
Native
openai-codex/*ChatGPT backend sessions should no longer send stale request/cache/replay state that can cause prior tool-call replies to reappear on unrelated later turns.Diagram
N/A
Security Impact (required)
Repro + Verification
Environment
openai-codex/openai-codex-responsespayload constructionhttps://chatgpt.com/backend-apiSteps
Expected
prompt_cache_keyActual
Before this PR, native ChatGPT Codex preserved session-scoped request/cache/replay state.
Evidence
Human Verification (required)
AI Assistance
Review Conversations
Compatibility / Migration
Risks and Mitigations