Have agents write scratch output outside the repo, while anything that matters lives in version control. That way you can purge the scratch files whenever you like.