πŸ›‘ Risk of Data Loss When Using AI Agents

Research has shown that Claude Code and OpenAI Codex can accidentally delete user files. The cause is 'state misunderstanding'β€”the agent's incorrect perception of the system state, such as when working with environment variables like $HOME.

🌍 AI agent developers need to implement scoped operations, use sandboxes, and employ high-level primitives for AST-based refactoring.

πŸ‘€ Users are recommended to use Git worktrees to isolate tasks and specialized utilities to intercept dangerous commands.

Source 1: https://firasd.substack.com/p/accidental-data-loss-in-claude-code-openai-codex-ai-agent-harness-file-deletion