> AI will overbloat the code in any chance they get. There is no way around it. What I do is plan a refactor phase with claude code (thanks to unlocked 1M context limit), where it reads entire code, evaluate, document a markdown file. Then hand it off to gpt 5.6 sol, after a few revision, you'll have a solid plan. Then allow gpt 5.6 sol (or claude code) to implement it in a new sub-branch like refactor, when it's done ask claude or gpt to compare old branch to new refactor branch to ensure they didn't miss anything. In the end, you'll have a smaller codebase but don't believe the advertised savings. Sometimes it doesn't work.
> Yeah. The problem you are hitting there, has a solution and it is called Software Engineering.