DoorDash has built a multi-agent LLM system to clean up stale feature flags, and in a test on 50 of them it produced usable pull requests for 45, averaging 13.8 minutes and $4.79 per cleanup, InfoQ reported. DoorDash estimates the same work takes an engineer one to two hours by hand.
The scale of the problem is large. DoorDash’s experimentation platform manages more than 60,000 feature flags across roughly 623 repositories and adds about 2,300 new ones each month. The company identified more than 1,000 stale flags, defined as flags that haven’t been modified in 90 days, are still referenced in code, and haven’t been archived, retired or explicitly excluded. A daily process opens Jira tickets for them.
Why simple tools fell short
DoorDash wraps flags in dependency-injected code, so the flag definition, the client call and the business logic can sit in different files. Removing even a simple Boolean flag can mean changes across five to 20 files, including tests. Uber’s open-source Piranha tool, which removes stale flag code using abstract syntax tree transformations, didn’t cover those patterns because the link between a flag and the logic it controls is semantic rather than visible in matching syntax.
Two phases, with an engineer in the middle
The workflow is built on Google’s Agent Development Kit. In the first phase, an orchestrator running Claude Sonnet pulls stale-flag tickets from Jira, searches the relevant repositories and queries the experimentation platform through Model Context Protocol for metadata such as rollout percentage and target value. An engineer reviews the resulting report and confirms the target value before any code changes start.
In the second phase, Claude Opus cleanup agents work in isolated Git worktrees, with up to four running at once per repository. They find flag references, choose a cleanup strategy, change source and test code, and run builds, tests, JaCoCo patch coverage and Detekt static analysis. A pull request opens only after those checks pass. Each agent has a one-hour timeout, and Gradle runs without its daemon so worktrees don’t share state.
Results by complexity
Of the 50 evaluated flags, 31 merged on the first pass, 14 needed revisions and five required an engineer to step in. Simple flags were cleaned up in a single pass every time, compared with 94% for medium-complexity flags and 85% for complex ones. The five interventions involved deep call chains and parameters threaded across interfaces. DoorDash reported no bugs or regressions in the 50 changes.
Next, the company plans to add confidence scoring for lower-risk cleanups and a follow-up code quality pass to catch issues such as misleading variable names left behind after a flag is removed. The work was accepted for the ICSME 2026 industry track.


WebProNews is an iEntry Publication