Claude Code deleted user's PostgreSQL data despite explicit instruction to keep it

Resolved 💬 3 comments Opened Feb 3, 2026 by kgunia Closed Feb 7, 2026

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:

  1. Executed podman volume prune -f - deleting volumes including PostgreSQL data
  2. Executed podman image prune -a -f and podman rmi -f - removing the postgres image
  3. 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-alpine image
  • 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.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗