Skip to content

feat(harness): integrate Antigravity agy CLI as verified crewmate/secondmate harness - #3524

Open
ashoffic wants to merge 5 commits into
kunchenguid:mainfrom
ashoffic:fm/fm-integrate-agy-adapter-0901
Open

feat(harness): integrate Antigravity agy CLI as verified crewmate/secondmate harness#3524
ashoffic wants to merge 5 commits into
kunchenguid:mainfrom
ashoffic:fm/fm-integrate-agy-adapter-0901

Conversation

@ashoffic

@ashoffic ashoffic commented Sep 2, 2026

Copy link
Copy Markdown

Intent

Formally integrate the Antigravity agy CLI as a verified Firstmate crewmate and secondmate harness

What Changed

  • Add the agy CLI harness adapter, including a new turn-end hook (bin/fm-agy-turnend-hook.sh) and wiring through harness detection, spawn, control, teardown, busy, composer, and session-lock libraries (bin/fm-harness.sh, bin/fm-spawn.sh, bin/fm-control-lib.sh, bin/fm-teardown.sh, etc.) so agy can run as both a crewmate and secondmate.
  • Fix issues found in review of the initial integration: incorrect JSON output from the agy turn-end hook, an orca Ctrl-U capability gap, and a dead spawn variable substitution.
  • Add tests/fm-agy-harness.test.sh and update existing harness tests (kimi, muse, quota-choose, secondmate) for the new adapter; add adapter reference docs (.agents/skills/harness-adapters/references/harness/agy.md, docs/verification/agy.md) and sync scripts inventory, resume-contract comments, turn-end guard docs, and docs/documentation-audiences.json.

Risk Assessment

✅ Low: The change adds the agy adapter by consistently extending every existing harness-dispatch table (control-lib, busy-lib, composer regexes, spawn templates, teardown cleanup, session-lock identity, quota provider mapping, docs) using the same patterns already established for grok/kimi/cursor, backed by a new comprehensive test suite (tests/fm-agy-harness.test.sh) and verification doc; the one prior-review commit already fixed the JSON-output trap bug, the orca C-u capability check, and a dead AGYBIN substitution, and a spot-check of the resulting backend-key refactor and hook script confirms they are correct.

Testing

All agy-adapter and related harness/secondmate test suites pass at the target commit; a full run of the pre-existing fm-secondmate-harness.test.sh suite (48/48) confirmed the branch's widened concurrency-test retry window fixes a real timing flake present at the base commit, with no regressions found across the CLI adapter integration.

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • bash tests/fm-agy-harness.test.sh
  • bash tests/fm-kimi-harness.test.sh
  • bash tests/fm-muse-harness.test.sh
  • bash tests/fm-quota-choose.test.sh
  • bash tests/fm-secondmate-harness.test.sh (target commit f830306, full run, 48/48 pass)
  • bash tests/fm-secondmate-harness.test.sh (base commit 8988af2, full run in isolated clone, for flake comparison)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Formally integrate the Antigravity agy CLI as a verified Firstmate crewmate
and secondmate harness with:
- Global plugin hook management via bin/fm-agy-turnend-hook.sh (PreInvocation and Stop)
- Verified process detection, control capabilities, session lock identity, and quota-axi google provider mapping
- Autonomous spawn template with --dangerously-skip-permissions, economic Gemini 3.7 Flash Medium default, and threaded --model/--effort flags
- Teardown cleanup of task pointers, tokens, and registry auth records
- Comprehensive unit, behavior, and integration tests in tests/fm-agy-harness.test.sh
- Empirical verification documentation and harness reference docs
@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (2): Last reviewed commit: "no-mistakes(review): document the standi..." | Re-trigger Greptile

Comment thread bin/fm-spawn.sh
muse) printf '%s' 'env -u CLAUDECODE -u PI_CODING_AGENT -u GROK_AGENT -u FM_PI_HARNESS -u ANTIGRAVITY_AGENT XDG_CONFIG_HOME=__MUSECONFIG__ XDG_DATA_HOME=__MUSEDATA__ MUSE_EXPERIMENTAL_FOREIGN_PERSONAL_CONTEXT_KILL=on __MUSEBIN__ --yolo __MODELFLAG____EFFORTFLAG__"$(__OPINPUT__ encode launch-brief < __BRIEF__)"' ;;
# Antigravity (agy): interactive supervised session launched with
# --dangerously-skip-permissions to run tool actions autonomously.
agy) printf '%s' 'env -u CLAUDECODE -u PI_CODING_AGENT -u GROK_AGENT -u FM_PI_HARNESS -u CURSOR_AGENT -u CURSOR_INVOKED_AS __AGYBIN__ --dangerously-skip-permissions __MODELFLAG____EFFORTFLAG__--prompt-interactive "$(__OPINPUT__ encode launch-brief < __BRIEF__)"' ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Autonomy bypass is unconditional

Every agy ship, scout, or secondmate launch includes --dangerously-skip-permissions, and the command reaches the worker pane without a later authority check. This disables tool-approval prompts without an explicit autonomy grant, allowing the worker to edit, commit, push, or perform other tool actions autonomously in its worktree.

Context Used: If there is a VISION.md file at the root of the re... (source)

Greptile flagged agy's unconditional --dangerously-skip-permissions as an
autonomy bypass with no later authority check. Every verified harness
(claude, codex, cursor, muse, grok) already composes the same kind of
unconditional bypass flag in launch_template(): the explicit grant VISION.md
requires is the captain's decision to spawn the task through fm-spawn.sh's
task contract, not a second check inside the worker pane. Record that
standing decision in .greptile/rules.md so it isn't re-litigated per harness.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@kunchenguid kunchenguid mentioned this pull request Sep 2, 2026
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