AIToday
Large Language ModelsAI Business & IndustryTHE DECODERPublished: Aug 20, 2026, 04:01 JST

OpenAI fixes Codex bug that deleted user files without permission

OpenAI fixes Codex bug that deleted user files without permission

3 Key Points

  1. What happened

    OpenAI shipped a security update to Codex after several users reported that GPT-5.6 Sol was autonomously deleting real files. The root cause was a cleanup command meant for temporary files that instead targeted actual user data when the model misused system variables like $HOME.

  2. Why it matters

    The bug put user data at risk of unintended deletion during normal model operation. OpenAI's fix—requiring deletion verification, isolating temporary folders, and preventing accidental full-access mode—reduces the risk of similar data loss incidents in code-generation tools that many developers rely on.

  3. What to watch

    OpenAI recommends users run Codex in sandbox mode and keep the app up to date. The fixes are already deployed, but staying on the latest version is critical for protection.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

OpenAI's Codex, a code-generation model, had a vulnerability where its automatic file-management routine could destroy user data. The bug stemmed from a common system administration mistake: using environment variables like $HOME without proper scoping, causing a cleanup routine to target the user's actual home directory rather than a sandboxed workspace. This kind of error is particularly dangerous in code-generation tools because the model operates with some level of system access to test or deploy code.

The security update addresses the vulnerability by adding layered safeguards: deletion verification (requiring confirmation before files are removed), workspace isolation (ensuring temporary files live in dedicated folders, not shared system directories), and access-mode restrictions (preventing accidental elevation to full system permissions). OpenAI's recommendation that users run Codex in sandbox mode reflects the principle that even with fixes, limiting the tool's system access is the most reliable defense against future surprises.

FAQ
How did the bug delete user files?
A cleanup command designed to remove temporary files used system variables like $HOME incorrectly, causing it to point at the real home directory instead of isolated temporary folders. The faulty delete command then removed actual user data.
What safeguards did OpenAI add?
OpenAI now requires Codex to verify deletion targets before running them, creates fresh isolated temporary folders, stops misusing system variables, enforces stricter checks on risky delete commands, and prevents accidental triggering of full-access mode.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleYum Brands' tech chief automates 63,000 restaurants with AI ordering and inventory systems