Nothing surprising and OP seem understandable of what have happened. But I should maybe take the opportunity here and remind you guys to:
- Use version control
- Backup your things somewhere (not same drive or use Cloud / NAS whatever), Windows have a cool feature called File history! But no one trusts Windows anyways so stick to external backup
- Restrict the agent a lot, make it least-privileged user
- Restrict it in a virtualized filesystem so it cannot work outside of its scope
- Devcontainers?
- Do not use auto allow actions, always supervise the actions it wants to perform outside reading/writing code
- Avoid fully automated agents at all outside of sandboxed environments haha