Sometimes it will make a mess, but a coding agent is also very useful during the cleanup phase.
Yes, that's assuming you take time to clean up now and then. If you don't, that's on you.