fix(antigravity): restore Gemini's background-job waiting under a tool allowlist - #216
Draft
bai-uipath wants to merge 5 commits into
Draft
bai-uipath wants to merge 5 commits into
bai-uipath wants to merge 5 commits into
Conversation
The allowlist from #215 maps Claude tool names onto Antigravity builtins, so `schedule` (no Claude equivalent) was always dropped. Gemini uses it to sleep while a backgrounded run_command finishes; without it, it re-checks the task every few seconds and each check counts against max_turns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bai-uipath
marked this pull request as ready for review
October 3, 2026 16:23
bai-uipath
requested review from
CarlesUIPath,
akshaylive,
tmatup and
uipreliga
as code owners
October 3, 2026 16:23
akshaylive
approved these changes
Oct 3, 2026
bai-uipath
marked this pull request as draft
October 3, 2026 16:33
…olset The allowlist mapped Glob/Grep/LS onto find_file/search_directory/ list_directory, which the harness ships off (BuiltinTools.deprecated()). Turning them on changed how Gemini works: on SkillsBench it made 1,429 Glob/Grep calls in 333 of 348 rows where 0.12.9 made none, often one search per turn in place of a script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n a timeout is set The 120-cycle (10 minute) cap applied alongside the 80%-of-turn_timeout deadline, so a slow solver or simulation was force-closed at 10 minutes even with turn budget left. On the SkillsBench Gemini 4-arm campaign it ended 22 of 348 rows; 4 had passed on 0.12.9 with the deadline alone, e.g. an exam-scheduling MIP solve that finished at 1211s. The cap is again the bound only when a task sets no timeout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…by policy The harness builds its system prompt from the toolset. With start_subagent off it drops the whole subagents section, which carries the prompt's only "you do NOT need to poll, you will be notified" guidance. Under an allowlist without Task, Gemini then polls backgrounded commands with status checks and short liveness timers: 1% of rows on 0.12.9 vs 8-10% after #215, and max-turn rows 2 vs 12 of 148 on the SkillsBench Gemini rerun. start_subagent now stays on, so the prompt matches the harness default, and when the tool lists do not allow Task the call that runs a subagent (invoke_subagent) is denied by policy. That covers the built-in research subagent and model-defined ones, which both get search_web regardless of the parent's toolset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… not fix Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Motivation
allowed_toolson Antigravity by shrinking the declared toolset, which also took away how Gemini waits for background jobs. Gemini then busy-polls and burnsmax_turns.Changes
schedule(Gemini's wait timer) on under any allowlist, likefinish.Glob/Grep/LSdo not turn on tools 0.12.9 never had.start_subagenton so the system prompt matches 0.12.9, and denyinvoke_subagentby policy whenTaskis not allowed.How fixed
scheduledropped, Gemini re-checks every few secondsGlob/GrepValidation
gemini-3.5-flash)pytest tests/test_antigravity_agent.py: 116 passed. ruff, pyright, custom lint and docs budget pass.🤖 Generated with Claude Code