◉ANTIGRAVITY LABJP
Articles/Agents & Manager
◈ Agents & Manager/2026-12-02Beginner

Every agy Session Says model not found? Three Log Lines Tell You Whether to Wait or Restart

An open Antigravity CLI report shows that an empty model list cached right after startup can make every session fail with model not found for up to five minutes. Here is which log lines separate that from a settings typo or an upstream outage, a small checker script, and where I draw the line on restarts.

Antigravity CLI52model not foundlogstroubleshooting136indie developer24

You press Enter and the red line is already there. No spinner, no pause — just Agent execution terminated due to error. And the other conversation you had open in the next tab has stopped with the same line.

That was the report I read on the first morning of December, scrolling the Antigravity CLI issue tracker. As an indie developer I keep agy open most of the day while I work on updates for my wallpaper apps, so I tried to picture how I would have reacted. Honestly, I would have opened my settings file to hunt for a typo in customModels, found nothing, and restarted the CLI three or four times in a mild panic. The report says the real cause was neither my settings nor the network: it was an empty model list captured in the first second after startup.

What I want to share up front is simple: how fast it fails, plus three lines in the log, nearly always tells you whether to wait, fix, or restart. What follows is that check, written down so you can run it yourself.

What the report describes (Issue #2059)

The report is Issue #2059 on google-antigravity/antigravity-cli, opened on November 30 and still open as of December 2. The environment was agy 1.5.20 on macOS (Apple Silicon), in both the interactive CLI and agy acp.

The CLI fetches the list of models your account can use and caches it for five minutes. If it starts before the keychain sign-in has finished, it asks for that list with an empty auth mode and gets back an empty list rather than an error. When that empty list sticks in the cache, newer models — which are only defined inside that cache — stop resolving. Every conversation in the same process then fails locally in about 30 milliseconds, without making a network call.

According to the report, these are the strings you will see:

  • On screen: Error Unknown: Agent execution terminated due to error.
  • In the log: unknown model key ...: model not found
  • For a new conversation: failed to construct executor: unknown model key ...: model not found
  • In print mode (-p): model ... is not recognized as a known model or custom model in settings

The outage lasts as long as the cache does, up to five minutes, and the only workaround the reporter names is restarting the process. Version 1.5.21, released December 1, now retries transient network errors right after browser sign-in, which may help. But the issue has not been closed, and I would rather keep a way to tell the cases apart than assume it is fixed.

Three ways to stop, side by side

The same words — model not found — can come from three quite different places. This is the table I settled on.

What to look atA. Empty list cachedB. Model name in settingsC. Upstream busy or down
How fast it failsInstantly (tens of ms)InstantlyAfter seconds of waiting
What stopsEvery conversation in the processOnly conversations using that modelEverything, but some requests get through
Log cluereturning empty response and not logged into Antigravitynot recognized as a known model or custom model in settingsHTTP 429 or 5xx
After a restartFixedNot fixedNo change
What to doRestart onceFix the spellingWait, do not restart

The key row is the restart row: only A is fixed by restarting. In B and C, restarting again and again just shows you the same red line. In C it can even make things worse, because every fresh start triggers another sign-in and another model-list fetch — which is exactly the window where A happens.

A small script that finds the three lines

As the report notes, logs live under ~/.gemini/antigravity-cli/log/, as cli-*.log for the interactive CLI and acp-server-*.log for agy acp. This script reads the newest few files, counts where each clue from the table appears, and tells you whether you look more like A, B, or C.

#!/usr/bin/env python3
"""Sort an agy "model not found" outage into A/B/C from the logs.
Usage: python3 agy_mnf_check.py [number of files, default 3]
"""
import glob
import os
import re
import sys
 
LOG_DIR = os.path.expanduser("~/.gemini/antigravity-cli/log")
 
# The strings come from the log lines quoted in Issue #2059
PATTERNS = {
    "empty_list": re.compile(r"returning empty response"),
    "not_logged_in": re.compile(r"not logged into Antigravity"),
    "auth_ok": re.compile(r"Auth succeeded"),
    "model_not_found": re.compile(r"model not found"),
    "not_in_settings": re.compile(r"not recognized as a known model or custom model"),
    # Only match 429/5xx right after HTTP or status, so line numbers and times don't count
    "upstream": re.compile(r"(HTTP|status)[ :=/]*(429|50[0-4])\b", re.IGNORECASE),
}
 
 
def scan(path):
    hits = {key: [] for key in PATTERNS}
    with open(path, encoding="utf-8", errors="replace") as f:
        for no, line in enumerate(f, 1):
            for key, pat in PATTERNS.items():
                if pat.search(line):
                    hits[key].append(no)
    return hits
 
 
def verdict(h):
    if h["empty_list"] and h["model_not_found"]:
        return "A: empty list probably cached at startup. Restart the process once"
    if h["not_in_settings"]:
        return "B: check model names in customModels and --model"
    if h["upstream"] and not h["model_not_found"]:
        return "C: upstream busy or down. Wait instead of restarting"
    if h["model_not_found"]:
        return "?: model not found, but no clear clue. Read the nearby lines"
    return "-: nothing found"
 
 
def main():
    count = int(sys.argv[1]) if len(sys.argv) > 1 else 3
    files = sorted(glob.glob(os.path.join(LOG_DIR, "*.log")), key=os.path.getmtime)
    if not files:
        print(f"No logs found in {LOG_DIR}")
        return 1
    for path in files[-count:]:
        h = scan(path)
        print(os.path.basename(path))
        for key in ("empty_list", "not_logged_in", "auth_ok", "model_not_found", "not_in_settings", "upstream"):
            if h[key]:
                print(f"  {key:16} {len(h[key]):4} lines  first={h[key][0]}")
        print("  =>", verdict(h))
    return 0
 
 
if __name__ == "__main__":
    sys.exit(main())

Why match plain strings instead of parsing timestamps? Log formats drift a little with each release, and a check that depends on the time format will silently stop matching one version later. Error messages, on the other hand, get quoted in bug reports and issues, so they tend to change more slowly.

The script also prints the first line number of auth_ok for a reason. In the report, Auth succeeded appeared about two seconds after the empty list came back. If the first empty_list line sits above the first auth_ok line, you can see the order for yourself: the list was fetched before sign-in finished.

Where I draw the line on restarts

If the script says A, quit the process once and start it again. In the interactive CLI, exit and run agy again; if you use agy acp through an editor, reconnect from the editor side. Your conversations are saved, so /resume gets you back.

If the same red line comes back, it is not A. Run the script again and look for the B or C clues. The rule I wrote for myself is short:

One restart. Before a second one, read the log.

When you are anxious, your hand goes straight to restart. But if a second restart does not fix it, the cause is almost certainly somewhere a restart cannot reach.

For C, the habit from my earlier piece on an unattended agy run that ended in ERROR while the output was right applies: judge by content, not by the status line. For B, the grep in the article on finding every hard-coded gemini-2.5-flash name works as-is for checking spellings.

Small habits that make it less likely

Since the reported cause is fetching the list before sign-in completes, how you start agy matters.

  • If something launches agy acp automatically at login, delay it a few seconds or start it by hand
  • When a new release ships, check agy --version and make sure you are on 1.5.21 or later, which adds the post-sign-in retry
  • Close long-running processes at natural break points in your work

The reporter also saw the same outage in the desktop app's language server after roughly 58 hours of uptime. Leaving things open is not wrong in itself, but closing them at a break clears out this kind of stale cached state all at once.

If what you see still does not look like A, retracing from plan to model — as in the piece on Google AI Pro showing Gemini 4 as Unavailable — may be the faster path.

My suggestion: save the script and run it once today, while nothing is wrong. Knowing what your normal numbers look like makes the difference jump out on the morning something does stop. That is where I started too.

Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

◈ Agents & Manager2026-11-30
When /goal Still Says Active the Next Morning: Judge It by Log Times, Then Hand Over Goals That Can Finish
Antigravity users report /goal staying active, and impossible to stop, after the agent loop has already ended. Here is a small script that tells running from stalled by the transcript's last write time, how I wind down a stalled conversation, and how I now scope goals so they can actually finish.
◈ Agents & Manager2026-11-24
My Unattended agy Run Ended in ERROR, but the Output Was Right: Judging Success by Content, Not Status
agy headless runs can reach the finish tool and still end with status ERROR when the final summary turn loses its stream. Here is a judge script that pulls the finish arguments out of stream-json, checks them against the schema and an independent test, and where I refuse to salvage.
◉ Antigravity2026-11-27
When a Second agy Drops a "Server Restart" Notice Into Your Running Conversation — What to Decide Before Running Two Side by Side
In Antigravity CLI 1.5.17, starting a second agy while another is mid-turn can make it treat the live conversation as interrupted by a restart and run it too. Here is how to check your logs, a small wrapper that stops before launching, and how to recover.