# Antigravity agent stuck in endless file-reading loop (Gemini models)

**URL:** <https://discuss.ai.google.dev/t/antigravity-agent-stuck-in-endless-file-reading-loop-gemini-models/188526>\
**Category:** Google Antigravity\
**Tags:** feedback, models, bug, generative-ai, gemini\
**Created:** [October 12, 2026, 11:05am UTC](https://discuss.ai.google.dev/t/antigravity-agent-stuck-in-endless-file-reading-loop-gemini-models/188526 "2026-10-12T11:05:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SuneraX](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/sunerax/32/151349_2.png) [@SuneraX](https://discuss.ai.google.dev/u/SuneraX)\
**Post date:** [October 12, 2026, 11:05am UTC](https://discuss.ai.google.dev/t/antigravity-agent-stuck-in-endless-file-reading-loop-gemini-models/188526/1 "2026-10-12T11:05:41Z")

</div>

I’m completely losing my patience with the Antigravity agent right now. Instead of fixing straightforward code issues, the agent gets trapped in a persistent infinite loop of repeatedly analyzing and re-reading the exact same files over and over again (e.g., looping endlessly across `NfcTerminalPage.tsx`, `App.tsx`, etc.).

> **The Bug is** It starts analyzing files, stops making progress, and cycles through the same code snippets indefinitely until I manually cancel the execution.
> 
> **I Tested Models and** this happens heavily across Gemini models (like Gemini 3.7 Flash) like 100% of the time, making autonomous workflows completely unusable.
> 
> **Comparison is** when switching over to models like Claude Sonnet 4.6, tasks are handled cleanly without getting stuck in redundant loops.

The Gemini integration in Antigravity needs a serious fix. It used to be manageable, but now it loops constantly. Please look into this agentic regression. WTF are they doing with so many bugs in antigravity? Like always Google’s wall is too strict to make progress. By the time they make progress the train is already gone.

Evidence - It’s getting unusable day by day now,

 ![image](https://d3qe71uytubmmx.cloudfront.net/original/3X/9/2/920e7e3da52d8cd95f4176b8e132a10a87587466.png)

 ![image](https://d3qe71uytubmmx.cloudfront.net/original/3X/d/1/d1fb3e561652a666105e90218132d5c581325b2d.png)

After 3 Hours: Still the same,

 ![image](https://d3qe71uytubmmx.cloudfront.net/original/3X/b/c/bca4e036203f9a4c8e7be7feb1ec93a60fce5d35.png)

Claude Sonnet 4.6 (Thinking) is the best for coding tho, look how it started to do it effectively,

 ![image](https://d3qe71uytubmmx.cloudfront.net/original/3X/f/3/f38c19cc056cc7be62256b2c1cead6e7cd55db05.png)

![image](https://d3qe71uytubmmx.cloudfront.net/original/3X/f/9/f93759bba2ffb18f9343d7582ebaed487b406d5b.png)

In only 2 minutes, shame on Gemini models 😑

---

<div class="post-metadata">

**Author:** ![chunduriv](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@chunduriv](https://discuss.ai.google.dev/u/chunduriv)\
**Post date:** [October 12, 2026, 10:58pm UTC](https://discuss.ai.google.dev/t/antigravity-agent-stuck-in-endless-file-reading-loop-gemini-models/188526/2 "2026-10-12T22:58:30Z")

</div>

Hi @SuneraX,

Thanks for reporting this and sorry for the frustration. An agent repeatedly re-reading the same files without making progress is definitely not the expected behavior.

A few things that may help in the meantime:

- If the agent reads the same file twice without making a change, stop it and start a new conversation instead of correcting it in the same thread, so it begins with a clean context. In the new conversation, name the specific file and the exact change you want (for example, “In `NfcTerminalPage.tsx`, fix X”).
- Gemini 3.8 Flash is the newest Gemini Flash model in Antigravity and Gemini 3.1 Pro (High) may handle complex multi-file debugging better. Since Claude models work well for you on these tasks, continuing with them is a reasonable workaround too.
- You can add an instruction to an `AGENTS.md` file in your project root, for example:

> _“Do not view the same file more than once in a task unless it has changed. If the fix isn’t clear after reading a file stop and ask me instead of re-reading.”_

To help us diagnose the issue, could you share following details:

- Which product and version you’re using (Antigravity 2.0 or IDE) and your OS.
- A minimal code sample or project structure that consistently triggers this loop, that would helpful to reproduce the issue
- Whether the loop also happens in a brand-new conversation or only in longer ones.

You can also use the in-app feedback option on an affected conversation, which sends the session details directly to the team.

---

<div class="post-metadata">

**Author:** ![SuneraX](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/sunerax/32/151349_2.png) [@SuneraX](https://discuss.ai.google.dev/u/SuneraX)\
**Post date:** [October 14, 2026, 5:42am UTC](https://discuss.ai.google.dev/t/antigravity-agent-stuck-in-endless-file-reading-loop-gemini-models/188526/3 "2026-10-14T05:42:40Z")

</div>

Would you think a developer would just post an issue without trying out any solutions itself?

- Starting a new conversation doesn’t make it work.
- So flie reading is a complex thing to handle and we must use models like 3.1 Pro for them? Probably it’s not because of complexity. Anyone can understand it.
- I already had created rule files and agents files, didn’t work from the start.

Sure bro!

- I use both 2.0 and the IDE.

- My OS is Windows 11 Pro 25H2.

- It’s not because of the structure because Gemini 3.6 works for me with 50% of chance getting in a loop. 3.7 and 3.8 are the worst.

- Yesss, in new conversations too. That’s why I was frustrated.

This is something Google must look into. I even heard that Pro subscribers are getting this.

---

<div class="post-metadata">

**Author:** ![Arslan4](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/arslan4/32/156318_2.png) [@Arslan4](https://discuss.ai.google.dev/u/Arslan4)\
**Post date:** [October 14, 2026, 8:08am UTC](https://discuss.ai.google.dev/t/antigravity-agent-stuck-in-endless-file-reading-loop-gemini-models/188526/4 "2026-10-14T08:08:41Z")

</div>

This is all because of your 3.8 Flash. Other models like 3.7 flash don’t do this. BRING THEM BACK
