codex icon indicating copy to clipboard operation
codex copied to clipboard

Inline response recording and remove process_items indirection

Open aibrahim-oai opened this issue 2 months ago • 2 comments

  • Inline response recording during streaming: run_turn now records items as they arrive instead of building a ProcessedResponseItem list and post‑processing via process_items.
  • Simplify turn handling: handle_output_item_done returns the follow‑up signal + optional tool future; needs_follow_up is set only there, and in‑flight tool futures are drained once at the end (errors logged, no extra state writes).
  • Flattened stream loop: removed process_items indirection and the extra output queue
    • Tests: relaxed tool_parallelism::tool_results_grouped to allow any completion order while still requiring matching call/output IDs.

aibrahim-oai avatar Nov 26 '25 03:11 aibrahim-oai

@codex review this

aibrahim-oai avatar Dec 01 '25 22:12 aibrahim-oai

Can you make sure this fixes the issue described here? https://github.com/openai/codex/pull/7038

jif-oai avatar Dec 02 '25 09:12 jif-oai