Skip to content

Keep Antigravity within Google's terms for personal sign-ins - #154

Merged
m4rocks merged 2 commits into
mainfrom
antigravity-terms
Nov 28, 2026
Merged

m4rocks merged 2 commits into
mainfrom
antigravity-terms

Conversation

@m4rocks

@m4rocks m4rocks commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Closes #152. Builds on #153.

m4code ran Antigravity in ways Google's Antigravity terms (Section 6) rule out for personal Google sign-ins: auto-handoff and rewind seeded it with other conversations, it answered m4code's own title and summary prompts, and its sessions could start other agents. This PR keeps Antigravity to sessions the user types in. Each rule is a declaration in Antigravity's adapter, using the capabilities from #153.

Allow cross-harness subagents

A new switch per harness in Settings → Harnesses. With it off, other harnesses can't run that harness as a subagent, and its sessions can't start subagents or sessions on other harnesses or switch to one with set_model. A subagent on another harness needs the switch on for both. It starts on for every harness except Antigravity, whose adapter sets the default. The check runs everywhere a session crosses harnesses:

  • the spawn_subagent targets and the spawn itself
  • the review subagent picker, which greys out a refused model with the reason
  • the Claude plugin's agent types, and the --acp runner, which reads the current settings so a switch turned off since launch holds
  • a resumed subagent, and send_subagent_message to a running one
  • agent-driven set_model and start_code_session, and again when a queued switch runs at the end of the turn, so turning a switch off in between holds

Antigravity's rules

  • Rewind and fork are refused, because both start a session seeded with an earlier conversation.
  • Handoff into Antigravity is refused. Handoff out of it is allowed only when the user starts it, through the new Handoff::UserOnly, so auto-handoff and agent-driven set_model are refused.
  • Text generation is refused, which covers every prompt of m4code's own: titles, commit messages, summaries, and the note that tells the model a usage limit is near. Antigravity rows are greyed out in the Text generation picker. A saved Antigravity choice goes back to Local summary at launch, with one toast. The tool-blocking Gemini folder for text generation is gone, and the adapter deletes the one older builds left.
  • m4code's compaction fallback is refused. Only agy's own /compact runs, when agy lists it.
  • "Continue in fresh session" stays on, and it uses the local summary because text generation is refused.
  • /swarm and /teamwork are no longer hidden. The MCP instructions in Antigravity sessions no longer tell it to prefer m4code's tools over them, through a new mcp::PREFER_OWN_TOOLS entry in the adapter's new mcp_off, which its sessions and the --acp runner both apply.
  • Antigravity sessions don't get start_code_session or read_code_session, so an Antigravity agent can't start a session with a prompt it wrote or pull another session into its context. The adapter's new mcp_off now names single tools as well as features. m4code also refuses either call from an Antigravity session server-side, and the instructions say the tools are off.
  • The usage meter is back, read only when the user presses refresh. UsageSource::every is now an Option, and None means on request only.

Auto-handoff now ranks a harness with no usage reading after every harness with one, where it used to count as 0% used. Agent-driven switches and auto-handoff now also need "Allow cross-harness subagents" on for both harnesses. The switch's default lives in each agent's subagent Provider, so a build without that adapter still saves the right default. The README terms note and the Antigravity warning cover all of the above.

Verification

  • cargo clippy --locked --all-targets -- -D warnings is clean.
  • cargo test: 610 unit tests pass. New tests cover:
    • Handoff::UserOnly
    • the cross-harness rule on both sides
    • Antigravity's declared rules
    • the MCP instructions without the swarm advice
    • single MCP tools turned off and named as off in the instructions
  • The headless handoff test now expects the handoff into Antigravity to be refused with the terms notice. It then starts a session on Antigravity directly to keep covering its full-access relaunch.
  • Headless tests (cargo test -- --ignored --test-threads=1 app::headless): 33 passed, 5 failed.
  • Screenshot of Antigravity's Harnesses popup (just screenshot harness-dialog, a new scenario), at target/screenshots/harness-dialog.png. Both switches are off, and the terms warning is below them. I shortened the cross-harness switch's description after this capture because it was cut off.
  • Codex (gpt-6.2-sol) reviewed the change. Fixed from its findings:
    • The switches are checked again when a queued switch runs and on send_subagent_message.
    • The usage-limit nudge is gated.
    • The --acp runner applies PREFER_OWN_TOOLS.
    • The cross-harness default now comes from Provider.
    • A saved text generation model is no longer cleared in a build that leaves its adapter out.

Left as is

  • "Continue in fresh session" stays on for Antigravity, as Keep Antigravity within Google's terms for personal sign-ins #152 planned and as decided after review. It starts a new Antigravity session seeded with a local summary of its own conversation, and only the user can start it.
  • An older m4code that saves the state file drops the new switches, so they come back with their defaults.

Not verified

The issue asks to check two things with a Gemini API key rather than a personal sign-in: that a turn stuck on RESOURCE_EXHAUSTED fails cleanly, and whether agy lists /compact over ACP. I have no API key here, so neither was checked.

Risk

Medium for Antigravity users: rewind, fork, handoffs into Antigravity and Antigravity text generation stop working, on purpose. For the other harnesses, the cross-harness switch starts on, so nothing changes until a user turns it off. Existing state files load the switch's default.

Adds a per-harness Allow cross-harness subagents switch, off by default
for Antigravity, checked wherever a session reaches another harness.
Antigravity's adapter refuses rewind, fork, text generation, m4code's
compaction fallback and handoffs into it, allows handoffs out of it only
when the user starts them, reads usage only on refresh, and keeps
/swarm and /teamwork.

Closes #152.
@vercel

vercel Bot commented Nov 28, 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 28, 2026 2:16am UTC

Its sessions don't get start_code_session or read_code_session, and
m4code refuses either call from one. mcp_off now names single tools.
@m4rocks
m4rocks changed the base branch from adapter-capabilities to main November 28, 2026 02:23
@m4rocks
m4rocks merged commit 291f59b into main Nov 28, 2026
5 checks passed
@m4rocks
m4rocks deleted the antigravity-terms branch November 28, 2026 02:24

This branch was successfully deployed

1 active deployment
Preview — 04834780 Deployed Nov 28, 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.

Keep Antigravity within Google's terms for personal sign-ins

1 participant