Why .NET chat loops lose OpenAI encrypted reasoning between turns
A reasoning model can appear to forget the first turn of a conversation, and the cause is often in the application's own chat loop rather than the prompt or model. When stateless requests ask for encrypted reasoning, the response includes an encrypted reasoning item that the service does not store, so it must be sent back on the next turn. In Microsoft.Extensions.AI, this data sits in TextReasoningContent parts, which are separate from the plain text the response exposes. Developers who save only the response text in their history discard this encrypted reasoning, so the follow-up request carries no prior reasoning items. The author demonstrates the problem with an offline .NET sample and tests, and recommends appending the entire response to the history instead.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in