Repository navigation
fix(core): preserve subagent multimodal tool response parts - #29621
Draft
shivangsharma01 wants to merge 1 commit into
Draft
shivangsharma01 wants to merge 1 commit into
shivangsharma01 wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
📊 PR Size: size/M
|
This was referenced Oct 3, 2026
This branch has not been deployed
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.
Summary
Preserve all scheduler response parts when a local subagent feeds tool results back to the model. Image data emitted as a sibling of a function response was previously discarded.
Details
Track arrays of response parts by call ID and append each complete result in the model's original function-call order. Keep truncation, unauthorized-call errors, soft rejection, and missing-result checks intact.
The regression test executes two image-returning tool calls, reverses their scheduler completion order, and verifies that the next model request contains both function responses and both image payloads. It fails on the base commit because the image parts are absent.
This draft addresses the localized sibling-part loss reported in #29574. The issue is not yet labeled
help wanted; maintainer triage is needed before review. The reported live API 400 error has not been reproduced.Related Issues
Related to #29574.
How to Validate
npm exec --workspace @google/gemini-cli-core -- vitest run src/agents/local-executor.test.ts src/utils/tool-utils.test.ts npm run preflightFocused validation: 86 tests passed. Full preflight on base
c6bccb7ecpassed build, all lint checks, and typechecks. Test results: CLI 7,196 passed (4 skipped); core 8,157 passed (54 skipped), with one failure in the unchanged macOS PTY cleanup test; the other completed workspaces passed. Preflight exited 1.The failing test is
ShellExecutionService > Orphan PTY slave FD cleanup > synchronously closes the matching slave fd when platform is darwin: expected descriptor 12, received undefined. Rerunning the shell-execution suite reproduces it (83 passed, 1 failed). Neither its source nor test file differs from upstream.The branch was subsequently rebased onto
fb972b2f8; the full build and repository typechecks passed again, as did ESLint and Prettier for the changed files. The executor, output-truncation, and chat-recording suites passed all 146 tests.Pre-Merge Checklist