Skip to content

Add Antigravity subagents, compact per-provider limits, and one card and dialog per subagent provider - #130

Merged
m4rocks merged 7 commits into
mainfrom
antigravity-subagents
Nov 19, 2026
Merged

m4rocks merged 7 commits into
mainfrom
antigravity-subagents

Conversation

@m4rocks

@m4rocks m4rocks commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Claude could hand tasks to Codex and OpenCode but not to Google Antigravity. Adding a provider meant editing a match in a dozen places. The Custom subagents page was also one long stack of every provider's switches, models and edit settings, which was hard to read.

  • Antigravity subagents. agy acp is a third provider. Claudiu sets the model and thinking level with ACP's session/set_config_option. The level is capped at the highest one the chosen model offers, since Gemini 3.8 Flash, for one, has no xhigh. With Allow edits on, it runs in accept-edits mode. On Windows, Claudiu also finds agy in %LOCALAPPDATA%\agy\bin when it isn't on the PATH.
  • Read-only that holds. Antigravity has no read-only mode: in its default and plan modes it wrote files without asking, and agy acp takes no settings. Read-only runs instead start agy with --gemini-dir pointing to a folder in Claudiu's data. That folder's config/hooks.json holds a PreToolUse hook that runs claudiu --acp --read-only-hook, which allows only reading and searching tools. agy runs a tool whose hook gives no answer, so the hook script answers deny itself when Claudiu can't start. Its files are written only when they change, and moved into place whole, so a run in progress never reads a half-written hook. Sign-in lives in the system keyring and carries over. The user's own Antigravity rules, skills and MCP servers don't load in read-only runs, and the settings text says so.
  • Limits. While Antigravity subagents are on, the sidebar shows one row of meters per group of models (Gemini, Claude/GPT, Argon), from agy -p /usage --output-format json. agy answers that itself from 1.1.11 on, at no token cost, and Claudiu checks agy --version before asking, so an older agy never spends a model turn on it. It asks every five minutes, and a failed ask keeps the last reading.
  • Compact limits for every provider. The sidebar footer had grown very tall with each limit on three lines. Each limit is now one bar with its percent and reset countdown inside it, under "5 HOUR" and "7 DAY" shown once. Each row starts with logos tinted like its bars: Claude, Codex, and each Antigravity pool by the logos of its models (Gemini; Claude and OpenAI; Gemini with "Ar" for Gemini 4 Argon). The logos are Lobe Icons (MIT, assets/LICENSE-LOBE-ICONS), because Simple Icons has no OpenAI or Antigravity logo. Each provider now declares in its Provider how to read its limits, how often, and its colour and logos, so one ingest step and one set of sidebar rows serve them all. The last reading of each is kept in state.json, so Antigravity's rows show at launch the way Codex's did, instead of after agy's five seconds.
  • Steps heading. A custom subagent's report lists the steps it ran under a heading that now says Claude Code counts them as 0 tool uses. Reading that count once, a parent Claude asked a Codex reviewer to redo a whole review, spending two more turns of Claude usage. A look through past transcripts found the custom subagents' own turns unmetered; the rest of the Claude usage they cause is the parent Claude delegating, reading reports and following up.
  • Plug-and-play providers. Each provider is one Provider value in subagents.rs, holding its names, program, texts and the few ways its ACP conversation differs. Per-provider data uses AgentMap<T>. Adding a provider takes a variant, its place in Agent::ALL, and a Provider. State files keep their flat codex_* / opencode_* keys, so older builds still read them. The mod now takes each provider's display name from CLAUDIU_SUBAGENTS instead of a table of its own.
  • Settings redesign. Custom subagents shows one card per provider, with its switch and a status line: "Off", "2 subagents · read-only", or a warning when it is on with no model. The card lists the chosen models' names. Clicking it opens that provider's dialog with its switch, Allow edits and a searchable model list. Switching a provider on with no model opens the dialog. The dialog shrinks to fit small windows and large scales, and its body scrolls above Done.

Evidence

  • cargo test --locked passes (534, 7 ignored), cargo clippy --locked --all-targets -- -D warnings is clean, and claude plugin test mod passes 28.

  • Live, against agy 1.5.12 signed in with Google AI Pro, through claudiu --acp:

    • read-only, asked to read Cargo.toml, write probe.txt and run echo ran > ran.txt: it reported the version, and both the write and the command were refused, with neither file created. Before the hook, the same run created probe.txt;
    • Allow edits on: it created probe.txt;
    • effort: max on Gemini 3.8 Flash first failed with Thinking level "xhigh" is not offered; it now runs at high;
    • the limits read returned three pools: Gemini, Claude/GPT, and Argon with only a weekly window.
  • New tests cover the hook's allowlist, the hook script denying when Claudiu is missing (it runs the real cmd script), hook files left alone when unchanged, the version gate, /usage parsing, the thinking-level cap, the state file round trip, the cards and dialog flow, the sidebar meters, and the dialog fitting a 720×420 window.

  • GPT Sol reviewed the diff over two rounds. It found that concurrent runs could rewrite the hook mid-read, that an old agy would spend a turn on every poll, and that the dialog could overflow small windows. All three are fixed.

  • After the limits rework, one more GPT Sol review round found that a reading older than 15 minutes hid its reset countdown, which would have hit every reading saved before launch. Fixed and tested. Its other finding, that logos should turn yellow or red with a bar near its limit, was declined: the logos tell providers apart, and the bar already shows the warning.

  • 540 Rust tests pass, clippy is clean, and the 28 mod tests pass.

Risk

  • Nobody has tried this in a live Claude Code session or looked at the new settings UI in the running app. Only headless layout tests cover the UI.
  • Read-only runs rely on agy keeping its hook contract and its tool names (read_file, grep_search, …). A tool agy adds later is denied until it is listed.
  • macOS and Linux paths (keyring sign-in with a separate --gemini-dir, the .sh hook) are tested by unit tests only.
  • To undo, revert the commit.

…rovider its own card and dialog

Antigravity (`agy acp`) is a third custom-subagent provider beside Codex and
OpenCode. Claudiu sets its model and thinking level through ACP config options,
capped at the highest level the model offers. With Allow edits on it runs in
accept-edits mode. Read-only runs use a Gemini folder in Claudiu's data, whose
PreToolUse hook allows only reading and searching tools and denies when Claudiu
can't be started. While its subagents are on, the sidebar shows Antigravity's
limits for each group of models, from `agy -p /usage`, which costs no tokens
and is asked every five minutes.

Each provider is now one `Provider` value in subagents.rs, and per-provider
data is an `AgentMap`, so adding one doesn't mean touching every match. State
files keep their flat keys. The mod reads each provider's display name
from CLAUDIU_SUBAGENTS.

Settings > Custom subagents shows one card per provider, with its switch and a
summary of what Claude gets. The card opens that provider's dialog: its switch,
Allow edits and a searchable model list.
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
claudiu Ready Ready Preview Nov 19, 2026 10:07am UTC

With Claude, Codex and three Antigravity pools on, the footer stacked a
label line, a bar and a caption line per limit and grew very tall. Each
limit is now one bar with its percent and reset countdown written inside,
under "5 HOUR" and "7 DAY" shown once. Every source gets a labelled row
with the same two columns, so a pool with only a weekly limit keeps its
bar under the other weekly bars, and a thin line separates providers.

A reading older than 15 minutes shows its age in place of the countdown.
"Gemini 4 Argon" is labelled "ARGON".
Claude's and Codex's rows show only their logo, tinted like their bars.
Antigravity's pools share its logo, so they keep their names beside it.
The logos are Lobe Icons' mono SVGs (MIT); Simple Icons has no OpenAI or
Antigravity logo.
The Antigravity rows read GEMINI, CLAUDE/GPT and ARGON beside one shared
logo. Each pool now shows the logos of the models it holds, tinted
Antigravity's colour: Gemini's, Claude's and OpenAI's side by side, and
Gemini's with "Ar" for Gemini 4 Argon, a named Gemini model with limits
of its own. A pool Claudiu doesn't know keeps Antigravity's logo and its
shortened name.
Claude Code shows a Codex, OpenCode or Antigravity subagent as having
made 0 tool uses, since its steps run outside Claude Code. A parent
Claude that read that count once asked a reviewer to do its whole review
again, spending two more turns of the person's Claude usage. The steps
heading now says the count is expected.
…ding at launch

Codex's limits appeared at launch because Claudiu reads them from Codex's
own logs, while Antigravity's waited about five seconds for agy to answer.
Each provider now says in its Provider value how to read its limits, how
often, and which colour and logos its rows use. Claudiu keeps the last
reading of each in state.json, so every provider's rows show at launch
and refresh in the background, and a failed read keeps the last one.
The sidebar draws every provider through the same rows, with a narrower
logo column so the bars start closer to the logos.
A reading older than 15 minutes showed its age instead of its reset
countdown, so readings saved before launch, and Claude's own after a
quiet spell, never said when their limit resets. The reset time stays
true, so it now shows whenever it is still ahead.
@m4rocks m4rocks changed the title Add Antigravity subagents with their limits, and give each subagent provider its own card and dialog Add Antigravity subagents, compact per-provider limits, and one card and dialog per subagent provider Nov 19, 2026
@m4rocks
m4rocks merged commit 1657aef into main Nov 19, 2026
5 checks passed
@m4rocks
m4rocks deleted the antigravity-subagents branch November 24, 2026 22:38

This branch was successfully deployed

1 active deployment
Preview — 0523d5a5 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant