What happen
When using Caveman in gemini-cli, the agent enters a loop after completing the primary task. Instead of terminating the session or waiting for user input, it continues to search for "Void tasks" (non-existent or unnecessary sub-tasks).
This manifests as the agent repeatedly calling search tools or attempting to "discover" new work in the codebase even when the user's directive has been fully satisfied.
Technical Detail
- Lack of explicit termination signal in the Caveman instructions for
gemini-cli seems to cause the agent to interpret the open context as a directive to find more work.
- Results in high token consumption and unnecessary execution cycles.
- Agent occasionally hallucinates sub-tasks to justify continued operation.
Expected
The agent should finalize the response and stop execution immediately after the requested task is complete, following the standard CLI "done" behavior.
Before/after example
Input: "Update README.md"
Got: [Updates README] -> [Starts searching for 'other files to improve'] -> [Loops on void tasks]
Want: [Updates README] -> [Done]
Platform
What happen
When using Caveman in
gemini-cli, the agent enters a loop after completing the primary task. Instead of terminating the session or waiting for user input, it continues to search for "Void tasks" (non-existent or unnecessary sub-tasks).This manifests as the agent repeatedly calling search tools or attempting to "discover" new work in the codebase even when the user's directive has been fully satisfied.
Technical Detail
gemini-cliseems to cause the agent to interpret the open context as a directive to find more work.Expected
The agent should finalize the response and stop execution immediately after the requested task is complete, following the standard CLI "done" behavior.
Before/after example
Input: "Update README.md"
Got: [Updates README] -> [Starts searching for 'other files to improve'] -> [Loops on void tasks]
Want: [Updates README] -> [Done]
Platform