fix(cli): include all Executing subagent tool calls in useToolScheduler state#22590
fix(cli): include all Executing subagent tool calls in useToolScheduler state#22590TravisHaa wants to merge 7 commits into
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical issue where subagent tool calls that directly entered an Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request fixes an issue where subagent tool calls in the Executing state were not being displayed, which caused problems for the task-tree visualization and step-through debugging. The change correctly modifies the filter in useToolScheduler to include these tool calls. While the implementation is correct, it appears to break existing unit tests that were written for the old behavior. My review includes a comment to update the affected tests.
|
Hi there! Thank you for your interest in contributing to Gemini CLI. To ensure we maintain high code quality and focus on our prioritized roadmap, we have updated our contribution policy (see Discussion #17383). We only guarantee review and consideration of pull requests for issues that are explicitly labeled as 'help wanted'. All other community pull requests are subject to closure after 14 days if they do not align with our current focus areas. For this reason, we strongly recommend that contributors only submit pull requests against issues explicitly labeled as 'help-wanted'. This pull request is being closed as it has been open for 14 days without a 'help wanted' designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding and for being part of our community! |
|
@TravisHaa, apologies for the bot closing this PR! We have reopened it. Please sync your branch to the latest |
|
Ready to merge once all the E2E CI tests pass. |
|
@spencer426 can my PR get added to the merge queue again? It seems like it got evicted ona flaky failure, not a real one. The merge_group run failed on a single Windows nondeterministic test timeout that's unrelated to this PR's diff. |
|
Looks like there are still failing CI tests. Please address these. |
|
@spencer426 Thanks for the heads up. The failure is in the E2E (Chained) suite, specifically context-compress-interactive.test.ts (/compress command) on Slow E2E - Win - which is unrelated to this PR's diff (this PR only touches useToolScheduler). The job log shows the failure is LLM/infra flakiness, not a code issue. |
Summary
Executingsubagent tool calls in theuseToolSchedulernon-root filter, not justAwaitingApprovalor previously-seen onespid-based fixWhy
Subagent tool calls that go directly to
Executingwithout hittingAwaitingApproval(reads, globs, searches, MCP calls — the majority of subagent work) are silently dropped fromtoolCallsMapon their first update. Two concrete consequences:parentCallIdon each tool call. Filtered-out calls never enterpendingHistoryItems, souseTaskTreenever sees them and can't build the parent-child relationship regardless of actual nesting depth.Relationship to PR #21268 / #21052
PR #21268 addresses a narrower slice of the same root cause: it adds
tc.pid !== undefinedso PTY-backed interactive shell calls surface when they hang on user input. This PR is complementary — it extends the pass-through to allExecutingcalls. Calls still inScheduled/Validatingremain filtered to prevent transient flicker in the flat-list UI.Test plan
useToolSchedulerstate during executionAwaitingApprovalsubagent calls is unaffectednpm run test --workspace @google/gemini-cli -- src/ui/hooks/useToolScheduler.test.tsFixes #22589
Related: #21052, #21268