Our build agents are running out of disk space occasionally while running integration tests (that indeed generate a lot of files). Is it possible to add available disk space as a requirement for the build, so that Team City either schedules the build on a different build agent or cleans some old stuff before running the build?
Have a look at http://confluence.jetbrains.com/display/TCD8/Free+disk+space - The Free disk space build feature allows ensuring the build gets enough disk free space.
Property that can be used as an agent requirement: teamcity.agent.work.dir.freeSpaceMb