cd /news/ai-tools/show-hn-codex-claude-style-tab-follo… Β· home β€Ί topics β€Ί ai-tools β€Ί article
[ARTICLE Β· art-179467] src=github.com β†— pub= topic=ai-tools verified=true sentiment=↑ positive

Show HN: Codex/Claude-style Tab follow-up prompts for Google Antigravity (Rust)

A developer released agy-ghost-prompt v0.2.0, a native Rust and AppKit tool that adds Codex- and Claude-style Tab-to-accept ghost follow-up prompts to Google's Antigravity macOS desktop app without patching or re-signing Antigravity. The tool uses Antigravity's official Stop and PreInvocation lifecycle hooks plus a pre-warmed agy CLI stream-json worker with --json-schema to generate up to 3 ranked suggestions in roughly 1.5–2 seconds, displayed in a ~600 KB overlay daemon that reports 0.0% idle CPU because it is driven by macOS AXObserver events and a kqueue directory watcher rather than polling. It inserts text via CGEventKeyboardSetUnicodeString without touching the clipboard, isolates suggestions per conversation using Antigravity's local conversation_summaries.db, and ships as a universal arm64/x86_64 binary on GitHub.

key takeaway

Antigravity's Stop and PreInvocation hooks can drive a warm agy stream-json worker with --json-schema to return 3 ranked follow-up prompts in ~1.5–2s, surfaced by an AXObserver-driven overlay at 0.0% idle CPU.

read5 min views21 publishedDec 1, 2026
Show HN: Codex/Claude-style Tab follow-up prompts for Google Antigravity (Rust)
Image: Michielbdejong (auto-discovered)

Codex / Claude-style Tab-to-accept ghost follow-up prompts for the Google Antigravity macOS desktop app β€” built in native Rust + AppKit without patching or re-signing Antigravity.

Both Codex and Claude desktop apps predict your most likely next prompt in subtle grey ghost text inside the empty composer so you can press Tab to insert it. Google Antigravity doesn't have this built in yet.

agy-ghost-prompt adds it cleanly using Antigravity's official lifecycle hooks (Stop + PreInvocation), a pre-warmed agy CLI stream-json worker with --json-schema, and a zero-polling native macOS overlay daemon (~600 KB Rust binary, zero Dock icon, 0.0% idle CPU).

  • 2–3 ranked suggestions with instant cycling β€” generates up to 3 distinct follow-ups in one structured--json-schema call (1/3 Β· β‡₯ Tab ). Press**Shift+Tab** or**↓ / ↑** when the composer is empty to cycle through them, then** Tab** (orβ†’ ) to insert.
  • Zero-polling, 0.0% idle CPU β€” driven entirely by native macOSAXObserver (AXFocusedUIElementChanged ,AXTitleChanged ,AXValueChanged ,AXWindowMoved ,AXWindowResized ),NSWorkspace activation/Space notifications, and a kernelkqueue directory watcher for instant state/config updates.
  • Native look & feel β€” seamless click-through CocoaNSPanel aligned pixel-for-pixel over Antigravity's composer (Ask anything... ), automatically syncing with macOS Light/Dark mode.
  • Fast (~1.5–2s) & zero extra API keys β€” keeps a warmagy --input-format stream-json process (defaultgemini-4-hydrogen-low ) behind a local Unix socket so it reuses your existing Antigravity login and prompt cache.
  • Clipboard-free Tab insertion β€” usesCGEventKeyboardSetUnicodeString to insert text directly into Electron/React without touching your clipboard or clipboard history.
  • Language-aware β€” matches the language you use in each chat (e.g. English, Italian, Spanish, etc.) by anchoring on your recent user turns, even if code or assistant replies mix languages.
  • Per-conversation isolation β€” resolves exact conversation titles directly from Antigravity's localconversation_summaries.db (via nativelibsqlite3 FFI, immune to~/.sqliterc ) and skips subagent turns so concurrent chats never cross-contaminate.
  • Space & focus safe β€” checksCGWindowListCopyWindowInfo z-order (never floats over other apps/Spaces), hides immediately while typing, hides while an agent is running (PreInvocation + toolbarCancel detection), and ignoresTab if another field or menu is focused.
  • Update-proof β€” never modifies/Applications/Antigravity.app .
Antigravity turn ends
        β”‚
        β–Ό
  Stop hook (~2ms) ──► Unix socket (~/.cache/agy-ghost-prompt/worker.sock)
                                β”‚
                                β–Ό
             Warm `agy` stream-json + --json-schema worker
                     (gemini-4-hydrogen-low, ~1.5s)
                                β”‚
                                β–Ό
            ~/.cache/agy-ghost-prompt/state.json (top 3 ranked)
                                β”‚
                       kernel kqueue wakeup
                                β–Ό
       AgyGhostPrompt.app (AppKit NSPanel + AXObserver + CGEventTap)
         β€’ 0.0% idle CPU (no polling loop)
         β€’ Shows ghost text + `1/3 Β· β‡₯ Tab` over empty composer
         β€’ Shift+Tab / ↑ / ↓ β†’ cycle suggestions
         β€’ Tab (or Right) β†’ inserts via Unicode CGEvent (clipboard untouched)
         β€’ Esc β†’ dismisses  |  Typing β†’ hides immediately
         β€’ PreInvocation hook / Cancel button / Enter β†’ hides while running
  • macOS (Apple Silicon or Intel)
  • Google Antigravity desktop app
  • Antigravity CLI (agy) β€” install with:
curl -fsSL https://antigravity.google/cli/install.sh | bash

Downloads the signed-ready universal binary (arm64 + x86_64) from Release v0.2.0 and runs install:

curl -fsSL https://github.com/korisame/agy-ghost-prompt/releases/download/v0.2.0/agy-ghost-prompt-v0.2.0-macos-universal.tar.gz \
  | tar -xz -C /tmp agy-ghost-prompt && /tmp/agy-ghost-prompt install && rm -f /tmp/agy-ghost-prompt
git clone https://github.com/korisame/agy-ghost-prompt.git
cd agy-ghost-prompt
./install.sh

What install does:

  1. Installs ~/.local/bin/agy-ghost-prompt and packages~/Applications/AgyGhostPrompt.app (LSUIElement , no Dock icon).
  2. Auto-detects any local Apple Development / Developer ID codesigning certificate in your Keychain so future rebuilds preserve Accessibility trust (falls back to ad-hoc signing otherwise).
  3. Safely merges the agy-ghost-prompt`` Stop andPreInvocation entries into~/.gemini/config/hooks.json without clobbering existing hooks.
  4. Installs and starts a LaunchAgent (~/Library/LaunchAgents/com.agy-ghost-prompt.daemon.plist ) and opensSystem Settings β†’ Privacy & Security β†’ Accessibility .

In System Settings β†’ Privacy & Security β†’ Accessibility, enable AgyGhostPrompt (toggle ON). Then restart the LaunchAgent once if it was already waiting:

launchctl kickstart -k gui/$(id -u)/com.agy-ghost-prompt.daemon
Key Action
Tab (or→ if configured) Insert the highlighted follow-up into the composer (does not auto-send)
Shift+Tab or↓ Cycle to next suggestion ( 1/3 β†’ 2/3 β†’ 3/3 )
↑ Cycle to previous suggestion
Esc Dismiss suggestion for the current turn
Any character Hide ghost text immediately and type normally

Zero config is required. To customize, create ~/.config/agy-ghost-prompt/config.json (hot-reloaded live via kqueue β€” no restart needed):

{
  "model": "gemini-4-hydrogen-low",
  "theme": "auto",
  "max_chars": 110,
  "max_age_secs": 1800,
  "accept_key": "tab",
  "disabled_projects": ["private-repo", "~/work/sensitive"]
}
Field Default Description
model "gemini-4-hydrogen-low" Any model from agy models (e.g.gpt-oss-120b-medium ,gemini-4-carbon-low ). Also overridable viaAGY_GHOST_MODEL .
theme "auto" "auto" (follows macOS appearance),"dark" , or"light" .
max_chars 110 Maximum suggestion length before truncation.
max_age_secs 1800 Seconds before unused cached suggestions expire.
accept_key "tab" Key used to accept the ghost prompt: "tab" ,"right" (Right Arrow), or"both" .
disabled_projects [] List of project IDs, folder names, or workspace paths (supports ~/ ) where ghost suggestions are completely skipped.
agy_bin null Optional explicit path to agy (also overridable viaAGY_BIN ).
agy-ghost-prompt install                         # Install app bundle, hooks, and LaunchAgent
agy-ghost-prompt uninstall                       # Cleanly remove LaunchAgent, hooks, app, and cache
agy-ghost-prompt status                          # Inspect Accessibility trust, config, composer, and state
agy-ghost-prompt set-test "One" "Two" "Three"    # Push 1–3 test suggestions to the active chat

Logs live at ~/.cache/agy-ghost-prompt/daemon.log and ~/.cache/agy-ghost-prompt/hook.log.

  • Reads only your local transcript.jsonl and~/.gemini/antigravity/conversation_summaries.db (opened read-only).
  • Never modifies or injects code into Antigravity.app .
  • Never reads or modifies your clipboard.
  • Never sends conversation snippets anywhere outside your local agy CLI session.
  • Recursion-guarded via AGY_GHOST_PROMPT_INTERNAL=1 so the worker's ownagy calls never trigger hooks.
agy-ghost-prompt uninstall

Removes the LaunchAgent, the agy-ghost-prompt entry in ~/.gemini/config/hooks.json, ~/Applications/AgyGhostPrompt.app, ~/.local/bin/agy-ghost-prompt, and ~/.cache/agy-ghost-prompt.

── more in #ai-tools 4 stories Β· sorted by recency
── more on @agy-ghost-prompt 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/show-hn-codex-claude…] indexed:0 read:5min 2026-12-01 Β· β€”