The way I do this is I task the agent with writing a script which in turn does the updates. I can inspect that script, and I can run it on a subset of files/folders, and I can git revert changes if something went wrong and ask the agent to fix the script or fine-tune it myself. And I don't burn through tokens :)
Also, another important factor (as in everything) is to do things in many small steps, instead of giving one big complicated prompt.
Also, another important factor (as in everything) is to do things in many small steps, instead of giving one big complicated prompt.