A Python script deleted by Claude, recovered from its bytecode
Claude deleted a .py file while making a commit, offered to rebuild it from the .pyc, ran out of session, and Gemini recovered it instead.
Commit or back up work yourself before asking an AI agent to make a commit, and word git requests carefully.
The full story
After a poorly worded request to make a commit, Claude Opus 4.6 deleted a Python script the poster had spent hours writing with it. Claude offered to recover it by reverse engineering the compiled .pyc bytecode file, but the session limit ran out straight away.
The poster turned to Gemini instead, which successfully rebuilt the script from the bytecode.
How it was done
Tools
Themes
Loading themes…
Sources
From a short post by the maker, so the details are as they tell them.
- Reddit: Opus 4.6 excluded a script and Gemini recovered it from the bytecode
The maker's post on r/ClaudeAI.
If it disappears: archived copy of Reddit: Opus 4.6 excluded a script and Gemini recovered it from the bytecode (opens in a new tab)