Refactoring and maintenance: 3 sourced coding agent stories
Cleaning up, restructuring or fixing existing code without changing what it does. Of the 3 stories, 1 was published by a tool vendor and 2 by the people who did the work. 2 involve an existing codebase and 1 started from scratch. Every number links to where it was published.
- Practitioner (own blog/paper) Refactor / maintenance greenfield
An agent-written 150,000-line Rust app shows refactoring one 17,155-line file cut input tokens per change by 83%
Giles Edwards-Alexander (writing on martinfowler.com) · 2026-07-30
- ~150,000 lines (~120k Rust) App size
- 17,155 lines Largest file before
- 3,695 lines Largest file after
Claude Code, Cursor
- Vendor-published Refactor / maintenance brownfield
Cisco uses Codex across 15+ repos to cut build times ~20% and speed up C/C++ defect fixing
Cisco · 2026-01
- 1,500+ per month Engineering hours saved
- ~20% reduction Build time
- 10–15× increase Defect resolution throughput
OpenAI Codex
- Practitioner (own blog/paper) Refactor / maintenance brownfield
Google Ads uses LLMs to migrate 32-bit IDs to 64-bit in a 500M+ line codebase
Google · 2025-01
- 500M+ lines Codebase size
- 80% Code changes fully AI-authored (landed CLs)
- ~50% reduction (engineer-reported estimate) Total migration time
Google internal migration toolkit (fine-tuned Gemini)