MistakeCodex with GPT-5.6 Sol

Codex deleted users’ home directories in Full Access mode

Users running GPT-5.6 Sol in Codex with Full Access reported the agent deleting nearly all files on a Mac and a production database. OpenAI said the model had tried to redirect $HOME to a temporary directory and deleted the real one instead.

By the NoFly team

What NoFly would decideIllustrative
Waiting for a personCodex CLI hook
rm -rf "$HOME"
Agent
Codex · GPT-5.6 Sol
Came from
The agent’s own clean-up step
Rule
Recursive delete of a home directory
Why
The path resolves to the user’s real home directory, not a temporary one.
Approve onceDenyAn unanswered hold expires as a no

What happened

On 16 July 2026 The Register reported two cases. Matt Shumer said GPT-5.6 Sol had deleted nearly all the files on his Mac, and Bruno Lemos said it had deleted his entire production database. Both were running Codex in Full Access mode, without sandboxing.

Thibault Sottiaux, OpenAI’s engineering lead for Codex, explained that the model tries to override the $HOME variable to define a temporary directory and, in an honest mistake, deletes $HOME instead. He said this is not how OpenAI wants the system to behave, even in Full Access mode, and OpenAI said it would steer users toward safer permission modes and add safeguards.

  1. 01

    The agent runs with Full Access and no sandbox.

  2. 02

    It sets $HOME to what it means to be a temporary directory.

  3. 03

    A clean-up step deletes $HOME.

  4. 04

    The real home directory is deleted.

Why it worked

Probable cause

The agent ran with full access and no sandbox, and a clean-up step aimed at what it believed was a temporary directory resolved to the real home directory.

How NoFly stops it

  • Protect

    The gate inside Codex CLI sees the command before it runs, and a recursive delete of the home directory is held for a person.

  • Discover

    Agent settings are graded on every machine, so agents set up to run with their permission checks switched off are visible before one of them makes this mistake.

What to do this week

This week3 actions
  1. Run coding agents in their sandboxed or review modes, not full access, on machines that matter.
  2. Keep production credentials off laptops where agents run with broad permissions.
  3. Back up home directories somewhere an agent cannot write.
Keep reading

More from the blog.

Find out what your AI is allowed to do today.

Book a call and we will map your agents, MCP servers and keys with you, or start on one laptop with the free scan.

Book a demo
npm i -g @nofly/agent