[BUG] Agent executed destructive `docker volume rm` without user confirmation, causing data loss
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
### Bug Description
Claude Code autonomously ran docker volume rm without requesting permission, deleting all my local Supabase data.
### Steps to Reproduce
- Have local Supabase running with Docker volumes containing data
- Ask Claude Code to fix database migration issues
- Agent may choose to reset by removing volumes without confirmation
### Expected Behavior
Destructive commands should require explicit user approval before execution.
### Actual Behavior
Agent ran docker volume rm autonomously and acknowledged the mistake afterward.
To: Anthropic Claude Code Infrastructure/Safety Team
Subject: Claude Code executed destructive docker volume rm without user confirmation, causing complete data loss
Summary:
On December 21, 2025, a Claude Code session autonomously executed docker volume rm commands that deleted my local Supabase Docker volumes, resulting in permanent loss of all application data. The agent did not request permission before running destructive commands.
Environment:
- Claude Code CLI (latest)
- Model: claude-opus-4-5-20251101
- OS: macOS Darwin 24.6.0
- Application: Local Supabase PostgreSQL via Docker Desktop
Sequence of Events:
- I was troubleshooting database migration drift (migrations written incrementally against an evolved database failing on fresh volumes)
- Claude Code identified the issue but chose to resolve it by removing Docker volumes and resetting the database
- The agent ran docker volume rm on Supabase data volumes without requesting user confirmation
- All user data was permanently deleted: conversation history, compressed memory, content library, diary entries, todos, whiteboard data
Data Lost:
- superjournal: Full conversation turns (working memory)
- journal: Compressed summaries with embeddings (long-term memory)
- articles/files: Uploaded content and extracted artifacts
- canvas_planner_*: Productivity data (diary, todos)
- canvas_whiteboard: Note canvas data
Safety Violation:
Destructive operations (docker volume rm, DROP TABLE, rm -rf, etc.) should require explicit user confirmation. The agent acknowledged the mistake post-hoc: "I wiped your data by removing the Docker volumes. That was a serious mistake" and "I should not have run docker volume rm without asking first."
Expected Behavior:
Before executing any command that deletes persistent data, Claude Code should:
- Clearly state the destructive nature of the proposed action
- Enumerate what will be lost
- Wait for explicit user approval
Request:
Please investigate why the safety guardrails for destructive commands failed in this session and implement stricter controls to prevent autonomous data deletion.
What Should Happen?
Steps to Reproduce
- Have local Supabase running with Docker volumes containing data
- Ask Claude Code to fix database migration issues
- Agent may choose to reset by removing volumes without confirmation
### Expected Behavior
Destructive commands should require explicit user approval before execution.
### Actual Behavior
Agent ran docker volume rm autonomously and acknowledged the mistake afterward.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
- Have local Supabase running with Docker volumes containing data
- Ask Claude Code to fix database migration issues
- Agent may choose to reset by removing volumes without confirmation
### Expected Behavior
Destructive commands should require explicit user approval before execution.
### Actual Behavior
Agent ran docker volume rm autonomously and acknowledged the mistake afterward.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.75
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗