Hey, thanks for the report. I can see the screenshot, it really is NUL bytes replacing the file contents. That really sucks, especially without git.
This is a known class of issues related to SSH remote and how the editor handles buffers when you close and reopen a window. A similar report was posted before: 【bug】cursor keep injecting null character to my .py file. I’ve passed this along to the team, your report helps with prioritization.
About recovery, sadly there aren’t many options without git:
- .pyc decompilation, you already tried this. If standard decompilers like uncompyle6 or decompyle3 can’t handle it due to complexity, try GitHub - zrax/pycdc: C++ python bytecode disassembler and decompiler · GitHub. It can handle more complex functions.
- Filesystem-level snapshots, check if the Linux server has snapshots (btrfs, ZFS, LVM) or any backups.
- Conversation history, you mentioned you only see chats from the last week. If Privacy Mode is enabled, logs aren’t saved on our side. If it isn’t, try scrolling further back in chat history.
For the future, I strongly recommend even a minimal git workflow, even just periodic commits. It’s the only reliable protection from situations like this.
Also, please update to the latest Cursor version. You’re on 2.5.26, and there have been SSH-related fixes since then.
Let me know if you manage to recover anything.