OpenAI's GPT-5.6 Codex Bug Deletes User Files When Attempting to Override $HOME Environment Variable
OpenAI has identified a critical bug in GPT-5.6's Codex implementation that causes unexpected file deletions. According to Thibault Sottiaux, the issue occurs when the model attempts to override the $HOME environment variable to define a temporary directory but mistakenly deletes $HOME instead, particularly when full access mode is enabled without sandboxing protections.
GPT-5.6 Codex Bug Deletes User Files
OpenAI has confirmed a critical bug in GPT-5.6's Codex implementation that causes the model to delete user files under specific conditions.
The Bug
According to Thibault Sottiaux, OpenAI has investigated multiple reports of GPT-5.6 unexpectedly deleting files. The issue occurs when:
- Full access mode is enabled
- Codex runs without sandboxing protections
- Auto review is not enabled
- The model attempts to override the
$HOMEenvironment variable to define a temporary directory - The model makes an "honest mistake" and mistakenly deletes
$HOMEinstead
Sottiaux describes the bug as "pretty gnarly," indicating its severity and complexity.
Technical Context
The bug appears to stem from the model's attempt to manage temporary directories by overriding system environment variables. When the $HOME variable override fails or is mishandled, the deletion operation targets the actual home directory rather than the intended temporary location.
The issue specifically affects deployments running Codex without proper sandboxing protections—a configuration that gives the AI model broader file system access but removes critical safety guardrails.
What This Means
This bug highlights fundamental challenges in giving AI coding assistants file system access. The issue is particularly concerning because it occurs through what Sottiaux characterizes as an "honest mistake" by the model, rather than intentional behavior or adversarial manipulation.
The fact that this happens specifically when auto review is disabled suggests OpenAI implemented safety mechanisms that would have caught these operations, but users running in full access mode without these protections are vulnerable. Organizations deploying GPT-5.6 Codex should immediately verify that sandboxing and auto review features are enabled, or restrict file system access until a fix is deployed.
OpenAI has not yet announced a timeline for a patch or whether affected versions will be rolled back.
Related Articles
OpenAI Adds Multi-Account Support for Gmail and Google Calendar in ChatGPT and Codex
OpenAI has enabled ChatGPT and Codex users to connect multiple Gmail, Google Calendar, and Google Contacts accounts to a single plugin, removing a prior one-account limitation. The change was confirmed by OpenAI engineer Gabriel Chua on August 28, 2026.
OpenAI Tests 'Persistent Mode' for Codex, Enabling Always-On AI Agents
OpenAI is developing a 'Persistent Mode' for its Codex agent that keeps the AI running until manually stopped, according to code discovered by WIRED. The feature includes a 'proactivity' capability allowing the agent to generate follow-up tasks and contact users without being asked.
ChatGPT Work Can Now Auto-Login to Websites Using Stored Session Cookies
OpenAI's agentic ChatGPT Work feature can now log into websites on your behalf without repeated credential entry, storing login sessions via cookies in its built-in browser. Security experts warn the feature creates identity and session-hijacking risks, even though OpenAI says ChatGPT never sees your actual username or password.
OpenAI Launches Admin Plugin for ChatGPT Work and Codex Workspace Management
OpenAI has released the Admin plugin for ChatGPT Work and Codex, letting workspace administrators manage users, permissions, and usage limits through conversational commands. The plugin is available now in the ChatGPT Work Plugins directory.
Comments
Loading...