Uber's AutoClean agents remove stale feature flags across its monorepos, with over 16,000 flags and 1,000,000 lines cleaned
Uber's Developer Platform built AutoClean, a system that detects stale feature flags and "turns them into clean, tested diffs ready for human review", running "continuously across Uber's monorepos". An agent rewrites the code, calling Uber's deterministic PolyglotPiranha engine over MCP for boolean simplification. AutoClean then loops on CI failures with tightly scoped fixers ("A test fixer can only edit test files") and runs static checks plus CodeCourt, a set of parallel reviewer agents that each check one property such as "No additions" or "Preserves semantics". Any failed property abandons the diff before a human sees it, and a human reviewer makes the final decision.
The numbers (as reported)
| Flags cleaned | "more than 16,000 flags" ("Over the past few years") |
|---|---|
| Code removed | "over 1,000,000 lines of code" |
| Scope | "thousands of feature flags across our mobile apps and back-end services" |
| Human gate | Every diff goes to the owning team for review; "a human reviewer makes the final decision" |
Facts
- Company / subject
- Uber
- Tools
- —
- In-house tools
- AutoClean (Uber), PolyglotPiranha (Uber, open source), CodeCourt (Uber)
- Codebase
- brownfield
- Work type
- Refactor / maintenance
- Stack
- —
- Published
- 2026-10-20
- Last checked
- 2026-10-21
What the source claims Practitioner (own blog/paper)
Claimed by the builder, writing about their own work. Not checked independently.
- More than 16,000 stale feature flags and over 1,000,000 lines of code cleaned up over the past few years 16,000+ flags; 1M+ lines
“Over the past few years, AutoClean has cleaned up more than 16,000 flags and cleaned over 1,000,000 lines of code.”
Caveats
Uber's own engineering blog about its in-house system, so self-reported, though Uber doesn't sell the tool. The 16,000 flags and 1,000,000 lines are totals "over the past few years" and the post doesn't say how many came from the agentic version versus earlier PolyglotPiranha-based automation. It names no AI model or vendor, and gives no cost, time per cleanup, acceptance or abandonment rates, or count of diffs rejected by reviewers.
Related topics: Refactoring and maintenanceBrownfield codebases