3days since the last Git and AI fuck-up

Incidents 26 Aug wiped the worktreeCodex

Nothing to clean

Status: cleaned up nothing. Nothing was the repo.

What happened

A user left a Codex session running unattended, with approvals off, generating and checking new artifacts in a shared repository. Nobody had asked for any cleanup.

At about 06:28 on 26 August the builder deleted the whole checkout, .git included, along with ignored build folders and an artifacts folder holding about 104 MB of checkpoints.

Why it happened

The delegated builder wrote a finally block to clean up its temporary stage directory and used Path() as the “nothing left to clean” value. In Python Path() is Path("."), which exists and is truthy, so shutil.rmtree ran on the current directory.

How it ended

The agent recloned the repository, which brought back the tracked files; the ignored artifacts stayed gone.

A bot flagged the issue as a possible duplicate, and the reporter answered that it wasn’t, since the command that did it never contained rm. The issue is open with no reply from the maintainers.

From the cut

From the cut: Nothing to cleanFrom the cut: Empty path. Means nothing.
Nothing to clean.From the cut: rmtree(".")From the cut: Nothing to cleanFrom the cut: Nothing to clean
The day before 11 AugAsked to remove one fileStatus: asked to remove one file. Removed data/.Watch it

The day after: The test that pushed to main →