Hi Joel,
Like Ashwanth, we also use a custom script to clean up Pipeline working directories. We run ours as a Windows Scheduled Task and leave the 5 most recent working directories. This creates an opportunity for race conditions, though, if the Agent happens to pick up a Job for a Pipeline while the cleanup script is in the middle of deleting that Pipeline's directory.
We haven't run into any issues yet but, if we do, we may have to look at adopting Ashwanth's idea of running cleanup in a dedicated Pipeline.
Cheers,
Jason