Reasoning content is serialized as `null` despite being marked for "skipping if" by serde
Open 💬 0 comments Opened Aug 19, 2026 by jpalvarezl
What version of the Codex App are you using (From “About Codex” dialog)?
0.147.0
What subscription do you have?
Microsoft Foundry/ Azure OpenAI
What platform is your computer?
Windows 11 x86_64
What issue are you seeing?
ResponseItem::Reasoning::content is serialized as null despite being marked with skip_serializing_if so the wire format contains "content": null
What steps can reproduce the bug?
Any prompt in my experience. If a ResponseItem::Reasoning is sent from the service which has no content that's enough to trigger this problem.
What is the expected behavior?
If there is no reasoning content, the field "content" in the JSON should be skipped on serialization.
Additional information
I have opened a more detailed issue in my fork, as well as a PR with unit tests and the solution in case that's helpful.
PR: https://github.com/jpalvarezl/codex/pull/14
Issue (linked in the above PR too): https://github.com/jpalvarezl/codex/issues/1