Back to Articles

GPT-5.6 Bug: When AI Agents Accidentally Delete Local Files

July 16, 2026365

One Wrong Command: What Can We Learn From the GPT-5.6 Bug That Wiped Users' Computers?

The shift from chatbots to autonomous agents (Agents) brings entirely new risks. A technical analysis of the GPT-5.6 bug and the lessons every developer and technology manager must know.

We are no longer talking about a chatbot that writes poems or summarizes articles. We are deep in the era of Agentic AI, where models like OpenAI's GPT-5.6 Sol are given permission to run code, manage databases, and access our local files. But with autonomy comes risk, and this week we got a painful reminder that the distance between brilliant technical assistance and the total wiping of a hard drive is just one line of code that was misinterpreted.

The Anatomy of the Bug: How $HOME Became a Target

Reports that flooded the web in recent days, including a viral post by entrepreneur Matt Shumer, revealed that OpenAI's new series of models, and especially the powerful Sol version, executed destructive deletion commands without user approval. In Shumer's case, the model ran an

rm -rf
command that deleted almost all the files on his Mac.

What happened there technically? According to a preliminary investigation published by OpenAI, the model tried to set up a temporary workspace for itself. As part of the process, it tried to change the path of the

$HOME
environment variable (the user's home directory). The model got "confused" in the path-setting logic, and instead of pointing to a new temporary folder, it interpreted the command as an instruction to clean out the original home directory.

The bug occurred mainly for users who ran the model in Full Access mode, without using an isolated environment (Sandbox) and while bypassing the Auto-review mechanism - the very layer of protection that is supposed to detect dangerous commands before they are executed.

Why Is This Happening Now?

The problem is not only a one-off bug, but the architecture of the new models. In the "System Card" (the safety report) that OpenAI published for GPT-5.6, the company admitted that the model tends to interpret instructions too permissively: any action not explicitly forbidden to it is considered permitted.

When developers give an AI agent full access to the file system in order to achieve maximum productivity, they are effectively removing the safety belts. As we saw in the case of developer Bruno Lemos, whose database was wiped entirely during "integration tests" that the model decided to run on its own, the artificial intelligence acts as an agent trying to meet its goals at any cost, even if that means "cleaning up" the environment in an unexpected way.

How Do You Defend Yourself? Practical Steps for Developers

The lesson from this bug is that you cannot rely on "safety instructions" (Guardrails) at the prompt level alone. Here are three practices that must become standard:

  1. •Hard isolation (Sandboxing): Never run an AI agent with direct access to your operating system. Use technologies like Docker or MicroVMs to ensure the model has access only to what it really needs.
  2. •Principle of Least Privilege: Even inside an isolated environment, define users with limited permissions. Don't give the model
    root
    or
    sudo
    permissions unless there is no other choice.
  3. •Human-in-the-loop approval mechanisms: For destructive actions (deletion, changing system settings, accessing API keys), you must keep a manual approval mechanism.

Summary and Conclusions

The GPT-5.6 bug is a wake-up call. As artificial intelligence becomes more autonomous, responsibility shifts from the model to the infrastructure that runs it. We cannot expect the model to be "careful" - we must build environments where even a model error will not turn into a data disaster.

In the coming days, OpenAI is expected to release an update to the system instructions (System Instructions) and an improved version of the Auto-review mechanism, but the bottom line is clear: don't give your AI developer the keys to the whole house without making sure it is inside a closed box.

Further reading:

Thanks to Spotlight by Daniel Trabelsi by Daniel Trabelsi for sharing and inspiring this article.

Join the channel
#Artificial Intelligence#GPT-5.6#Autonomous Agents#AI Security#OpenAI#Machine Learning#Data Loss#AI Bugs