For codex sdk, expose reasoning/thinking tokens as a streamable event in run_streamed()
Open 💬 0 comments Opened Jun 4, 2026 by sidhant-dewan
What variant of Codex are you using?
CLI
What feature would you like to see?
Feature Description
When using the SDK programmatically via run_streamed(), there is currently no way to observe the model's intermediate reasoning steps (thinking tokens) as they are being generated. The streamed events expose useful signals like item.completed and turn.completed, but reasoning output is silently discarded or never surfaced, making it impossible to build UIs or logs that show what the agent is thinking in real time.
Proposed Change
Add a new event type — something like reasoning.delta or thinking.delta — to the streamed event stream, similar to how tool calls and file changes are surfaced today. Optionally, a reasoning.completed event could mark the end of a reasoning block.
Additional information
_No response_