oliver-zehentleitner / maity
runner: start the antigravity harness (agy) on the runner, so reviewer agents can be placed there
tsk-e062xzrgfxxc Open
Owner request 2026-11-11 (chat 112533): test that the antigravity harness (agy) can be started on the runner, so the owner can add reviewer agents there.
Today READY in cli/src/maity/runner/adapters.py has stub, claude-code, codex, opencode; antigravity has no adapter.
Steps:
- On the runner VM: can
agybe installed for the runner user and run headless or interactive the way the other adapters need (start prompt, resume, sandbox or confinement, how git andmaityreach it)? Write down what works and what does not. - If it works: an adapter plus tests, contract text in §15 for the new harness,
cli/context/runner.mdentry. - End-to-end on the runner: place one reviewer agent with this harness, it joins, waits, answers a review request.
Report the step-1 findings on this card before building step 2.
Notes
An agent · Nov 11, 2026, 21:58 UTC
Step 1 findings (read-only: nothing installed, no agy process started). [V] = verified on the runner, [D] = read in the official docs (antigravity.google/docs), not tried.
Install
- [V] agy is not installed on the runner; no node needed. The x86_64 machine has glibc 2.41, bwrap, and working unprivileged user namespaces.
- [V] I read the official script (antigravity.google/cli/install.sh) and did not run it. It has no sudo. It fetches a manifest and a native binary from a Google Cloud Run updater host, checks SHA512 and writes to
~/.local/bin/agy, or to--dir. Then it runsagy install, which edits the shell profile and its aliases unless given--skip-path/--skip-aliases[D]. So a user-space install looks possible. Not tried.
Modes [D]
- Headless:
agy -p "<prompt>", with--output-format text|json|stream-json; json carriesconversation_id,statusandusage. Default--print-timeoutis none. - Interactive with a start prompt:
-i/--prompt-interactive "<text>". - Resume:
-c/--continue(most recent) or--conversation <id>. Each headless run is a new process. Whether--continueis scoped to the working directory is not documented. - Exit codes: 0 on success, non-zero with the reason on stderr. No documented code for a provider limit. An unknown
--modelexits non-zero. - Headless needs a stored sign-in from one interactive run first (keyring or browser; over SSH a URL plus a pasted code), or
GEMINI_API_KEYwith"modelProvider": "gemini"in settings, or ADC (AGY_ADC_AUTH=true). Whether the keyring login lasts on a headless server is not tried.
Permissions [D]
- Rules
action(target)inallow/ask/denylists, with Deny > Ask > Allow. Rule forms:command(prefix),command(regex:…),read_file(path),write_file(path),mcp(…). So an allowlist like the other adapters' looks expressible. - Headless: an action that needs approval is soft-denied, and the run goes on and exits 0.
--dangerously-skip-permissionsexists (not for us). - The documented place for rules is only the user file
~/.gemini/antigravity-cli/settings.json. No flag or env var points to another settings file or config dir. A per-placement config would need a per-placement HOME (unverified), and that may break the keyring login.
Sandbox [D]
--sandboxorenableTerminalSandbox; on Linux, kernel namespaces. It covers shell commands only. Project folders are read-write; anything not mounted is invisible. No network by default, with an allowlist of hosts throughread_urlrules. When unavailable it silently has no effect; there is no "fail if unavailable" switch. Whether file tools are confined is not stated.
Project config (main risk for §6.1) [D]
- The workspace loads
.agents/hooks.json,.agents/mcp_config.json,.agents/plugins/,.agents/skills/, rulesGEMINI.md/AGENTS.md/.agents/rules/, and (per a third-party cheat sheet) workspace settings that override global ones. - No documented switch turns off the repository's hooks, MCP or plugins (opencode has
OPENCODE_DISABLE_PROJECT_CONFIG). A trust gate for workspaces (trustedWorkspaces) is mentioned without saying what it blocks. This needs a real test before an adapter can claim the runner's guarantee.
git and maity
- [D] They are allowed through
command(git …)/command(maity …)allow rules. In sandbox mode, network goes to allowlisted hosts only, so the hub and the forge would be listed. Whether the clone's.git/maitycredential can be hidden from file tools, as the other adapters do, is not documented. - Not tried: any real run.
Contract: §15.3's
harnesses[].idlist has noantigravityyet.Assessment: install and headless/interactive/resume look adequate. Two things are open, and only a test install can settle them: whether the repository's own config can be fenced off, and how to give each placement its own settings without breaking the login. I propose a test install in user space as the next step, on go only.
An agent · Nov 12, 2026, 18:53 UTC
Step 2 findings, part 1 of 2 (test install, agy 1.5.7, signed in by the owner). [V] = run on the runner in a scratch clone with a stub credential, [D] = official docs, [S] = read in agy's built-in docs, changelog or binary strings, not run. No adapter code, no placement touched.
Install [V]
- The official script installs a single native binary (about 280 MB) to the user's
~/.local/bin/agy, plus an empty cache dir.agy installonly appended a PATH line to.bashrcand.profile; nothing else in the profiles changed. No sudo. - First run creates
~/.gemini/(config, conversations, logs). With no D-Bus session the sign-in is stored as a file in~/.gemini/antigravity-cli/(mode 0600), not in a keyring. - Sign-in is required: without it
-pexits with "authentication failed" after printing an OAuth URL. The owner signed in interactively (Google OAuth, URL + pasted code).
Modes [V]
- Headless
agy -p … --output-format jsonworks: JSON carriesconversation_id,status,usage; exit 0. - Interactive in tmux with
-i "<prompt>"works. A new folder first shows "Do you trust the contents of this project?" with only "Yes" or "No, exit".--settings '{"trustedWorkspaces":["<dir>"]}'skips the dialog for that session without saving it. - Resume:
--conversation <id>continues that conversation (headless).-ccontinues the most recent conversation of the working directory: from another directory it started a new one. Interactive-creopened the directory's last conversation. - 1.5.7 changed the default agent mode to Auto for headless runs too [S]: commands run in the terminal sandbox and a reviewer model may let a command leave it. Seen [V]: in Auto a command bypassed the sandbox and listed
.git/maityafter the review approved it. The adapter must set the mode itself.
Point 1, fencing off the repository's config [V]
- With the clone as working directory, a headless run loads all of it, in a folder that is not trusted:
.agents/hooks.json(SessionStart and PreInvocation hooks ran),.agents/mcp_config.json(the server command was started), a plugin's MCP server under.agents/plugins/, rulesGEMINI.md,AGENTS.md,.agents/rules/, and skills. Trust gates only the interactive start; it is no fence for-p. --add-dir <clone>loads the same.- Hooks and MCP servers run outside the terminal sandbox (
--sandbox/enableTerminalSandbox): they still wrote outside the workspace. - No setting turns this off:
--settingsrejects unknown keys, andhooks,mcp,mcpServers,plugins,customizations,workspaceTrustetc. are all "unknown setting". Known keys includepermissions,toolPermission,agentMode,enableTerminalSandbox,allowNonWorkspaceAccess,trustedWorkspaces,modelProvider. - What works: the working directory is a runner-owned directory (not a git repo) that holds only the clone. Then nothing from the clone's
.agents/or rules loaded, also after the agent read and wrote files in the clone and rancd clone && git …there. The project'sAGENTS.mdis then not loaded; the start prompt has to name it (as for opencode). - Not tested: whether the agent can plant
.agents/orGEMINI.mdin that parent directory for its next start (it is writable workspace). The runner would have to check the parent at every start and refuse or clean it.
- The official script installs a single native binary (about 280 MB) to the user's
An agent · Nov 12, 2026, 18:53 UTC
Step 2 findings, part 2 of 2 (markers as in part 1).
Point 2, per-placement settings [V]
--settings <json or file>gives a session settings that are never saved. They are merged with the user's~/.gemini/antigravity-cli/settings.json: an allow rule from the user file still applied next to the session's rules. Global customizations in~/.gemini/config/and its project permissions apply as well [S].- Config follows
$HOME. A per-placementHOMEwith the sign-in file linked from the operator's worked headless (PONG; the link was still a link afterwards; a token refresh was not observed). But an interactive start in a freshHOMEshows first-run onboarding including a terms and data-use consent screen; I stopped there and accepted nothing. A changedHOMEalso reaches the agent's git, gh and maity, so the runner would have to pin those (e.g.GIT_CONFIG_GLOBAL,GH_CONFIG_DIR). - The owner's sign-in session saved
trustedWorkspaces: [<the runner user's home>]into the user settings, which trusts every folder below it for interactive starts.
Credential (.git/maity) [V], stub file, working directory = parent of the clone
- No rule: the file tool read it.
permissions.deny: ["read_file(<clone>/.git/maity)"]: the file tool is refused ("matches a user-configured deny rule"), and inside the terminal sandbox the directory is masked by an empty mount, socat/lssee nothing.- In default mode with
toolPermission: "proceed-in-sandbox"and the sandbox on: unlisted commands run inside the sandbox without asking; a request to leave the sandbox is denied in headless; a command matching anallowrulecommand(<prefix>)may leave the sandbox and then sees the credential.command(echo)did not coverecho … && ls …outside the sandbox (refused). - So
maity(needs its credential and the network) would be allow-listed and run outside the sandbox, the same shape as Claude Code. Any other allow-listed command can read the credential as well when it leaves the sandbox. - Not tested: network inside the sandbox, a provider limit's exit code.
Proposal for the adapter (for review, nothing built)
- Working directory: a runner-owned per-placement directory containing only the clone; never the clone itself, no
--add-dir. The runner checks it at start for.agents/,.agent/,_agents/,_agent/,GEMINI.md,AGENTS.mdand refuses with a detail code. The start prompt namesclone/AGENTS.mdand says tocdinto the clone. - A per-placement
HOME(likeCODEX_HOME) so the operator's settings, global customizations and conversations stay out, with the sign-in file linked. The onboarding/consent state to seed for interactive starts is still open, and so are git/gh/maity paths under a changedHOME. Alternative: keep the operator'sHOMEand document that the operator's own agy settings apply to agents. Owner's call. --settings <file in the runner's state>:agentMode: "",toolPermission: "proceed-in-sandbox",enableTerminalSandbox: true,trustedWorkspaces: [<placement dir>], denyread_file/write_filefor.git/maityand the paths the other adapters deny, allowcommand(maity)plus the repository's grants. Confinement:sandbox, with the caveat that allow-listed commands leave it.- Supervised:
agy -p <prompt> --output-format json, then--conversation <id>from the JSON (not-c). Interactive:agy -i <prompt>in tmux, resume with-c(scoped to the directory). - Contract §15.3: add
antigravitytoharnesses[].id.