mirror of
https://github.com/openai/codex.git
synced 2026-12-03 00:41:03 +00:00
## Why Clients had to wait for the entire sample before they could display any assistant text. ## What changed Set `stream: true` to receive `thread/sample/textDelta` notifications while a sample is in progress. Each notification goes to the requesting connection and carries the original JSON-RPC `requestId` and a text `delta`. The stream excludes commentary and reasoning. The final RPC response still provides the complete sample and token usage. Discard provisional text if the request fails or the final `text` is null. Omitting `stream` or setting it to `false` returns only the final response. ## Testing Integration tests cover deltas arriving before completion, text supplied only when an output item completes, and custom tool calls producing a null sample even after provisional text has been streamed. GitOrigin-RevId: b2ad960420ce7789722e03f9f283781030cf61fb