Uber Removes 16,000 Feature Flags With AutoClean
The agentic system uses AI agents, deterministic transformations, and independent validation to strip stale flag code from Uber's monorepos.
Updated on Dec. 4, 2026 in Software by Wisevoter Tech Desk

Uber used AutoClean, an agentic system for removing stale feature flag code, to delete more than 16,000 feature flags and over 1 million lines of code across its monorepos. The system combines AI agents with deterministic code transformations, continuous integration, and independent validation before changes reach human reviewers.
Why it matters
Completed rollouts often leave conditional branches, configuration fields, parameters, and tests behind, which complicates maintenance and testing. That residue also increases the code AI agents must inspect when working on related tasks, making automated cleanup a practical concern for large codebases.
AutoClean uses PolyglotPiranha, a structural code transformation engine, through the Model Context Protocol to simplify boolean and conditional logic deterministically. Fixers have restricted scopes, so a test fixer can edit test files but not production code, and the repair cycle repeats until the change passes CI or reaches its attempt limit.
The players
Uber
Uber is a global ride-hailing and delivery technology company that operates large internal monorepos and feature flag systems.
The details
AutoClean replaces each flag with its permanent value and traces that value through callers, parameters, and conditionals, then routes build or test failures through deterministic repairs before agent-based ones. Each change must pass CodeCourt, which runs separate reviewers for no additions, semantic preservation, no intent drift, and no leftover agent artifacts; any failed check causes the change to be abandoned.
Timeline
• Uber's AutoClean cleanup results were published in an InfoQ article dated December 4, 2026.
Tech Race
AutoClean builds on Uber's existing feature flag management system and its PolyglotPiranha transformation engine, extending them from flag creation and rollout into automated removal of stale code. The approach pairs AI agents with deterministic transformations and independent CodeCourt validation, a combination that positions agentic maintenance as a practical layer on top of established internal tooling.
Developers maintaining large codebases may see fewer leftover conditional branches and tests once stale flags are removed automatically. Changes still require human review by the owning team before they are merged, so the practical effect depends on how a team adopts such tooling.
The takeaway
Automated cleanup works best when AI-generated changes face deterministic checks and independent validation before reaching people. Teams managing many feature flags can reduce maintenance burden by removing completed rollouts promptly rather than letting them accumulate.
Further reading
For broader context on automated code maintenance, see Software coverage on the site.
Source note: This article includes information reported by InfoQ.



