[Model behavior] Shell redirect truncated files to zero bytes

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

To restore files, the model ran git show HEAD:<path> > <path> for paths that no longer existed in HEAD. git show failed, but the redirect had already truncated three source/test files to 0 bytes. The model had not checked what HEAD contained first, even though the user had committed in between.

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 ↗