◉ANTIGRAVITY LABJP
Articles/Antigravity Basics
◉ Antigravity Basics/2026-04-24Intermediate

When Antigravity's Terminal Won't Start

When the Antigravity terminal panel won't open, stays unresponsive, or can't find your commands, the fix depends on which layer actually broke. This guide splits the symptoms into three patterns and walks through each recovery path.

antigravity476terminal10troubleshooting133diagnosticshell4

On the first day I set up a Next.js 16 project in Antigravity, the agent tried to run npm install and the built-in terminal went quiet. The panel opened, but node -v returned nothing. It took me two hours to sort out, and I only realized afterward that most of that time went into digging at the wrong layer.

What makes this problem slippery is that similar symptoms hide different causes. "The panel won't open," "it opens but hangs," and "it works but can't find commands" each live on a separate layer. This is the three-layer triage I'd have wanted to hand my earlier self, ordered from "a clean restart fixed it" to "something is off in how $PATH gets inherited."

Step one: classify which of the three patterns you are in

Debugging goes sideways when you mistake one symptom for another. Spend the first 30 seconds working out which shape you have.

  • Pattern A — the terminal panel itself will not appear: The backtick shortcut and the "New Terminal" menu item both do nothing, or the panel flashes and closes. Suspect the renderer or a ptyHost process that failed to spawn.
  • Pattern B — the panel appears but no prompt shows up: No $ or %, just a blinking cursor. The shell started but is stuck reading its login configuration.
  • Pattern C — prompt works but commands are not found: You see node: command not found or git: command not found. The shell is alive, but $PATH is not what you expect.

Mixing these up means repeating fixes that were never going to help. Once you know your pattern, read only the matching section.

If you can't tell, ask the shell itself

As long as a panel is open, three lines tell you what kind of shell you are in. They settle most of the B-versus-C question.

# Goal: check what kind of shell is running (assumes zsh)
echo "$0"                          # shell name; a leading - means a login shell
[[ -o login ]] && echo "login shell" || echo "not a login shell"
[[ -o interactive ]] && echo "interactive" || echo "non-interactive"

Which files get read depends on this. In zsh, ~/.zprofile is read only by login shells and ~/.zshrc by interactive ones. That distinction becomes the map for Pattern C.

Pattern A: when the terminal panel refuses to open

When the panel does not appear at all, the fastest move is the developer tools. Open Help → Toggle Developer Tools, switch to the Console tab, and look for red errors.

You will most often see Unable to start pty host process or spawn /bin/bash ENOENT. Both mean the editor is trying to launch a shell at a path that no longer matches reality on the OS side.

This is the order I try things in:

  1. Fully quit Antigravity and relaunch it: Closing the window can leave ptyHost running. On macOS use Cmd+Q; on Windows, check Task Manager for a lingering antigravity.exe.
  2. Remove the user-level shell override: If settings.json contains terminal.integrated.defaultProfile.osx or similar, delete it and fall back to the default. A broken profile definition is a surprisingly common cause.
  3. Confirm the shell exists on disk: The terminal just spawns a shell binary. From another terminal app, run ls -la /bin/zsh /bin/bash /opt/homebrew/bin/fish. After a Homebrew reinstall the binary may have moved to /opt/homebrew/bin/, and a stale /usr/local/bin/ reference ends in ENOENT.
  4. Last, reload with extensions disabled: Run Developer: Reload With Extensions Disabled from the command palette. Extensions that touch the terminal layer are sometimes the culprit.

Those four steps cleared most of my "won't open" cases. What remains is usually the OS having updated the shell underneath the editor, and you combine this with the Pattern B steps below.

Pattern B: when the panel opens but hangs before the prompt

A panel that appears but never prompts is nearly always a startup file waiting on an external command that never returns.

Look first at ~/.zshrc and ~/.zprofile. Anything that reaches for the network at startup is a prime suspect—nvm use default, pyenv init -, a script that fetches secrets. On a flaky connection, any of them can block for 30 seconds or more.

Measure startup cost with numbers

Here I once reached for the wrong tool. I first tried zsh -xvs piped into ts, but -s reads commands from standard input, so it just sits there waiting for you to type. The thing I was using to diagnose a hang was itself hanging.

These days I do it in two steps, from your OS's stock terminal app:

# Step 1: time an interactive shell start (over 0.5 s is worth a look)
time zsh -i -c exit
# Step 2: add one line at the top and one at the bottom of ~/.zshrc, then run
# top:    zmodload zsh/zprof
# bottom: zprof
zsh -i -c exit

zprof ships with zsh and prints a per-function table of where the milliseconds went. Usually something like nvm_auto or an rbenv helper sits at the top. Remove the two lines when you're done.

A quick bypass and a permanent fix

For an emergency bypass, add "args": ["-f"] to your shell entry under terminal.integrated.profiles.osx. -f is zsh's NO_RCS: it skips .zshrc and friends entirely. It also skips .zprofile, so your PATH will be off—treat it as a way to isolate the cause, not as a solution.

The real fix is to lazy-load the expensive parts, for example sourcing nvm.sh only the first time you run node. That brought my terminal start under a second.

Pattern C: when commands work nowhere, not even the ones that "should just be there"

If the terminal runs but node: command not found keeps greeting you, the usual cause is that a GUI-launched Antigravity carries a different $PATH than your regular terminal.

On macOS with Homebrew this is especially common. If launching with open -a Antigravity from a terminal works but the Dock icon does not, you are in this situation.

Put the GUI side and the shell side next to each other

First, print the PATH inside the Antigravity terminal, one entry per line:

# Goal: print PATH one entry per line so differences are easy to spot
echo "$PATH" | tr ':' '\n'

Then, from a separate terminal app, look at launchd's PATH, which GUI apps start from (macOS):

# Goal: see the PATH that GUI-launched apps start from (macOS)
launchctl getenv PATH

If the first lacks /opt/homebrew/bin (Apple Silicon) or /usr/local/bin (Intel Mac), Homebrew tools are invisible to that shell. A short launchd PATH is normal; the fix is to extend the PATH on the shell side that the terminal starts, not to fatten launchd's.

Two ways to fix it permanently

  • Option 1 — set PATH in Antigravity's settings: Add "PATH": "/opt/homebrew/bin:/usr/local/bin:${env:PATH}" under terminal.integrated.env.osx. Quick, but awkward if different projects need different Node versions.
  • Option 2 — fix it in ~/.zprofile: My recommendation. Put eval "$(/opt/homebrew/bin/brew shellenv)" on one line. VS Code–family editors start the terminal's shell as a login shell on macOS, so this file gets read. Confirm that on your version with the [[ -o login ]] check above.

On Windows, start from how environment variables work. A change only reaches processes that start after the change. After adding to PATH, fully quit Antigravity (and confirm no antigravity.exe is left in Task Manager); if the command is still invisible, sign out and back in once. User-level variables are picked up as well, so there is no need to move them to the System scope.

Two ways PowerShell on Windows gets stuck

My own machine is a Mac, so this part follows Microsoft's documented behaviour rather than something I reproduced. Please verify it on your setup.

The first is the execution policy. If running npm returns "npm.ps1 cannot be loaded because running scripts is disabled on this system", the command is not missing; PowerShell is refusing to run the script.

# Purpose: check the current policy, then set RemoteSigned for the current user only
Get-ExecutionPolicy -List
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

Limiting the scope to CurrentUser leaves other users and organisation-wide settings untouched. Where an administrator-distributed policy overrides it, setting terminal.integrated.defaultProfile.windows to Command Prompt or Git Bash is the quicker way out.

The second is a heavy profile ($PROFILE). It is the same shape as ~/.zshrc on macOS: if every launch loads something slow, the prompt waits for it. You can time a bare start like this:

# Purpose: time a PowerShell 7 start (use powershell instead of pwsh for Windows PowerShell 5)
Measure-Command { pwsh -NoLogo -Command exit }

If a run with -NoProfile is several seconds faster, the culprit lives inside your profile.

Let a script make the first call: term-triage.sh

After typing the same checks by hand many times, I got tired of it and wrote a small script that only gives a first read on Pattern B versus C. Run it from the Antigravity terminal while the panel is open (Patterns B and C).

#!/usr/bin/env bash
# Purpose: first read on slow startup (B) vs missing commands (C)
TIMEFORMAT='%R'
startup=$( { time "$SHELL" -i -c exit >/dev/null 2>&1; } 2>&1 )
echo "interactive shell startup: ${startup}s"
awk -v t="$startup" 'BEGIN { if (t + 0 > 1.0) print "  -> looks like Pattern B: suspect the files read at startup"; else print "  -> startup time is acceptable" }'
missing=0
for cmd in node npm git python3; do
  if command -v "$cmd" >/dev/null 2>&1; then
    printf '  ok       %s -> %s\n' "$cmd" "$(command -v "$cmd")"
  else
    printf '  missing  %s\n' "$cmd"; missing=1
  fi
done
if [ "$missing" = 1 ]; then echo "  -> looks like Pattern C: compare the PATH values"; else echo "  -> all commands resolved"; fi

I ran it against a wrapper shell rigged to take 1.5 seconds to start, and it printed 1.524 seconds with the "Pattern B" hint. Adding a command name that does not exist produced a missing line and the "Pattern C" hint. Both branches were checked on a Linux shell.

Two caveats. The one-second threshold is my own rule of thumb, not a standard for your machine. And $SHELL -i only starts a new interactive shell; it does not reproduce login-shell loading. To measure the login side, also try time zsh -l -i -c exit.

Last resort: reset just the terminal configuration

If none of the three fixes worked, reset only the terminal-related settings. You do not need to reinstall.

With Antigravity fully quit, on macOS:

# Goal: back up settings.json and remove only terminal.integrated.* keys
# Requires: Antigravity fully quit before running
cd ~/Library/Application\ Support/Antigravity/User
cp settings.json settings.json.backup
python3 -c "
import json
with open('settings.json') as f:
    data = json.load(f)
cleaned = {k: v for k, v in data.items() if not k.startswith('terminal.integrated.')}
with open('settings.json', 'w') as f:
    json.dump(cleaned, f, indent=2)
print(f'removed {len(data) - len(cleaned)} terminal keys')
"

One caveat: if settings.json contains comments, json.load will fail. In that case don't force it; move the terminal.integrated. lines aside by hand in the editor.

Relaunch and you should get a terminal on default settings. Restore keys from the backup one at a time until the broken one reveals itself.

That back-out-then-restore routine is how I once pinned a problem on terminal.integrated.persistentSessionReviveProcess. After an update changes internals, settings that worked for months can quietly become landmines.

What to do next

Terminal plumbing is a layer you forget about until it fails, and then it stops everything. Today, run time zsh -i -c exit once and write the number down. If it's over a second, that's a marker for where your future self will get stuck.

Before fixing anything, doubt the measuring tool first. I try to hold to that line hardest on the nights I'm in a hurry.

If you're working through related issues, these may help:

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

◉ Antigravity2026-10-17
Build the Environment Note Before You Write the Question — A Small Shell Script for Posts That Get Replies
A small shell script that gathers your OS, tool versions, and the tail of a log into one note you can paste into a forum post or issue, with secrets masked. Here is what it catches, what it misses, and the three lines only you can write.
◉ Antigravity2026-10-24
The File Is Right There, but Linux Says "No Such File" — Check the Interpreter, Not the Path
When agy's grep search fails on Linux and the log says "no such file or directory" for a file that clearly exists, the culprit is the ELF interpreter. Here is how to confirm it, reproduce it, and work around it for now.
◉ Antigravity2026-10-20
NoClassDefFoundError on Old Android Devices Only — Four Clues I Gather Before Handing It to an Agent
Everything works on new phones, but Android 6 devices crash. Using a Supplier NoClassDefFoundError that appeared after a Glide update, this note covers the order of diagnosis, the coreLibraryDesugaring setup, and what to prepare before asking an agent to investigate.