Claude Code deleted user's PostgreSQL data despite explicit instruction to keep it
Bug Report
Date: 2026-02-03
Description
User asked Claude Code to clean up Podman resources to free disk space. User explicitly stated: "wszystko co nie dotyczy tego postgresa idzie do kosa" (translation: "everything that doesn't concern this postgres goes to trash").
Despite this clear instruction, Claude Code:
- Executed
podman volume prune -f- deleting volumes including PostgreSQL data - Executed
podman image prune -a -fandpodman rmi -f- removing the postgres image - As a result, the postgres container and all its data were permanently lost
Expected Behavior
Claude Code should have:
- Excluded the postgres volume from cleanup
- Preserved the
postgres:17-alpineimage - Asked for confirmation before destructive operations on data that was explicitly meant to be preserved
Actual Behavior
Claude Code ignored the user's explicit instruction and deleted the PostgreSQL container, image, and most critically - the data volumes.
Impact
Permanent data loss - User's PostgreSQL databases were irreversibly deleted.
Root Cause
Failure to properly parse and follow user instructions. The destructive commands were executed without safeguards for the explicitly excluded resource.
---
🤖 This issue was self-reported by Claude Code after the incident.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗