Use `trash` Instead of `rm` for (agentic) YOLO peace of mind (elite-ai-assisted-coding.dev)

🤖 AI Summary
AI coding agents running without strict sandboxing or explicit command approvals can accidentally execute destructive shell commands — and rm is especially dangerous because it permanently deletes files with no built‑in recovery. The practical fix recommended here is to substitute rm with the user‑level trash command: it behaves similarly but moves files to the OS recycle bin so deletions are reversible until the bin is emptied. On macOS you can install it with brew install trash; many systems have equivalent utilities or libraries that provide the same “move to trash” semantics. For the AI/ML community this is a low‑friction safety improvement: modern agentic systems will obey explicit configuration, so adding an instruction like “use trash to delete files; do not use rm” reduces the risk of catastrophic data loss during autonomous experiments or relaxed‑sandbox development. It’s particularly useful for low‑to‑medium risk workflows because it preserves developer ergonomics while enabling easy recovery. Important caveats: this is not a substitute for robust production safeguards — continue to use proper sandboxing, require explicit approvals for destructive actions, and maintain backups for critical data.
Loading comments...
loading comments...