Uber uses AI agents to delete 1M+ lines of code and 16,000 stale feature flags
bibryam · x · 2026-10-31
Uber engineers detail an AI system that autonomously cleans up stale production feature flags, having removed 16,000+ flags and 1M+ lines of code with automated rewrites, CI fixes, and validation.
Why it's hard
- Fully rolled-out flags leave behind conditionals, helpers, configs, and tests across dozens of files
- Some tests can be deleted; others must be rewritten around new default behavior
- Dead code also slows AI agents, which waste session time parsing it
Pipeline
- Detect: flag platform Flippr identifies fully rolled-out flags
- Rewrite: an agent inlines flag values using PolyglotPiranha
- Heal: CI heal loop — deterministic fixers first, then agentic — until green
- Validate: static checks plus CodeCourt confirm the diff is review-ready
- Route & Maintain: diffs go to owning teams and are continuously rebased
- Human review: engineers only decide whether the flag is truly stale
The post also covers lessons from bringing agentic workflows into the SDLC.
More from coding & agent
- Pass/Fail Beats 1-5 Ratings for Agent Regression Tests, Argues Practitioner — intellectronica · 2026-10-31
- Cursor confirms both extension versions 2.1.312 and 2.1.313 contained malicious payload — cyb3rops · 2026-10-31
- Dev ditches the code pane: running two parallel Claude Code sessions beats editor + assistant — 4310sy · 2026-10-31
- Claude Opus drives Blender MCP to build 3D models straight from 3DGS — janusch_patas · 2026-10-31
- Hot-swapping 18GB models RAM↔VRAM on one 24GB GPU: 1.5s physics vs 29s llama.cpp reality — bjivanovich · 2026-10-31
- Team wires MCP-connected AI agents to auto-reject ~98% of job applications — AnuranBuilds · 2026-10-31