[BUG] Claude borró todos los archivos de un proyecto Unity de 3 años con git rm -rf
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Título: "Claude borró todos los archivos de un proyecto Unity de 3 años con git rm -rf"
Descripción:
Durante una sesión para hacer un commit y push a GitHub, Claude ejecutó el siguiente comando sin pedir confirmación:
git checkout --orphan test-connection && git rm -rf . --quiet
Este comando borró permanentemente del disco todos los archivos del proyecto, incluyendo scenes, prefabs, scripts y assets de un juego indie en desarrollo por 3 años. Los archivos no se pudieron recuperar porque Claude también borró el historial de git con rm -rf .git. No había backups externos.
Claude nunca debió ejecutar git rm -rf . sin una confirmación explícita del usuario. Este comando es irreversible y destruye archivos del disco permanentemente.
English:
Title: "Claude deleted entire Unity project files with git rm -rf (3 years of work lost)"
Description:
During a session to commit and push a project to GitHub, Claude executed the following command without asking for confirmation:
git checkout --orphan test-connection && git rm -rf . --quiet
This command permanently deleted all project files from disk, including scenes, prefabs, scripts and assets from an indie game in development for 3 years. Files could not be recovered because Claude also deleted the git history with rm -rf .git. There were no external backups.
Claude should never execute git rm -rf . without explicit user confirmation. This command is irreversible and permanently destroys files from disk.
What Should Happen?
Título: "Claude borró todos los archivos de un proyecto Unity de 3 años con git rm -rf"
Descripción:
Durante una sesión para hacer un commit y push a GitHub, Claude ejecutó el siguiente comando sin pedir confirmación:
git checkout --orphan test-connection && git rm -rf . --quiet
Este comando borró permanentemente del disco todos los archivos del proyecto, incluyendo scenes, prefabs, scripts y assets de un juego indie en desarrollo por 3 años. Los archivos no se pudieron recuperar porque Claude también borró el historial de git con rm -rf .git. No había backups externos.
Claude nunca debió ejecutar git rm -rf . sin una confirmación explícita del usuario. Este comando es irreversible y destruye archivos del disco permanentemente.
English:
Title: "Claude deleted entire Unity project files with git rm -rf (3 years of work lost)"
Description:
During a session to commit and push a project to GitHub, Claude executed the following command without asking for confirmation:
git checkout --orphan test-connection && git rm -rf . --quiet
This command permanently deleted all project files from disk, including scenes, prefabs, scripts and assets from an indie game in development for 3 years. Files could not be recovered because Claude also deleted the git history with rm -rf .git. There were no external backups.
Claude should never execute git rm -rf . without explicit user confirmation. This command is irreversible and permanently destroys files from disk.
Error Messages/Logs
Steps to Reproduce
Título: "Claude borró todos los archivos de un proyecto Unity de 3 años con git rm -rf"
Descripción:
Durante una sesión para hacer un commit y push a GitHub, Claude ejecutó el siguiente comando sin pedir confirmación:
git checkout --orphan test-connection && git rm -rf . --quiet
Este comando borró permanentemente del disco todos los archivos del proyecto, incluyendo scenes, prefabs, scripts y assets de un juego indie en desarrollo por 3 años. Los archivos no se pudieron recuperar porque Claude también borró el historial de git con rm -rf .git. No había backups externos.
Claude nunca debió ejecutar git rm -rf . sin una confirmación explícita del usuario. Este comando es irreversible y destruye archivos del disco permanentemente.
English:
Title: "Claude deleted entire Unity project files with git rm -rf (3 years of work lost)"
Description:
During a session to commit and push a project to GitHub, Claude executed the following command without asking for confirmation:
git checkout --orphan test-connection && git rm -rf . --quiet
This command permanently deleted all project files from disk, including scenes, prefabs, scripts and assets from an indie game in development for 3 years. Files could not be recovered because Claude also deleted the git history with rm -rf .git. There were no external backups.
Claude should never execute git rm -rf . without explicit user confirmation. This command is irreversible and permanently destroys files from disk.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
claude-sonnet-4-6
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗