TLDRocket
Sign in

Google engineers use Gemini 4 Argon to optimize a 200,000-line Python codebase overnight

developers.googleblog.com ● Covered by 18 sources

Google let Gemini 4 Argon loose on a 205,000-line codebase overnight. It found real speedups, but only two of six ideas were safe enough to ship.

Based on reporting by developers.googleblog.com — read the original for the full story.

Summary, retelling and take written by AI under human oversight; images are AI-generated illustrations. How we work · Report an error

Most coding demos start with a blank folder. Google tried something much less polite: it gave Gemini 4 Argon a live, messy Python codebase and let it work overnight without a human hovering over every move.

The target was google/adk-python, Google’s open-source Agent Development Kit. The repository is about 205,000 lines across nearly 800 source files, with nearly 17,000 unit tests sitting underneath it like a very large tripwire. The team cared about one thing more than flashy code generation: could the model find performance problems that live across files, not just in one obvious hotspot?

In the first run, Argon worked from a single paragraph and no repo-specific instructions. It spent about two hours on the task, wrote a benchmark script within 7 minutes, and then spent 70 minutes measuring and reading before changing a line of source. That first pass found real bottlenecks in session copying and package imports, but it also ignored some of the team’s house rules. The result was useful, just not shippable as-is.

So Google tightened the setup. It added maintainer guidance through the repo’s .agents/skills files, turned on /goal mode in Google Antigravity so the objective would survive context compaction, and asked for an unmerged pull request with before-and-after numbers. This time Argon ran unattended for 11 hours. Before editing code, it read 12 guideline files and benchmarked four workloads. Near the end, it was still checking its own diff and rerunning the full 16,892 tests.

The model proposed six optimizations across 32 files. Two made the cut. One moved filtering ahead of a deep copy in the in-memory session service, which cut pre-model overhead by about 40% in long sessions. The other made heavy packages load only when needed, which sped up cold imports by 21%. The other four ideas were rejected in review because they leaned on fragile memory behavior, private library internals, or gains that only showed up in synthetic tests. In the end, the team merged a 22-file change backed by 17 new test functions.

The interesting part is not that the model wrote code. It’s that the useful part came from wandering across 40 files and then surviving human review. That’s the real bar for agentic coding, and it’s much less glamorous than the demos.

My take — AI-written commentary, not fact-checked reporting

This is the rare AI coding story that sounds useful instead of theatrical. Let the model roam, but keep a human with a red pen; the industry could use fewer magic tricks and more boring speedups that actually pass tests. Also, if the sales pitch needs a blank folder to work, it’s probably not a coding assistant yet.

Read more about this at: developers.googleblog.com

Related stories

The daily briefing

Every AI story that matters, in your inbox by 8am.

TLDRocket reads all relevant sources, removes duplicate coverage, and summarises the day in two minutes. Follow companies and topics for alerts, or get the briefing in Slack. Free, no spam, unsubscribe anytime.