You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
'previous_response_id' is ignored for multi-turn conversations, maybe contradicting performance best practices #4047
The Codex CLI's integration with the Responses API no longer appears to use previous_response_id for managing multi-turn conversation state, with reasoning or tool calls, even when the store parameter is set to true. This seems to be the case since circa #1641. Why?
All recent guides and documentation by OpenAI says that using previous_response_id not only facilitates multi-turn conversations, but results in better function‑calling performance and lower overall token usage. If this is still true, it wouldn't make sense to simply give up on using previous_response_id for all use cases with the Codex CLI. We want the best perform with OpenAI's responses API.
According to the official OpenAI documentation, for multi-turn conversations using the Responses API with store=true, subsequent requests should include the previous_response_id to maintain context. As stated in the Reasoning Best Practices guide:
For the best results with this change, we recommend using the Responses API with the store parameter set to true, and passing in all reasoning items from previous requests (either using previous_response_id, or by taking all the output items from an older request and passing them in as input items for a new one). OpenAI will automatically include any relevant reasoning items in the model's context and ignore any irrelevant ones. In more advanced use‑cases where you’d like to manage what goes into the model's context more precisely, we recommend that you at least include all reasoning items between the latest function call and the previous user message. Doing this will ensure that the model doesn’t have to restart its reasoning when you respond to a function call, resulting in better function‑calling performance and lower overall token usage.
Activity
etraut-openai commentedon Nov 23, 2025
I think this bug report is no longer relevant, so I'm going to close.
docs: research Codex directly as the actual likely deployment client …