codex
codex copied to clipboard
Inline response recording and remove process_items indirection
- Inline response recording during streaming:
run_turnnow records items as they arrive instead of building aProcessedResponseItemlist and post‑processing viaprocess_items. - Simplify turn handling:
handle_output_item_donereturns the follow‑up signal + optional tool future;needs_follow_upis 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_itemsindirection and the extra output queue -
- Tests: relaxed
tool_parallelism::tool_results_groupedto allow any completion order while still requiring matching call/output IDs.
- Tests: relaxed
@codex review this
Can you make sure this fixes the issue described here? https://github.com/openai/codex/pull/7038