As an indie developer I also build sites for clients, and one evening I handed a /goal a dull but useful job: read every page of a website I built for a client and list any images missing alt text. The next morning the goal indicator was still animating, and for a second I felt relieved. It was still working on it, I thought.
Then I noticed the last message was hours old. Pressing Stop changed nothing, and the indicator was still there after I restarted the app. What bothered me wasn't the bug itself. I couldn't tell whether the agent had stopped, or whether it was still quietly spending quota somewhere I couldn't see.
The main thing I took away: an animated indicator is not evidence that anything is running. Someone filed a public issue describing the same symptom on November 28, and after reading it I changed both how I check on goals and how I write them.
What has been reported, and what is still unknown
Issue #1974 was filed against the Windows desktop app, version 2.36.0. In short:
| Observation | How solid it is |
|---|---|
| The goal stays "active" after the agent loop has ended | Reproduced by the reporter and a second user, including with no hooks installed |
| Stop does nothing, and the state survives an app restart | As reported |
| No tokens flow after the stall (the model is never called again) | As reported |
| The loop ends after the goal re-prompts the model 10 times | Exactly 10 in both cases. The actual cap value is unconfirmed |
| The continuation label always reads "Continuation: #1" | Also raised in related issues |
The "cap of 10" part is the reporter's guess, not an official statement. I treat it that way too: two runs stopped at exactly 10, and that's all we know.
There is some good news here, and there is a separate risk to watch. A stalled goal isn't calling the model, so a stuck indicator doesn't use up your quota. The opposite accident is real, though. An open-ended /goal that never stopped used about 40% of a weekly quota in under an hour (#1367). I've come to think both failures grow from the same thing: a goal with no defined end.
Judge by the transcript's last write, not the indicator
The issue names where each conversation is stored:
- Transcript:
~/.gemini/antigravity/brain/<conversation-id>/.system_generated/logs/transcript.jsonl - Conversation DB:
~/.gemini/antigravity/conversations/<conversation-id>.db
If the agent is really working, the transcript keeps growing. So I wrote a small script that ignores the file's internal format and looks at when it was last written. The JSON structure of each line could change between versions, so the script only reads the timestamp and counts a string that appears in the reports.
#!/usr/bin/env python3
"""Decide whether a /goal that still shows "active" has actually stalled, using file times instead of the UI."""
import argparse
import sys
import time
from pathlib import Path
BASE = Path.home() / ".gemini" / "antigravity"
def transcript_of(conv_id: str) -> Path:
return BASE / "brain" / conv_id / ".system_generated" / "logs" / "transcript.jsonl"
def latest_conversation() -> str | None:
# Treat the most recently written conversation DB as the current conversation
dbs = sorted((BASE / "conversations").glob("*.db"), key=lambda p: p.stat().st_mtime)
return dbs[-1].stem if dbs else None
def main() -> int:
ap = argparse.ArgumentParser()
ap.add_argument("conversation_id", nargs="?", help="defaults to the most recently updated conversation")
ap.add_argument("--stale-min", type=float, default=20, help="treat as stalled if the last write is older than this")
args = ap.parse_args()
conv = args.conversation_id or latest_conversation()
if not conv:
print("No conversations found:", BASE / "conversations")
return 2
tr = transcript_of(conv)
if not tr.exists():
print("No transcript:", tr)
return 2
idle_min = (time.time() - tr.stat().st_mtime) / 60
text = tr.read_text(encoding="utf-8", errors="replace")
# Only count a string that appears in the reports; do not depend on the JSON line format
continuations = text.count("Continuation: #")
# The marker may also appear inside instructions, so only check whether it comes after the last continuation (a hint)
last_cont = text.rfind("Continuation: #")
marker_after = max(text.rfind("GOAL_COMPLETE"), text.rfind("GOAL_CANCELLED")) > last_cont
print(f"conversation : {conv}")
print(f"last write : {idle_min:.1f} min ago")
print(f"continuation : {continuations} (occurrences, not the number shown)")
print(f"marker(hint) : {'after last continuation' if marker_after else 'none'}")
if idle_min >= args.stale_min:
print("verdict: STALLED - the UI says active, but writes have stopped")
return 1
print("verdict: RUNNING - the transcript is still being written")
return 0
if __name__ == "__main__":
sys.exit(main())Usage is simple:
# Check the most recently updated conversation (STALLED after 20 minutes without a write)
python3 goal_watch.py
# Name a conversation and use a 45-minute threshold
python3 goal_watch.py cbd6b086-xxxx --stale-min 45It exits with 1 on STALLED, so you can make it the first check you run each morning. The 20-minute default only reflects my own work, where no single tool call has taken longer than that. If you hand builds or large searches to the agent, raise it.
I treat the completion marker (GOAL_COMPLETE) as a hint only. The instructions that tell the model how to write the marker may sit in the same transcript, and if the string alone counted as "done", I'd miss conversations that are still half-finished. One report even shows the model emitting the marker before the work was done (#1632).
Winding down a stalled conversation
When the script says STALLED, here's what I do, in this order:
- Don't send more instructions to that conversation. If you keep prompting a dead loop to wake it up, you lose track of where the old goal ended and the new request begins.
- Check the output first. For the alt-text list, I count how many pages the output file already covers. In my case a partial list was there.
- Start a new conversation scoped to what's left. Something like "from page N to the end", with the earlier list loaded first.
- Leave the stuck conversation alone. The script has already shown it isn't using quota, so there's no rush to delete it. When I do tidy up, I use the order I described in choosing between clean and compact.
If the script says RUNNING but the output isn't growing, that's a different problem. There's a report of subagents stalling overnight on an approval prompt, with the parent agent never handling it (#2007). For unattended runs, the first step is to keep anything that needs approval out of the goal.
Hand over goals that can actually finish
Looking back, my mistake wasn't the bug. It was how I wrote the goal. "Don't stop until every page is checked" gives the agent no clear point where it can decide it's done. The reporter's example was similar: an open-ended research task, given with "do not stop until done".
Before I hand over a goal now, I write down three things:
| What I write down | Example (alt-text audit) |
|---|---|
| Scope | The home page and the works pages, 30 pages at most |
| Completion condition | The output file has a row for every URL in scope |
| What to leave behind if it stops | Append one row per finished page, so the last row shows how far it got |
The third one helped most. Even if the run stalls, the last row of the output tells me where the next goal should pick up. I don't have to trust the indicator or read through logs.
Give the agent goals it can finish, and decide whether it stopped from write times, not from the UI. Keeping those two apart means my morning check stays the same whether or not this bug has been fixed yet.
You could argue that a job isn't really delegated until its end is defined. For now, defining that end is still my part of the job.
Checking unattended results from another angle
This applies beyond /goal. With any unattended run, the content tells you more than an indicator or a status field. When an agy headless run's status disagreed with its output, I wrote up how I decided in My Unattended agy Run Ended in ERROR, but the Output Was Right. The rules I set before running two agy sessions side by side are in what to decide before opening a second agy.
Next time you hand over a /goal, try adding one line that says what "done" looks like. That alone should cut down the time you spend the next morning wondering whether anything is still running.