◉ANTIGRAVITY LABJP
Articles/AI Tools
⚙ AI Tools/2026-10-01Beginner

You Don't Need to Read Commands: Three Places to Check When an Agent Works

If strings of terminal text make the approve button feel risky, here is a way to check just three things: a way back before you start, the first word of a command, and the diff afterward.

antigravity457beginner9agent19approval3git14

Lines of unfamiliar text scroll past faster than you can follow, and next to them a button asks whether you want to allow the command. Many people stop right there the first time they use Antigravity.

As an indie developer, I once spent an evening asking an agent to tidy the store descriptions for one of my wallpaper apps, and I kept pressing "allow" without really knowing what I was approving. Nothing went wrong. But what I felt the next morning wasn't relief. It was the uneasy sense that I might simply have been lucky.

Here is what I'd like to say first: you don't have to understand everything before you approve. If you narrow your attention to three places, you can avoid nearly every irreversible mistake without being able to read a single command.

Reading everything is what makes it frightening

Most of what an agent runs is ordinary work: opening a file, listing a folder, installing a package. On screen, though, harmless lines and risky lines look exactly alike, so "I can't read all of it" quietly turns into "all of it might be dangerous."

The fix is to change the question. Instead of widening what you understand, narrow what you check.

  • Before you ask, make sure you can get back to where you started
  • Before you approve, look only at the first word of the command
  • After the agent finishes, look at what changed

These map to before, during, and after. If one of them slips, the other two will still catch a good share of the trouble.

Checkpoint 1: make a way back before you ask

First, what this step solves. If you can always return to the state you had before asking, then nothing that happens along the way can be fatal. Git is the tool for this, and the move is small: give the current state of your working folder a name and keep it.

# In your working folder: save the state before you ask the agent
git status --short
git add -A
git commit -m "State before asking the agent"

git status --short tells you whether any files are mid-change. If nothing prints, the folder is clean. The last two lines save that moment.

Why bother? A saved moment is a marker you can return to any number of times. If the agent heads somewhere you didn't expect, the marker gets you back to "before." If a folder isn't under Git, copying the whole folder first does the same job.

Checkpoint 2: before you approve, read only the verb

Approval dialogs show long commands. Don't read the whole thing. Look at the first word and at where the command is pointed. The table below is the cheat sheet I wrote for myself and then tidied up.

First word What it means What to check
ls / cat / git status Look only Generally fine to approve as is
npm install / pip install Add a part Does the package name match what you asked for?
rm / rm -rf Delete Is the target inside your working folder only?
git push --force / git reset --hard Overwrite or rewind history If no reason was given, pause first
curl, wget, sudo Fetch from outside, or run with elevated rights Decline if an address or permission appears that you never asked for

You only read the left column. If a delete-type word shows up, check once that the target doesn't reach outside your working folder. If you're still unsure, don't approve; ask in the chat, "What will that command do?" Agents are good at explaining their own actions.

If the same dialog keeps coming back and slowing you down, I wrote up the causes and fixes separately: Antigravity approval dialog keeps appearing and "always allow" doesn't stick.

Checkpoint 3: after it finishes, look at the diff

Even if you felt uneasy during the run, looking at what changed afterward catches most problems. Again, you aren't reading text. You're looking at file names and the size of the change.

# See what changed since the saved moment, as a list
git diff --stat HEAD
 
# Look inside a single file you're curious about
git diff HEAD -- path/to/file

--stat lists each changed file with a rough count of lines added and removed. If files appear that have nothing to do with your request, that's where you stop. If only the files you expected have changed, you can reasonably relax.

Why start with the list? Checking whether the scope drifted is far quicker than reading line by line, and if the scope is right, you can open individual files only when you need to.

If the scope did drift, go back to the marker from checkpoint 1.

# Discard every change and return to the saved moment (check the diff first)
git restore .

This restores files that were changed after you saved. Files the agent newly created will remain, so delete them by hand if you don't need them. If there's a change you want to keep, move that file somewhere else first.

The line I've drawn

At the start I tried to read the full command every time I approved. It didn't go well. Each unreadable line stopped me, and the work itself stalled.

These days my rule is this: if I can get back, and I know where to look, I can move forward without understanding everything. You don't have to wait for your understanding to catch up. With a routine to check against, you can widen what you hand to the agent a little at a time.

The same routine works when I ask for changes to my own sites: make a way back, read the verb, look at the diff. The tools change, but the frame stays put.

Tomorrow, before you start, try typing git commit once. That alone makes working with an agent noticeably easier.

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 $15 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

⟐ Editor View2026-05-20
When Antigravity Agent Edits Break Diffs Due to Mixed CRLF/LF Line Endings
Working across Windows, Mac, and Linux, you may suddenly see Antigravity Agent edits turn an entire file's diff bright red. This article walks through detecting CRLF/LF mismatches and a three-layer fix across git, the editor, and the Agent itself.
◉ Antigravity2026-03-29
Mastering Antigravity Plan Mode and Fast Mode — Maximize Development Efficiency with Agent Thinking Modes
Learn how to use Antigravity's Plan Mode and Fast Mode effectively. This practical guide covers the differences, switching methods, and best use cases for each agent thinking mode to boost your AI-driven development workflow.
⚙ AI Tools2026-08-28
Three things I had to fix before my status line could tell me what a session cost
Getting real session cost into a custom Antigravity CLI status line took three fixes: how the script reads stdin, how to tell whether your build sends a cost field, and how to keep a usage ledger that does not double-count.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links