Applied AI
An Agents SDK tool turn loses its conversation history
Detect lost context when Chat Completions is mixed with server-managed conversation settings.
October 30, 2026
The first model response can look normal, then a tool call fails because the next request contains only the tool output. A new Agents SDK issue reproduces that behavior with OpenAIChatCompletionsModel when conversation_id, previous_response_id, or automatic previous-response tracking is configured. The adapter warns that it ignores server-managed state, but the reporter says the Runner still drops earlier messages on the second request. This is a reported SDK combination, not a generic Chat Completions failure.
Inspect the second request
In a controlled test, capture message roles for request one and the request after a tool call. The expected local-history sequence includes user, assistant tool call, and tool result. A lone tool result can be rejected or leave the model without context. Redact sensitive prompts and tool output in traces. The Agents SDK running guide distinguishes manual and session-based history from server-managed conversations.
Choose one memory contract
If using a Chat Completions model, keep the conversation history in the client or a compatible session and avoid server-managed conversation settings that the adapter does not support. If the application needs a server-managed response chain, use a model API that supports it and test a tool turn, a handoff, and a resumed run. A warning should become a deployment test, not an accepted production background message.
Define the customer impact
Check whether failures created duplicate tool attempts or dropped user context. Provide an incident log that distinguishes the SDK request shape from model quality. The fix is complete only when the second request retains the required history and the tool round trip succeeds.
Adovo’s view
Memory is a contract between the runner and the model API. A warning at that boundary is a broken promise if the next turn discards context. Test the second turn; the first turn proves almost nothing.
