Google left an agent alone overnight with 200,000 lines of code
Google gave its coding agent one goal, a written rulebook and a speed test it could not see, then let it work for 11 hours on a big open-source project. It proposed six speedups; the maintainers kept two.
ContextGemini 4 Argon is Google's coding model. ADK, the Agent Development Kit, is Google's open-source Python framework for building agents, with about 800 source files and nearly 17,000 unit tests.
A first try ran about two hours with a one-paragraph prompt and no guidance. The agent changed a public JSON schema, ran only 216 nearby tests and left its benchmark numbers out of the pull request.
For the second try the team added a .agents/skills folder with an index and 12 guideline files, and pinned one goal: an unmerged pull request with before and after numbers. Argon worked from 9:11 PM to 8:19 AM. It read the guidelines first, measured a baseline before touching code, added regression tests and ran all 16,892 unit tests.
Two of six changes shipped. Filtering session events before copying them cut the framework's time before each model request by about 40% in long sessions, and a 158-turn run fell from 65.6 to 56.1 seconds. Lazy imports cut cold import time by 21%. The figures are Google's own.
2 of 6agent changes the maintainers kept
Technical details
Speed was judged on four workloads run 30 times each (package startup, a 200-step conversation, a 20-sub-agent handoff and a 12-node workflow), plus a holdout script, bench_turn.py, that the agent never saw. Round two ran in Antigravity's /goal mode, which keeps the goal pinned when the conversation is compacted.
The four cut changes: a multi-agent event cache that was 17% faster on a synthetic test but could return stale data across sessions; a read of a private OpenTelemetry attribute that could break on a minor upgrade; a history-formatting rewrite that was harder to read with no end-to-end gain; and a replay index that only helped synthetic tests.
Lazy loading left time to first request flat (3.07 to 3.09 s) because the import cost moves into the first turn, so Google suggests a warm-up request. Simply deleting three imports passed all 16,892 open-source tests but broke 25 internal Google test targets that patched those attributes.
Google's post is dated October 13; InfoQ covered it on October 24, which is when it reached us. The shipped commit says the changes were generated by Argon.
Why it mattersThis is a reusable recipe for long, unattended agent runs, with the failure mode shown next to the fix. The benchmark the agent never saw is what made the numbers believable.
For youCopy the shape in Claude Code: a skills folder of repo rules, a benchmark script kept out of the repo, and a goal that requires before and after numbers in the PR. Try it on plugin load time or a slow Supabase query path.
- unit tests
- Small automatic checks that each confirm one piece of code still does what it should.
- pull request
- A proposed change to a codebase that people review before it is merged.
- regression tests
- Tests added to catch a specific problem if it ever comes back.
- Lazy imports
- Loading a code library only at the moment it is first used, instead of at startup.