# Failed build: Agent not cleaned up

**URL:** https://www.finalbuilder.com/forums/t/failed-build-agent-not-cleaned-up/5277
**Category:** Discussion
**Created:** [November 19, 2014, 8:31am UTC](https://www.finalbuilder.com/forums/t/failed-build-agent-not-cleaned-up/5277 "2014-11-19T08:31:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)
#### Post date: [November 19, 2014, 8:31am UTC](https://www.finalbuilder.com/forums/t/failed-build-agent-not-cleaned-up/5277/1 "2014-11-19T08:31:50Z")

</div>

Its seems that when a build fails, the agent work space will not be cleaned up.  
If i run a build a stop it manually, its cleaned up as expected.  
  
The agent clean up policiy is not restricted or overriden.

---

<div class="post-metadata">

### Author: ![christian.leh](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@christian.leh](https://www.finalbuilder.com/forums/u/christian.leh)
#### Post date: [November 19, 2014, 8:32am UTC](https://www.finalbuilder.com/forums/t/failed-build-agent-not-cleaned-up/5277/2 "2014-11-19T08:32:34Z")

</div>

\*If i run build and stop it manually, …

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [November 20, 2014, 3:38am UTC](https://www.finalbuilder.com/forums/t/failed-build-agent-not-cleaned-up/5277/3 "2014-11-20T03:38:26Z")

</div>

Hi Christian,  
  
In our tests the agent workspace cleans up according to the cleanup rules when the build fails. This cleanup may be prevented if a file is open or locked, although it should then cleanup at the next scheduled server cleanup. Are there any errors in the event log? If not, can you send server and agent debug logs to [support@finalbuilder.com](mailto:support@finalbuilder.com)
