I've been debloating some of my personal projects — you know how it goes, "keep adding one more thing" driven development.
I asked Claude Code to simplify the code. It spent ten minutes spinning, making countless edits. They all turned out to be superficial. It reduced the code by 3%.
Then I asked the same model (Sonnet) in my web chat UI to do the same thing, and it reduced it by 50% — the program remaining otherwise identical, in terms of appearance and behavior.
I love the agents but they are explicitly designed not to rewrite entire files, and sometimes doing that gives you way, way better results. 15x better, in this case!
(Even better might be to first rewrite it into user stories, instead of incidental implementation details... hmm...)
My current thoughts on the subject: code is bloat. Just ask for what you want. I did that and got 90% reduction. I don't miss any of the other features yet. If I ever do, I'll just add them again...
I asked Claude Code to simplify the code. It spent ten minutes spinning, making countless edits. They all turned out to be superficial. It reduced the code by 3%.
Then I asked the same model (Sonnet) in my web chat UI to do the same thing, and it reduced it by 50% — the program remaining otherwise identical, in terms of appearance and behavior.
I love the agents but they are explicitly designed not to rewrite entire files, and sometimes doing that gives you way, way better results. 15x better, in this case!
(Even better might be to first rewrite it into user stories, instead of incidental implementation details... hmm...)