# Cursor\_ai Agent used rm -rf to delete files from a parallel subdirectory

**URL:** <https://forum.cursor.com/t/cursor-ai-agent-used-rm-rf-to-delete-files-from-a-parallel-subdirectory/44742>\
**Category:** Help\
**Created:** [January 25, 2025, 11:18am UTC](https://forum.cursor.com/t/cursor-ai-agent-used-rm-rf-to-delete-files-from-a-parallel-subdirectory/44742 "2025-01-25T11:18:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoLiu-ai](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/joliu-ai/32/22198_2.png) [@JoLiu-ai](https://forum.cursor.com/u/JoLiu-ai)\
**Post date:** [January 25, 2025, 11:18am UTC](https://forum.cursor.com/t/cursor-ai-agent-used-rm-rf-to-delete-files-from-a-parallel-subdirectory/44742/1 "2025-01-25T11:18:11Z")

</div>

Just now, @cursor\_ai Agent used rm -rf to delete files from a subdirectory, and the system went ahead and wiped all files from a completely unrelated sibling directory! No warning, no prompt, no backup. Now I’ve lost critical files and hours of work.

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [January 25, 2025, 11:21am UTC](https://forum.cursor.com/t/cursor-ai-agent-used-rm-rf-to-delete-files-from-a-parallel-subdirectory/44742/2 "2025-01-25T11:21:48Z")

</div>

Hey, it looks like you’re using YOLO mode. You can specify which commands can be executed and which cannot in the Cursor settings. Make sure to specify critical commands.

 ![image](https://us1.discourse-cdn.com/cursor1/original/3X/8/f/8fff33540252f998deacaafcdaab2134f677fedc.png)

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 18, 2026, 10:25am UTC](https://forum.cursor.com/t/cursor-ai-agent-used-rm-rf-to-delete-files-from-a-parallel-subdirectory/44742/3 "2026-06-18T10:25:47Z")

</div>

Closed on June 18, 2026, 10:25am UTC


