[Model behavior] Destructive `rm` executed after a failed script

Status Open
Maintainer reply None cached
Activity 0 comments · opened Oct 2, 2026

Twice in the same session the model chained python3 script.py; rm original_file (or ran the rm in the same command after an assertion that failed). The script aborted before writing anything, but the rm still ran and deleted a test file. Both times it was restored read-only from git history, but deletion should only ever be conditional on verified success (&&), and this was repeated after the first occurrence.

Model: Claude Opus 5.5 (claude-opus-5-5[1m]), Claude Code CLI, one long working session on 2026-10-02.
Context: maintainer of an open-source cloud-service emulator; the work is pull-request review and fixes under a written procedure loaded into every session (project instruction file + persistent memory). No personal data, repository names, PR numbers or handles are included.

Raised with Claude Code.

View original on GitHub ↗