Repository navigation
fix(provider): take Responses tool arguments from the done events (T16) - #273
Merged
lg2m merged 7 commits intoOct 8, 2026
Conversation
Codex gpt-6-astra and gpt-6-sol stream argument deltas only for the first
call of a parallel batch; the rest carry their arguments solely on
response.function_call_arguments.done and response.output_item.done. The
decoder read only deltas, so those calls ran with {} (tool-layer D9: 234
errors). A captured stream confirmed it: 15 of 16 parallel calls had no
delta on each model.
The decoder now reads arguments from both done events and emits them once,
as a single ToolCallArgumentsDelta before ToolCallCompleted, for a call
that had no delta. Calls that streamed deltas are unchanged.
Refs ENG-1012
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a7ad8cec8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
# Conflicts: # docs/plans/progress/tool-layer.md
T16 / ENG-1015. Empty-delta-then-done regression failed before fix. Record final stack workspace/minimal gates and independent review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #272 (base
feat/eng-1012-t17-tool-error-kind). Implements T16 fromdocs/plans/tool-layer.md§ D9.Closes ENG-1015 · part of ENG-1012
What was wrong (confirmed by capture)
The D9 audit found 234 Codex tool calls that ran with
{}arguments, in whole parallel batches. To check the hypothesis, I captured raw Responses SSE from a throwaway build that appended eachdata:line to a file (never committed). The session DB went to a temp path; the runs wereqq run --approval read-onlyin a scratch dir, asking for a 12+ call parallel batch:openai-codex/gpt-5.5openai-codex/gpt-6.1-solopenai-codex/gpt-6-astraopenai-codex/gpt-6-solThe 15 calls without deltas sent
output_item.addedwith emptyarguments, thenfunction_call_arguments.doneandoutput_item.done, each carrying the identical completearguments. The decoder read only deltas, so those calls completed empty, and the run loop turned that into{}.Fix
providers/openai.rsreadsargumentsfrom both done events. For a call that had no delta, it emits them once, as a singleToolCallArgumentsDeltabeforeToolCallCompleted. Calls that streamed deltas are unchanged; their done payloads are ignored, not compared. In all 34 captured calls with deltas, both done payloads matched the deltas byte for byte, and comparing would mean buffering every call's arguments twice. A call with no arguments anywhere still completes empty.Verification
parallel_calls_without_deltas_take_their_arguments_from_the_done_events, shaped like the capture (obfuscation,status, spaced JSON,.done-only andoutput_item.done-only calls, a genuinely empty call)cargo test -p qq-provider(241 lib + 19); minimal profilecargo test -p qq-provider --no-default-features --features test-support(192 + 19)-D warnings,cargo fmt --checksse_decodebench, base vs branch: allocations identical;openai_responsesframe+parse 105/838/1683 µs vs 99/809/1617 µs for 64 KiB / 512 KiB / 1 MiB (noise)Compatibility / performance
No protocol or config change. Provider identity doesn't branch; this is the Responses wire format.
Review repair and final stack verification (ba188a7)