Repository navigation
Conversation
When the model emits parallel function calls and one FunctionTool raises, the batch is cancelled and the error re-raised, but the response of a sibling that had already finished was thrown away with it. The call was then stripped from the next request, so the model could repeat it. The batch executor now keeps the finished calls' real responses, and once the node has stopped on the error, the node runner persists them before the error event or a retry; the original error propagates unchanged. Nothing is synthesized, and responses that carry control actions or confirmation/credential placeholders are not kept.
…etry and a resume
thuongvu
force-pushed
the
fix/keep-completed-parallel-results-on-tool-error
branch
from
October 9, 2026 00:06
fde7957 to
3e309d5
Compare
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.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
Problem:
When one of several parallel tool calls raises, the batch is canceled and the error re-raised, but a sibling that had
already finished loses its response with the batch. It's then stripped from the next request, so the model doesn't
know it ran and may repeat it.
Solution:
the invocation's shared
_AbortState.NodeRunnerpersists them through the node's normal event path, before itemits the error event or retries.
Nothing is yielded into the agent while the error is in flight, so nothing can act on the kept results. Only plain
results are kept: responses with control actions (transfer, escalate,
finish_task) or confirmation/credentialplaceholders are left out, so history only records what actually ran. Live mode and aborted invocations are
unchanged (abort sealing answers those calls, as today).
Behavior changes to be aware of:
state_delta/artifact_deltaare now persisted too.Testing Plan
Unit Tests:
New tests in
test_runners.pyandtest_batch_executor.py. Without the fix 13 of the 15 fail (the other 2 areregression guards).
(The full run deselects
cli/utils/test_cli_create.py::test_handle_login_with_google_option_3, which opens aninteractive Google login.)
Manual End-to-End (E2E) Tests:
The repro script from #7428:
With a real model (gpt-5-mini via LiteLlm) asked to finish the task, the finished write was repeated in 10/10 runs
before this change and 0/10 after.
Checklist
Additional context