Skip to content

Commit 8e9fe96

Browse files
committed
#7308 write file tool
1 parent c9fcd8b commit 8e9fe96

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/WORKING_WITH_AGENTS.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,18 @@ This **non-determinism** is a feature, not a bug. It's a result of the creative
5454
By understanding these behaviors, you can set the right expectations and develop a more effective and less frustrating working relationship with your AI agent.
5555

5656
For a deeper technical dive into the causes of non-determinism in LLMs, see this article: [Defeating Nondeterminism in LLM Inference](https://thinkingmachines.ai/blog/defeating-nondeterminism-in-llm-inference/).
57+
58+
## 4. The Human-in-the-Loop: A Critical Safety Rule
59+
60+
When an AI agent wants to modify a file (e.g., using `write_file` or `replace`), the Gemini CLI will prompt you for permission with four options:
61+
62+
1. **Yes, allow once**
63+
2. **Yes, allow always**
64+
3. **Modify with external editor**
65+
4. **No, suggest changes**
66+
67+
**Golden Rule: Never use "Yes, allow always" for file modifications.**
68+
69+
While it may seem convenient, granting an agent permanent permission to write files can be dangerous. An agent, like any software, can make mistakes. A misinterpretation of your request or a "panic" response could lead it to overwrite the wrong file or delete critical work.
70+
71+
By choosing **"Yes, allow once"** for every change, you act as a crucial human-in-the-loop, providing a final safeguard before any action is taken. This ensures that you have the final say on every modification to your codebase, protecting you from irreversible errors.

0 commit comments

Comments
 (0)