Productivity

DoorDash cleans up feature flags with multi-agent LLMs, at 13.8 minutes and $4.79 per flag

September 18, 2026 at 9:45 AM PT

InfoQ header illustration for the DoorDash feature flag cleanup story

Image: InfoQ

Why it mattersA large engineering team just showed a cleanup task usually spread across five to 20 files can be handed to a workflow of coding agents, with numbers to check the claim against.

DoorDash has built a multi-agent LLM workflow that automates the removal of stale feature flags across its codebase. In an evaluation of 50 flags, the system produced usable pull requests for 45 of them, at an average of 13.8 minutes and $4.79 per cleanup. DoorDash puts the manual cost at one to two hours per flag. The work was accepted for the ICSME 2026 industry track.

The size of the pile

DoorDash's experimentation platform holds more than 60,000 feature flags across roughly 623 repositories, and adds about 2,300 new ones each month. A flag is marked stale when it has not been modified for 90 days, is still referenced in code, and has not been archived, retired or excluded. A daily job files Jira tickets for the ones it finds; DoorDash says it has identified more than 1,000 stale flags already.

The cleanup is harder than a text search. DoorDash uses dependency-injected wrappers, so a single Boolean flag can touch five to 20 files, including tests, before it is fully removed. Uber's open-source Piranha tool works on the abstract syntax tree, and DoorDash reports that Piranha's rule-based approach did not cover its dependency-injection patterns, where the link between the flag and the business logic is semantic rather than something a matching rule can see.

The workflow, in two phases

The system runs on Google's Agent Development Kit. In the first phase, an orchestrator running Claude Sonnet reads the Jira ticket, searches the relevant repositories, and pulls metadata from the experimentation platform through Model Context Protocol, including rollout percentage and target value. An engineer reads the generated report and confirms the target value before any code changes start.

The second phase runs Claude Opus cleanup agents in isolated Git worktrees, up to four at once per repository. Each agent locates flag references, picks a cleanup strategy, edits source and tests, and runs builds, tests, JaCoCo patch coverage and Detekt static analysis. A pull request opens only if every check passes. Each agent has a one-hour timeout, and Gradle runs without its daemon so that one worktree cannot see the state of another.

The 45 usable pull requests broke down into 31 first-pass merges, 14 revisions, and five engineer interventions. Simple flags cleaned up on the first pass 100% of the time, medium-complexity flags 94%, and complex flags 85%. The five interventions all involved deep call chains and parameters threaded across interfaces. DoorDash says it found no bugs or regressions in the 50 evaluated changes.

The number worth stopping on is $4.79 per cleanup. Across 1,000 stale flags, that is under $5,000 to remove work that would otherwise take an engineer between 1,000 and 2,000 hours. An engineer still confirms the target value up front and still reviews the pull request at the end, so the change is in what the engineer spends the hour on.

DoorDash plans to add confidence scoring for lower-risk cleanups and a code-quality pass after the removal, to catch things like variable names that no longer make sense once a flag is gone.

Source

Automating Feature Flag Cleanup at Scale with a Multi-Agent LLM System (DoorDash Engineering). Reported by Leela Kumili at InfoQ.

Source: DoorDash Engineering

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

More from AI News

One developer rewrote a 65,000-line Go terminal editor in Rust with Claude Fable for about $400

Iurii Krasnoshchok reports that he rewrote his 65,000-line Go terminal editor "rune" in Rust using Claude Fable, for a token cost of about $400, by treating the code as data and orchestrating subagents rather than editing files directly.

Source: Hacker NewsProductivity

Coddy survey of 305 developers finds 43 percent keep coding past their planned stop time, and Codex users the most at 62 percent

A Coddy survey of 305 developers who use AI at work at least weekly found 43 percent kept coding past their planned stop time. The rate varied by tool: 62 percent for OpenAI Codex, 45 percent for Google Gemini, 40 percent for Claude Code, and 36 percent for GitHub Copilot. 80 percent said their AI use had felt more like a dependence than an advantage at least once.

Source: PressProductivity

Spotify measured 90% fewer tokens by sending bulk file reads to a cheaper model

Spotify says routing large file reads away from Claude Code to a cheaper worker model cut token use by about 90% on average, tested against a Java monorepo across four scenarios.

Source: Hacker NewsProductivity