DoorDash Cleans Up Stale Feature Flags Using Claude
DoorDash has built a multi-agent AI system powered by Claude to automate the removal of stale feature flags, slashing cleanup times from hours to minutes at a fraction of the cost.

DoorDash has developed a multi-agent LLM system to automate the removal of stale feature flags across its codebase. Managing more than 60,000 feature flags across roughly 623 repositories, the company generates about 2,300 new flags monthly and has identified more than 1,000 as stale. A flag is deemed stale if it is unmodified for 90 days, remains referenced, and is not archived. Manually removing these flags is tedious, often requiring changes across five to 20 files due to dependency-injected wrappers.
To solve this, DoorDash built a two-phase workflow using Google's Agent Development Kit. First, an orchestrator running Claude Sonnet pulls stale flag tickets from Jira and queries the experimentation platform via the Model Context Protocol (MCP) for metadata. After an engineer confirms the target value, the second phase begins. Claude Opus cleanup agents operate in isolated Git worktrees, running up to four concurrently per repository. These agents modify source code and tests, running validation checks like builds, JaCoCo patch coverage, and Detekt static analysis before opening a pull request.
In an evaluation of 50 stale flags, the system generated usable pull requests for 45 of them. The automated process averaged 13.8 minutes and cost $4.79 per cleanup, compared to the one to two hours required for manual work. The trial resulted in 31 first-pass merges, 14 revisions, and five manual interventions, with zero bugs reported. Simple flags saw a 100% single-pass cleanup rate, while medium and complex flags achieved 94% and 85% success rates.
For software engineers, this demonstrates how multi-agent AI can handle semantic code refactoring that traditional, rule-based tools like Uber's Piranha cannot resolve. By offloading tedious code deprecation to autonomous agents that validate their own work, developers can maintain a clean codebase without sacrificing hours of manual labor.
This is our own summary of reporting by InfoQ AI



