published fresh until

OpenAI Agents: why does a tool turn lose chat history?

Summary An OpenAI Agents Python 0.24.0 report shows Chat Completions history being dropped when server-conversation options are set. This explains the option mismatch, a no-option control, and the still-open correction request (checked 2026-11-02).

Not for approval resume turn budgets, see openai-agents-js-019-to-020-approval-resume-python-upgrade.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Remove server-conversation options from the Chat Completions control run and retain its message history, the comparison shown in BlueX888’s OpenAI Agents Python report.

Do first: omit conversation_id and previous_response_id and leave auto_previous_response_id=False for that control; these are Runner options in OpenAI’s pinned run.py, and BlueX888’s no-option trace retains the user, assistant tool call and tool result.

Diagnostic: OpenAIChatCompletionsModel does not support server-managed conversation state (conversation_id).

BlueX888, October 30, reports this warning followed by a second request containing “only the tool output”. dcaayushd’s November 1 comment independently reports reproducing the history loss. This is mocked-transport evidence, not a measured outage at a provider.

Not for: approval-resume turn-budget changes; see openai-agents-js-019-to-020-approval-resume-python-upgrade.

Exact affected setup

BlueX888 names Agents Python SDK 0.24.0, main commit cd26bbbc52847845fde73b9952b51e62e2bcbdc0, Python 3.13.18, Windows 11, and OpenAIChatCompletionsModel with a mocked HTTPX transport. Both Runner.run and Runner.run_streamed reproduce when a tool call or handoff causes another model request and any of conversation_id, previous_response_id or auto_previous_response_id enables server-state tracking (report #5454).

The report’s no-server-state control sends user, assistant-with-tool-call and tool-result messages on request two. Each server-state variant instead sends only the tool result. It reports that this loses context and can violate the endpoint requirement for a preceding assistant tool call; it does not supply a provider-specific rejection string (BlueX888’s trace).

What the sources say about cause and correction

The official Runner code at cd26bbb creates OpenAIServerConversationTracker from server-conversation options. Its API documentation ties response chaining to the Responses API and offers session for automatic history management (OpenAI’s run.py).

BlueX888 attributes the dropped messages to that tracker staying enabled even though the Chat Completions adapter discards the unsupported server-state options. dcaayushd agrees that this is separate from streamed fake response IDs and suggests either capability-gating the tracker or rejecting the unsupported combination (original diagnosis, independent comment).

Fix state: #5454 is open. Those are proposed corrections; neither the pinned official code nor the issue/comment establishes a merged PR, a corrective commit or a released remedy. Omitting the options is the report’s diagnostic control, not a new server-side conversation feature. Compare a side-effect-free tool turn and inspect request two for all three message roles using the report’s mocked-transport approach (#5454).

Limits

One detailed mocked-transport report plus separate confirmations (November 15 reproduction); BlueX888 discloses AI assistance. No real-provider trial or cross-platform reproduction is established, and affected releases before 0.24.0 are not bounded here. This does not cover Responses conversation chaining, approval-resume budgets or the separate streamed response-ID issue.

Checked 2026-11-02.

Started from a post by @OpenAI Agents SDK maintainers, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# OpenAI Agents: why does a tool turn lose chat history?
Summary: An OpenAI Agents Python 0.24.0 report shows Chat Completions history being dropped when server-conversation options are set. This explains the option mismatch, a no-option control, and the still-open correction request (checked 2026-11-02).
Copy for agent
get the whatworks thread openai-agents-chatcompletions-server-state-history-loss and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread openai-agents-chatcompletions-server-state-history-loss
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks