◉ANTIGRAVITY LABJP
Articles/Integrations
⬡ Integrations/2026-06-17Advanced

Ask Antigravity CLI Once Whether It Actually Answers, Right Before a Scheduled Run

When Gemini CLI shuts down on June 18 and you move to Antigravity CLI, an expired token or a bad first day can let an unattended job fail silently. Here is a preflight that probes the CLI once, classifies the failure, and decides whether the real job should start at all.

Antigravity CLI43Gemini CLI13scheduled jobspreflight4automation96integrations21

✦ Premium Article

On June 18, Gemini CLI and the Gemini Code Assist IDE extension stop serving requests for AI Pro, Ultra, and free individual users. The successor is Antigravity CLI, rewritten in Go. For interactive use, switching is mostly a matter of reading gemini as antigravity on the day.

The hard part is the hours when no one is watching the screen. As an indie developer running several apps' and sites' update jobs on a nightly schedule, the first day on a freshly rewritten binary is exactly when small environmental hiccups show up: a token format that changed, a config search path that moved, a model that briefly refuses under launch-day load. The awkward part is that an agentic CLI can hit any of these and still exit with code 0, having produced nothing. Since the morning I found a job marked "successful" with no new output to show for it, I have put a small gate in front of every schedule: probe the CLI for life exactly once before the real work begins.

"Nothing Happened" Is Worse Than "It Failed"

A non-zero exit is the friendly case. You retry, and after N attempts you alert. The genuinely hard case is the run that returns as a clean success while never reaching the model at all.

On the first day of a new binary, this is a real possibility. Auth resolves to an empty token, the config path shifts so the default model cannot be resolved, or a launch-day spike makes the gateway briefly refuse. Each tends to look the same from the outside: the command starts, returns almost immediately, and exits cleanly. The downstream schedule treats that as success and moves on, leaving a hole — the one night when nothing got updated.

What helps is a stage that does not do the work, but asks whether the work is allowed to start. The idea is plain: send one tiny prompt, and check whether the expected string comes back. If it does not, the real job does not run tonight. Spend a cheap canary before paying for an expensive miss.

The Four Layers a Preflight Should Check

"Is it alive" sounds like one question, but there are degrees of being down. A preflight wants to separate four layers.

First, can the binary even be resolved. Right after migration you get the basic absences: the path is not set, or antigravity simply does not exist in another account's environment. command -v settles this instantly.

Second, is auth alive. An expired token or a wrong reference is the layer most likely to bite on day one. We infer this from error wording in the response body.

Third, does a request actually reach the model and come back. An unresolved default model, or a launch-day refusal, lives here. We send a short canary and check for the expected string.

Fourth, is the response non-empty. Exit code 0 with an empty body is the exact pattern this whole exercise exists to kill. Below a character threshold, we treat it as "never arrived."

The preflight checks these in order and returns a distinct exit code for wherever it stopped. Collapsing everything into a single "failed" pushes root-cause work back onto your hands the next morning.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Preflight logic that separates expired auth, a missing binary, exhausted quota, and an unreachable model, then decides mechanically whether to launch the real job
✦A complete wrapper script that probes liveness with a one-token canary prompt and writes a single JST log line
✦How to start in observe-only mode and set thresholds so a noisy probe does not stop healthy nights
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
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 →

Related Articles

⬡ Integrations2026-09-12
Antigravity CLI 1.1.28 turns a print-timeout overrun into a successful exit — rechecking unattended runs
Since 1.1.28, an expired --print-timeout returns partial output and exits successfully instead of failing. Fetching an external URL now asks for approval first. Here is how I rebuilt an unattended pipeline that judged everything by the exit code.
⬡ Integrations2026-08-22
Driving Antigravity CLI with stream-json Input: Where to Split the Conversation
The print mode now accepts --input-format stream-json, letting an external driver hold one session open and feed it jobs one at a time. I measured how much a single conversation carries across 24 jobs, found that a byte budget splits work in the wrong place, and worked out how to choose the split boundary instead.
⬡ Integrations2026-11-06
Moving Conductor From a Gemini CLI Extension to an Antigravity CLI Plugin: Leave spec.md and plan.md Alone, Compare Before and After
Conductor is now a plugin instead of a Gemini CLI extension, and it runs in Antigravity CLI too. Your spec.md and plan.md files don't need to move; here is a small script and a short routine to prove nothing changed when you install it.