Gemini 4 Argon proposed six optimizations after working unattended overnight on Google’s Agent Development Kit. Maintainers accepted two and rejected four, including a cache that improved a synthetic benchmark but could return stale data.
That acceptance rate is the central finding in Google’s October 13 account. The company reports that the resulting changes reduced in-memory session-preparation overhead by about 40% in long sessions and accelerated cold package imports by 21%. Neither figure means that entire agents ran that much faster.
The experiment covered roughly 205,000 lines of Python across nearly 800 source files, supported by approximately 17,000 unit tests. Its practical value lies in the published setup: repository instructions, a persistent objective, benchmarks withheld from the agent, and human review that removed most of the proposed optimizations.
This is implementation guidance for an already announced model, not another model release. For engineering teams considering unattended coding agents, the useful question is how Google turned an overnight proposal into a smaller, acceptable patch.
Repository Instructions Changed What the Agent Delivered
Google ran the experiment on google/adk-python, its open-source framework for building and deploying AI agents. The task was deliberately broad: reduce framework overhead at startup and during long-running, multi-agent and workflow execution, while preserving the public API and what the model receives.
An initial attempt ran for about two hours without custom repository instructions. According to Google, Argon created a benchmark script seven minutes in and spent 70 minutes measuring performance and reading code before editing ADK source.
It found genuine bottlenecks, but its implementation missed maintainer expectations. A custom authentication-model hook subtly changed the public JSON schema. A copier missed edge cases involving mock events. The agent ran only 216 nearby tests and omitted benchmark results from its pull-request description.
For the second attempt, Google added maintainer guidance under .agents/skills. Each skill used a short SKILL.md index pointing to focused files under references/, allowing the agent to retrieve relevant rules without loading every instruction into context at once.
The rules included conventions for private, underscore-prefixed modules and checks governing lazy imports. Google says Argon read 12 guideline files before changing source code.
The other adjustment was Antigravity’s /goal mode, which preserved the objective across context compactions. That matters during a long run: summarizing earlier work should not erase the constraints governing the remaining edits.
Google also made the deliverable explicit. The agent had to open one unmerged pull request against main, include before-and-after measurements, and leave merging to maintainers.
The overnight run lasted 11 hours. This was more than an instruction to keep working longer; the setup supplied repository conventions, a durable objective and a defined stopping point.
The Two Accepted Changes Targeted Specific Overhead
The first accepted optimization changed how ADK’s in-memory session service retrieves conversation history.
Previously, the service deep-copied an entire stored conversation before filtering it to the events requested by the caller. Even listing sessions without their events could first copy those events unnecessarily.
Argon changed the ordering so filtering happened before copying. It also replaced the generic Pydantic deep-copy path for sessions and events with a faster, cycle-safe copier designed to preserve shared state dictionaries and test mocks.
The distinction matters for long sessions. If a caller needs only part of a growing history, copying everything first creates work that filtering immediately discards. Moving the filter earlier avoids that wasted copying, while the replacement copier still has to preserve the object relationships on which callers depend.
The second accepted optimization addressed package startup. Google says import google.adk previously loaded dependencies for live audio and video, OpenTelemetry tracing, and web servers, even for a basic text agent.
Loading those dependencies only when needed reduced cold-import time. But removing imports outright was not sufficient, because downstream tests expected certain module attributes to remain available for patching.
The shipped solution used lazy module accessors, deferring expensive loading while keeping attributes patchable where existing tests expected them.
Google says maintainers combined the best parts of both experimental rounds into a 22-file change backed by 17 new test functions, then landed it on main. The final patch was therefore a reviewed synthesis, not the overnight pull request accepted unchanged.
Four Rejections Explain the Limits of Automated Optimization
The rejected proposals are particularly useful because their problems went beyond failing an obvious unit test. Google’s review identified different reasons why a locally attractive optimization should not ship:
- A multi-agent event cache improved a synthetic benchmark by 17%. Its weak-reference approach could nevertheless return stale data across sessions if Python reused a memory address after garbage collection.
- A telemetry shortcut depended on a private OpenTelemetry attribute. Reviewers judged that reliance vulnerable to silent breakage after a minor library upgrade.
- A conversation-history formatting rewrite complicated a core path. It did not improve end-to-end latency on Google’s separate holdout benchmark.
- A workflow replay index introduced additional state tracking. Its benefit appeared in synthetic replay tests rather than everyday agent runs.
These are distinct failure modes. The cache raised a correctness concern, the telemetry change created a dependency-maintenance risk, and the other two failed to justify their complexity with relevant performance gains.
That distinction is important when evaluating agent output. A change can be faster in the benchmark the agent constructed and still be unsuitable for production. It can also preserve tested behavior while increasing the burden on future maintainers.
The case does not establish a general rejection rate for AI-written code. It shows why proposal count and benchmark improvement are weak substitutes for reviewing the particular assumptions behind each change.
All Public Tests Passed, but Compatibility Still Broke
One failure makes the limits of test coverage unusually concrete.
In the second-round pull request, Argon removed three internal flow imports from llm_agent.py. All 16,892 open-source unit tests passed. Yet 25 internal Google test targets failed because they patched the exact attributes those imports had exposed.
The public test suite had not captured that downstream dependency. The eventual lazy-accessor solution preserved the patch points while avoiding unnecessary loading.
This also complicates the meaning of “keep the public API unchanged.” Compatibility can include module locations that downstream code patches or otherwise relies upon, even when a refactor appears to preserve ordinary application behavior.
For teams reproducing the workflow, running the repository’s full suite is necessary evidence, but it cannot settle every compatibility question. Consumer integration tests and maintainer knowledge can expose assumptions that the agent’s local environment does not contain.
The 40% and 21% Figures Need Narrow Labels
Google reports roughly 40% lower in-memory session-preparation overhead in long sessions, illustrated at 50 and 150 turns. The benefit concerns ADK’s work preparing a session before a model request, not the complete request’s latency.

ADK’s terminology matters here. An invocation is the user-facing interaction that runs toward a final answer. A turn is an internal agent step, such as calling a tool or querying an MCP server. One invocation can contain many turns.
A reduction in framework overhead can therefore accumulate during a tool-heavy run, but its contribution to total latency depends on how much time the model and tools consume. The account does not establish a corresponding 40% improvement for external, database-backed session stores.
The 21% result is similarly specific: faster cold package imports. It is not evidence of a 21% improvement throughout agent execution.
Google also describes an independent holdout benchmark written before either run and withheld from Argon. It used an instant model and instant tools to isolate framework overhead as a session grew.
“Independent” here means separate from the agent’s visible benchmarking process. These remain Google-reported results, not third-party reproductions. The holdout’s demonstrated value was its ability to reject a rewrite that did not improve the separately measured workload.
Adapt the Workflow, but Keep Approval Outside It
The transferable part of Google’s experiment is the separation between exploration and acceptance.
Before starting an overnight run, a team can encode repository-specific constraints in discoverable skill files: compatibility requirements, dependency boundaries, import conventions, test commands and expectations for performance evidence. A short index with focused references offers a practical alternative to one sprawling instruction document.
The objective should describe both the desired outcome and what must remain unchanged. Google’s prompt protected model inputs and the public API, required regression tests, and specified an unmerged pull request with measurements. Those conditions made the morning handoff reviewable.
Evaluation should also include workloads the agent has not been optimizing against. Google’s withheld benchmark helped distinguish improvements that survived a separate test from changes whose appeal depended on synthetic measurements. Downstream compatibility testing supplied another check the public suite could not provide.
Finally, review each proposal independently. A useful session-copy fix does not validate a neighboring cache, and a clean test run does not justify reliance on private dependency internals.
The strongest outcome in this case was not that an agent worked for 11 hours. It was that maintainers could retain two useful optimizations while discarding four others. Teams adopting the setup should preserve that ability to subtract, rather than treating a completed overnight run as a reason to merge its full output.