Replies: 1 comment
-
Hi @TomWest61 thanks for the feedback! Totally agree with you that a mechanism to catch the CLI in a loop is a great idea 👍 This is a known issue that we are trying to design the best approach to solve, thanks for your suggested prompt! It hopefully helps some folks in the interim, really awesome, going to give it a try myself. There is an open issue already tracking this work #1531. I will link this issue to it and post your prompt there for others to see. Please feel free to add any comments or developments into the parent issue. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
The billion-dollar company seems to have only one man working on the bugs. But I don't see anyone working on it at the moment. And we reach the 1000 Bugs?
Here's a suggestion that I haven't tested, maybe someone has a better solution.
The endless loops that occur again and again cost users time and money. For the company too, by the way.
Here is my approach, I once used this prompt, gemini tested it itself and stopped after 3 identical entries. I haven't tested it yet, my project is shot and I'm starting from scratch:
--- CRITICAL SYSTEM RULES FOR GEMINI AGENT BEHAVIOR ---
RULE: INFINITE LOOP PREVENTION (MAXIMAL PRIORITY)
This rule governs the behavior of the Gemini AI agent itself.
It has absolute precedence over all non-safety-critical processes.
Mechanism: The Gemini AI agent will maintain a real-time history of its last 3 outputs (text responses or tool calls).
Detection: If the current intended output (N) is identical to the previous two outputs (N-1 and N-2),
a cyclic repetition (infinite loop) is detected.
Emergency Measure:
"
This rule is implemented in the Gemini AI agent's core reasoning and is not a Python function to be executed by the script.
gemini itself recommended to put this instruction in an external file, because it is not sure if gemini still has access to it during updates and will not overwrite it!
If someone has a better solution, please contact Google, they will surely pay a reward for the solution. And please post here. Thank you.
What did you expect to happen?
A better solution
Client information
Login information
No response
Anything else we need to know?
No response
Beta Was this translation helpful? Give feedback.
All reactions