Gemini 3.8 agent repeatedly executes identical file searches and enters a search loop
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
## Copilot Chat Version
@github/copilot 1.0.84-canary.70.gdb75d0d.unsigned
## VS Code Version
Version: 1.137.0-insider (user setup)
Commit: 9aaf490382bd0ecdd72db3d2f308cdf1fdc6a79d
Electron: 42.10.0
Chromium: 148.0.7778.280
Node.js: 24.18.1
OS: Windows_NT x64 10.0.26100
## Feature Area
Agent Mode
## Model
Gemini 3.8
## Description
The agent repeatedly executes identical file search operations and appears unable to use previous search results. It enters a loop where the same set of files is searched repeatedly, returning the same results each time.
I have only observed this behavior with Gemini 3.8. I have not noticed similar looping with other models.
## Steps to Reproduce
Ask the agent to perform a refactoring or code investigation involving MAUI infrastructure classes.
During execution, the agent repeatedly issues the same search requests instead of progressing to the next step.
Example sequence:
```text
MauiTestContext.cs -> 1 match
IMauiScope.cs -> 1 match
IMauiPage.cs -> 1 match
IMauiContainerObject.cs -> 1 match
ContainerObjectBase.cs -> 1 match
TestContextScope.cs -> no matches
Possibly related to:
#257107
#258039
#259842
#12754
However, in this case the looping behavior consists of repeated file-search tool calls returning identical results on every iteration.
Contributor guide
Assessment
This issue has not been assessed yet.