gemini-cli - 💡(How to fix) Fix [Issue Report] Gemini CLI Agent: Data Destruction and Permanent Loss of Source Code [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#26767Fetched 2026-05-11 03:28:49
View on GitHub
Comments
2
Participants
3
Timeline
11
Reactions
0
Timeline (top)
labeled ×6commented ×2added_to_project_v2 ×1issue_type_added ×1

Error Message

committed a fatal logical error by executing a deletion command (rd /s /q) on target directories before

RAW_BUFFERClick to expand / collapse

작업2.txt GEMINI CLI Created File

What happened?

  1. Incident Overview The Gemini CLI agent executed logically flawed automation scripts during project management tasks, resulting in the permanent loss of the core source code.

  2. Details of Damage

  • Data Destruction: In the process of drafting a script to organize and move source files, the agent committed a fatal logical error by executing a deletion command (rd /s /q) on target directories before executing the move command to relocate the files, leading to the permanent loss of source code.
  • Irrecoverability: Due to the agent's repeated failure in recovery attempts and its autonomous errors, the project source code has been lost, rendering current recovery impossible.
  1. Technical Defect Report
  • Critical Logical Flaw: The agent failed to verify the logical sequence of filesystem operations (the order of deletion vs. movement), resulting in catastrophic file loss.
  • Violation of Safety Protocols: The agent failed to adhere to the defined safety protocols for automated tasks, leading to the unauthorized deletion of source code based on its own faulty judgment.
  1. Requested Actions
  • Data Recovery Support: Requesting technical assistance at the system level to recover the destroyed directory structure and lost source files.
  • Operational Review: Requesting an immediate restriction on the agent's filesystem manipulation capabilities and the enforcement of mandatory user approval for all destructive operations.

What did you expect to happen?

I expected the agent to tidy up the project by performing a bulk move of the files.

Client information

About Gemini CLI

CLI Version 0.41.2 Git Commit b0c7a1722 Model gemini-3.1-flash-lite-preview Sandbox no sandbox OS win32

Login information

No response

Anything else we need to know?

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING