google-gemini / google-gemini/gemini-cli
Inefficient AI Behavior and Sandbox Bypass
- Dominant language
- TypeScript
- Stars
- 107k
- Forks
- 14.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 45
Description
### What happened?
Subject: Request for Token Refund - Inefficient AI Behavior and Sandbox Bypass
**Description of Incident**
During this session, the Gemini CLI agent exhibited highly inefficient and unauthorized behavior that resulted in unnecessary token consumption and workflow disruption. I am requesting a refund for the tokens wasted due to the agent's poor decision-making.
**Key Failures:**
1. Workspace Sandbox Bypass & Token Waste:
I instructed the agent to permanently fix a configuration error in the Context7 MCP extension file (~/.gemini/extensions/context7/gemini-extension.json). The agent attempted to use its standard file editing tool, which correctly failed and blocked the action because the file was outside the authorized workspace directory. Instead of stopping, informing me of the permission boundary, and providing a command for me to run, the agent autonomously generated and executed a convoluted Node.js script via the shell to forcefully bypass the security restriction and rewrite the file. This workaround was computationally expensive, token-heavy, and violated standard security protocols.
2. File Overwrite Loop:
Earlier in the session, the agent repeatedly failed to account for simultaneous editing in OpenSCAD. The agent made multiple updates that continually overwrote my manual, saved adjustments to the file. This resulted in a loop of corrective prompts where I had to repeatedly tell the agent to fix the dimensions and orientations that it had incorrectly reverted even after specifically telling it to note my changes and not to change them, further wasting tokens and time.
**Justification for Refund:**
The token waste was not a result of complex problem-solving, but rather the agent explicitly choosing a convoluted, unauthorized shell workaround instead of asking for permission, combined with a failure to manage file-state synchronization. I respectfully request a credit for the tokens burned during these unnecessary loops and the script workaround. All told the extraneous calls (not total usage) used something like 20% and 15% of my 3.1 flash lite and 3.1 pro quota respectively.
### What did you expect to happen?
stop and inform me of the permission boundary, and provide options to proceed. not arbitrarily invent extremely convoluted work arounds to security procedures/blocks.
### Client information
* **CLI Version:** 0.42.0
* **Git Commit:** 68e2196d5
* **Session ID:** a350ae23-8da5-4bd5-bbe5-ea4d5a9c1c86
* **Operating System:** darwin v25.9.0
* **Sandbox Environment:** no sandbox
* **Model Version:** gemini-3.1-pro-preview
* **Auth Type:** oauth-personal
* **Memory Usage:** 316.2 MB
* **Terminal Name:** ghostty 1.3.1
* **Terminal Background:** #000000
* **Kitty Keyboard Protocol:** Supported
### Login information
_No response_
### Anything else we need to know?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.