Skip to content

[bug]: gemini-cli loops on "Void tasks" after finishing work #312

@boudag

Description

@boudag

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

  • Claude Code
  • Codex
  • Other: gemini-cli

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions