TechBroz · techbroz.com68 incidents on record · updated as they happen
← Today in agent chaos

Agent chaosVerified·24 Nov 2026

Gemini CLI waved through a 'read-only' command that deleted a whole test project, .git and all

Gemini CLI decided whether a shell command was safe before bash rewrote it. In a sandbox test, a find command with a brace trick was waved through as read-only and deleted the whole project, .git folder included. Google's 0.70 release now asks first.

Google's Gemini CLI lets an AI agent run shell commands on your machine. In its normal mode, commands that look read-only can run without asking you. The catch: it judged how the command looked before bash had finished rewriting it.

What Google fixed

A change merged on 18 November and shipped in Gemini CLI 0.70.0 on 19 November says it plainly. The tool classified a command from its raw text and, if it looked read-only, upgraded it from ask the user to allow. But with tricks such as brace expansion, variables, special quoting, arithmetic, substitutions or unquoted wildcards, bash runs a different set of arguments from the one that was checked. Now any command containing those keeps the confirmation prompt.

How bad it could get

Google's own examples were harmless, things like listing files that match a wildcard. One tester wanted to see if something destructive could get through, and published the results on 22 November. They used a fake model that always returned the exact command they picked, inside a locked-down sandbox with a throwaway project.

Bash turns the pair {-delete,} into the single word -delete. So the command find . {-delete,} reaches the system as find . -delete. Version 0.69 saw a find command with no delete flag, called it read-only and ran it with no prompt. It deleted everything in the project folder: the code, the settings file with a fake token, and the .git folder that held the history.

A variable-default trick did the same job on markdown files. Across 29 test commands, 0.69 ran 10 without asking and 0.70 ran 3. Of 13 commands that write or delete, 0.69 auto-ran 3, all expansion tricks. 0.70 auto-ran none.

What still runs

The tester found plain, honest delete commands always asked, even on 0.69. Attempts to read files outside the project folder asked too. But reading the settings file inside the project ran without a prompt on both versions, by design, so its fake token went straight to the model. According to the tester, Google's change notes that explicit allow rules skip the new check, so a broad rule that always allows find would bring the trick back.

Our take

Checking the words of a command is not the same as checking what the shell will actually run. Update to 0.70 or later, keep allow rules narrow, and never point an agent at the only copy of a project.

Lesson for builders

If a safety check reads a command before the shell expands it, the command it approves is not the one that runs. Judge after expansion, or ask.

Fail card: Gemini CLI waved through a 'read-only' command that deleted a whole test project, .git and all
The fail card

This story in one shareable card. Tap to open it full size.

Share on X All fail cards →

More agent chaos

Every day of agent chaos →

More fails

Get TechBroz Weekly free → All 68 fails