I posted an updated GPT-OSS template a couple of months ago, which was based on Unsloth's version. It turns out that both Unsloth's version (and, thus, mine) contain a very serious bug that can degrade the model when chat history is replayed and contains previous reasoning (aka the analysis channel) turns. As far as I can tell, retaining this history is pretty much the default for a lot of tools now and definitely can happen at the API level - tools can consolidate reasoning and answer. Can you spot the problem in this snippet from the message rendering loop? (Taken from Unsloth's template): jinja {%- elif "thinking" in message %} {#- CoT is dropped during all previous turns, so we never render it for inference #} {{- "assistantanalysis" + message.thinking + "" }} {%- set last_tool_call.name = none %} {%- else %} {#- CoT is dropped during all previous turns, so we never render it for inference #} {{- "assistantfinal" + message.content + "" }} {%- set last_tool_call.name = none %} When chat history is rendered, in cases where a message contains both content (the model's answer) and thinking (reasoning), only the reasoning is rendered for the model, while the answer itself is dropped! That can significantly confuse the model across turns. The comment is also wrong—the whole branch looks like a copy-paste error. OpenAI's reference template does not have it. I noticed that in some cases GPT-OSS 20B could go completely off the rails, and now I see why. Interestingly, GPT-OSS 120B seems smart enough to recover the context and direction of the conversation using only the reasoning traces. After this experience, I implemented preserve_thinking in my template as well, because the model handles it just fine without losing coherence. This should make multi-turn inference faster in harnesses (via prefix caching) at the expense of higher token usage. So there you have it: https://huggingface.co/arbv/gpt-oss-fixed-jinja-template Give GPT-OSS a second chance if you are bored. Noticed by pure chance while working on a fixed template for Laguna XS/S 2.1, but more on that another day. P.S. Casting u/danielhanchen to take a look, too.   submitted by   /u/arbv [link]   [comments]