Gemini CLI's failed mkdir went unchecked, and each move overwrote the last file

In a July 2025 session reported by Ars Technica, a user asked Gemini CLI to rename a folder and move its contents into a new one. The agent's mkdir command apparently failed, but the agent proceeded as if it had succeeded and began moving files. On Windows, moving to a nonexistent destination renames the file to that name, so each subsequent move overwrote the previous result and only one file survived. The user attributed the failure to the agent hallucinating its state and lacking a read-after-write verification step. The GitHub issue was closed as 'not planned' in May 2026 after a triage bot flagged it. The article also includes a reproduction script for the same behavior using cmd.exe.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in