Automating Feature Flag Cleanup at Scale with Multi-Agent LLM Systems: An Industrial Experience at DoorDash
Feature flags become technical debt once fully rolled out, yet manually cleaning them at scale is prohibitively expensive. This paper describes a multi-agent LLM system deployed at DoorDash that automates stale flag removal by querying live rollout data via MCP, coordinating parallel cleanup agents in isolated git worktrees, and producing merge-ready pull requests. Evaluated on 50 stale flags across hundreds of repositories, the system produced usable PRs for 90% of cases at an average cost of $4.79 and 13.8 minutes per cleanup, offering one of the first quantitative industrial benchmarks for LLM-driven feature flag cleanup.
The paper presents a pragmatic, well-architected solution to an important industrial problem. The multi-agent design with model role specialization and live platform integration is sound, but the evaluation is small and retrospective. With only 50 DVs at a single company and no controlled human baseline or ablated design comparisons, the evidence supports operational viability within DoorDash's specific context more than it supports generalizable scientific conclusions.
The architectural rationale is tightly coupled to real codebase constraints. The three-layer dependency-injected wrapper pattern is clearly explained as semantically opaque to AST-based tools, making the LLM approach necessary rather than merely trendy. The integration with live rollout data via MCP is a critical safety mechanism, and the failure analysis is admirably honest in identifying completeness—not correctness—as the reliability boundary.
The empirical basis is limited. The evaluation covers only 50 DVs with complexity labels assigned post hoc by the authors, raising risks of selection bias and subjective classification. The reported 90% success rate conflates first-shot merges (62%) with cases needing revision (28%), meaning a significant fraction of cleanups still consume engineering attention. Cost figures exclude infrastructure spend on CI compute and test execution, and generalizability is explicitly constrained to Kotlin repositories at DoorDash.
Moreover, the system retains a mandatory human checkpoint for target-value confirmation, so the end-to-end automation claim applies only to Phase 2. For ambiguous rollout states or abandoned experiments, engineer review remains unavoidable, limiting the true throughput gains.
The conceptual comparison to rule-based tools like Piranha is well-argued but empirically one-sided: the authors declare Piranha 'structurally inapplicable' without attempting—or being able to attempt—a quantitative baseline on their codebase. The differentiation from recent industry LLM deployments is more robust; the authors fairly observe that prior reports from Google, Duolingo, and others lack published success rates, cost metrics, or failure analysis. Still, the absence of an ablation study (e.g., orchestrator and removal agent using the same model) makes it difficult to isolate the value of model role specialization.
Independent reproduction is blocked by proprietary dependencies. The paper does not release source code, prompts, or datasets, and the system relies on DoorDash's internal experimentation platform, Jira integration, private repositories, and a custom MCP server implementation. The evaluation is a retrospective analysis of the 50 most recent cleanups rather than a pre-registered experiment, and the authors explicitly caution that LLM non-determinism means re-running could yield different outcomes. While hyperparameters such as model versions (Claude Sonnet/Opus 4.6) and validation thresholds (JaCoCo patch coverage $\geq 95\%$) are reported, the absence of artifacts and the single-company scope make external verification impossible.
Feature flags are runtime configuration mechanisms used for gradual feature rollouts, experimentation, and kill switches. Once a feature is fully rolled out, the flag and its gated code become technical debt and can introduce operational risk through inadvertently enabling dormant code paths. At DoorDash, over 56,000 feature flags span 623 repositories, with 1,659 currently stale as of May 2026, with internal estimates of one to two hours per manual cleanup. Existing rule-based cleanup tools proved insufficient in DoorDash's codebases. Our contribution is an end-to-end automated LLM-based feature flag cleanup system that integrates querying live feature flag rollout data using MCP, Jira ticket processing, and end-to-end pull request creation. Our system successfully produced engineer-approved flag removal PRs for 45 (90%) of the 50 stale flags it was evaluated on, proving the system's operational viability at scale with each cleanup averaging only $4.79 and 13.8 minutes. We evaluated the system's quality and reliability boundary based on success rates, cost per cleanup and time metrics. Furthermore, we discuss our lessons learned when architecting this system, to provide practical guidance for developing similar multi-agent systems.
Pick a starting point or write your own. Challenges run in the background, so you can keep reading while the AI investigates.
No challenges yet. Disagree with the review? Ask the AI to revisit a specific claim.