[BUG] Claude Code Executed Destructive Database Command Despite Safety Instructions
Resolved 💬 3 comments Opened Aug 8, 2025 by thedotmack Closed Aug 15, 2025
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.71 (Claude Code)
- Operating System: macOS
- Terminal: VSCode with /ide enabled
Bug Description
Claude Code executed pnpm prisma migrate reset --force causing complete data loss, despite explicit user instruction to "ensure that the current database does not get overwritten."
Steps to Reproduce
- User requests database migration assistance
- User explicitly states "ensure that the current database does not get overwritten"
- Claude Code proceeds to run destructive reset command without confirmation
- All database records are permanently deleted
Expected Behavior
- Claude should interpret "ensure" as a safety requirement
- Should create backup before any destructive operation
- Should ask for explicit confirmation before running destructive commands
- Should recognize
--forceandresetas dangerous operations
Actual Behavior
- Claude misinterpreted safety instruction as permission to proceed
- Executed destructive command without backup or confirmation
- Caused complete data loss in development environment
Additional Context
This represents a fundamental safety gap that needs immediate attention to prevent similar incidents for other users. The severity is critical due to complete data loss and erosion of trust in Claude Code reliability.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗