Gradle Technologies is now Develocity — read the announcement

Build Caching Optimizer

Stop wasting CI spend on avoidable work.

The Build Caching Optimizer's run report — 3 issues found and fixed, warm rebuild 1m10s to 12.4s, cache hit rate 63% to 100% — with a before/after table.

Feature overview

Build Caching Optimizer

Build Caching Optimizer is the fast-builds agent in Develocity Agents — it wins back the build time lost to avoidable cache misses. Even cacheable tasks miss the cache when a volatile input, absolute path, or overlapping output slips in, and finding which misses cost the most takes scarce build-engineering expertise. Its Build Caching Report ranks the highest-impact savings opportunities across every project. Running inside the AI agents you already use, such as Claude and Codex, the optimizer diagnoses each miss from Build Scan® data and an encoded Gradle and Maven playbook, applies a minimum-change fix, verifies on a fresh build that the cache hit rate improved, and opens a pull request citing the Build Scans behind it. Its sibling for green builds is the Failure Handler.

Turn a multi-day cache investigation into one autonomous run

  • Identify — the Build Caching Report surveys the instance, confirms each avoidable miss with a Build Scan comparison, and ranks savings opportunities by recoverable CI time across every project.
  • Fix — running in the project's checkout, the optimizer diagnoses each miss, applies the minimum code change, verifies the fix, and opens a pull request.
  • Observe — re-run the report to verify that resolved misses drop off the ranking; in-product attribution of the CI time each fix recovered comes next.
The Build Caching Optimizer's phased run plan, Prerequisites through Report & PR, showing the identify, fix, observe loop as a live task list.

Pinpoint the exact input that broke the cache by comparing paired builds

  • The agent runs paired cacheability experiments, then compares their Build Scan data to see exactly which input changed — a volatile timestamp, an absolute path, an overlapping output.
  • An encoded Gradle and Maven playbook directs where the agent looks and how it interprets Build Scan data — turning an untargeted search into a focused diagnosis.
  • Every fix is re-validated against a fresh build before it ships; a fix that doesn't raise the cache hit rate is discarded.
View documentation (opens in new tab)
The Build Caching Optimizer diagnosing Javadoc cache misses into root causes via the Develocity MCP server's build comparison.

We measured the difference Develocity makes — head-to-head against commodity AI

  • We benchmarked the agent head-to-head against commodity AI on caching problems from real open-source projects, using the same frontier model on both sides.
  • Working from build logs alone, commodity AI solved 0 of 4 scenarios; with Build Scan data and our playbook, the agent solved 4 of 4 (correctness 30% → 80%).
  • This is a capability gap, not a cost gap: without build context, commodity AI exhausted its token budget unsolved, while one verified fix speeds up every future build.
  • A scenario counted as solved at ≥70% judged correctness across a majority of 10 runs — full methodology and project results are in the benchmark blog post.
The Build Caching Optimizer evaluation report's correctness table — commodity AI solved 0 of 4 scenarios versus Develocity's 4 of 4, average correctness rising from 30.1% to 80.3%.
Observability

Every run traceable in the Build Scans your builds already emit

  • Every build the agent triggers — probe, experiment, and validation — is tagged with a session ID (bco.sessionId) in its Build Scan, making the full run auditable without the agent session.
  • Filter Build Scans by that session ID to inspect every build a run produced and verify the evidence behind each finding.
  • Every fix is delivered as a standard pull request, so your team reviews and approves each autonomous change before it merges.
A Develocity Build Scans list filtered by one run's session id, showing every build a single Build Caching Optimizer run produced, each attributed to the agent.
Analytics

Run it where it pays — savings opportunities ranked across your organization

  • The Build Caching Report ranks savings opportunities by recoverable CI time across every project — surveyed from Develocity Analytics, each miss confirmed by a Build Scan comparison.
  • Generate the report without checking out code, with a paste-ready fix prompt per row — the release notes example surfaces 126 recoverable CI hours a week from three fixes.
  • On Apache's public instance, a July 2026 run found two opportunities worth 891 serial task-hours a week (a floor); after upstream fixes landed, a re-run measured 81% less.
  • RoadmapTrack which projects applied fixes and their savings, and rank projects with remote Build Cache disabled alongside them to see where enabling caching pays off first.
View documentation (opens in new tab)
The Build Caching Report ranking savings opportunities across an instance — 3 opportunities, 126 hours of CI time a week recoverable — each row with a paste-ready fix prompt.

Resources

What Build Data Adds to an AI Agent: A Benchmark
Blog
How DuckDuckGo cut their Android build times by up to 57%
Blog
Develocity saves Netflix 280,000+ hours per year with faster builds and tests
Case study
When AI code overloads CI, Universal Cache keeps builds fast and costs in control
Blog

What's next

Get started today with a 30-day free trial of the entire Develocity® product suite.

Start Free Trial

© 2026 Gradle, Inc. Gradle®, Develocity®, Build Scan®, and the Gradlephant logo are registered trademarks of Gradle, Inc.

Get an AI summary of Develocity: