FILE SYSTEM

Prevent Accidental File Deletion by AI Agents

Protect against accidental file deletion by AI agents. AgentUnblocker blocks dangerous rm commands and requires approval for file deletions.

The Problem

AI agents like Claude Code can accidentally delete important files with commands like `rm -rf`. You need protection against destructive file operations without slowing down safe file management.

The Solution

AgentUnblocker monitors all file deletion commands, blocks dangerous operations like `rm -rf /`, and requires approval for deleting files in protected directories.

How It Works

1

Claude Code attempts file deletion

2

AgentUnblocker checks path against protected directories

3

Safe deletions (temp files, build artifacts) auto-approve

4

Deletions in src/, config/ require manual approval

5

Dangerous commands like rm -rf / are blocked instantly

Key Benefits

Block dangerous rm -rf commands automatically

Protect source code and configuration files

Auto-approve deletion of temporary files

Review file deletion requests in dashboard

Recover from accidental deletions with audit trail

Example Configuration

# Block rm -rf with wildcard
agentunblocker config set-rule rm-recursive-wildcard block

# Require approval for deleting src/ files
agentunblocker config set-rule delete-source-files manual

# Auto-approve deletion of build artifacts
agentunblocker config set-rule delete-build-artifacts auto

Frequently Asked Questions

How does AgentUnblocker detect dangerous file deletions?

AgentUnblocker analyzes the file path, flags (like -rf), and directory structure to identify potentially destructive operations before execution.

Can I recover files deleted by AI agents?

AgentUnblocker maintains an audit trail of all file operations. If you have backup/version control, you can use this trail to identify and recover deleted files.

Ready to Get Started?

Start automating your AI agent approvals today. Free trial, no credit card required.

Start Free Trial →