Unbounded infinite loop in /goal stop-hook upon Quota Exhaustion (429)

Environment:

  • Platform: Antigravity IDE (Windows x64)
  • Model: Gemini 3.8 Flash / Gemini

Summary:

When running an agent task with the /goal slash command, if the user hits an API quota exhaustion or rate-limit error (HTTP 429 / ResourceExhausted), the execution harness fails to recognize the terminal error and enters an infinite, runaway continuation loop.

Observed Behavior:

Instead of halting execution and presenting a quota error alert to the user, the internal stop-hook interceptor repeatedly rejects agent termination:

“stop hook blocked termination due to reason: You are still working toward the user’s goal. Do not stop until the task is fully complete.
Time spent so far: 49m 9s Continuation: #400
Before concluding, verify your work”

The hook ran unattended over 400+ continuations and dozens of redundant goal checks, burning through all remaining quota/resources in a continuous spin loop.

Expected Behavior:

  1. Circuit Breaker: The agent harness must implement a circuit breaker that aborts immediately upon encountering consecutive API errors, rate limits, or quota exhaustion (ResourceExhausted).
  2. Hard Ceiling: The stop-hook must enforce a maximum continuation limit (e.g., max 20–30 iterations) and time-out safely rather than continuing infinitely.

Steps to Reproduce:

  1. Open any workspace in Antigravity IDE.
  2. Run a task using the /goal command.
  3. Allow or simulate an API rate limit / quota exhaustion event mid-execution.
  4. Observe that the agent loop cannot terminate; the stop-hook endlessly prompts continuation past #400+.

Hi @TannyIsDeveloper ,

Could you please share the Antigravity IDE Version you are using?

Antigravity IDE Version: 2.5.5
VSCode OSS Version: 1.107.0 (user setup)
Commit: ecfbad74d93962fc8ca485d93ab9b4f3d4cb6cf8
Date: 2026-08-13T08:37:22.547Z
Electron: 39.2.3
Chromium: 142.0.7444.175
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.19045
Language Server CL: 963923152