Skip to content

feat: launch Antigravity workers as native T3 threads - #42

Merged
daveonthegit merged 2 commits into
mainfrom
feat/fm-t3-antigravity-worker
Nov 23, 2026
Merged

daveonthegit merged 2 commits into
mainfrom
feat/fm-t3-antigravity-worker

Conversation

@daveonthegit

@daveonthegit daveonthegit commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Intent

Teach firstmate's launcher to start Antigravity workers as normal T3 threads, the same as Claude and Codex, so Neon workers (and a Neon firstmate's own workers) start the normal way. Context: the T3 Code app now has a working Antigravity provider (instance id "antigravity", driver "antigravity", models such as gemini-4-neon, gemini-4-carbon, gemini-4-argon, gemini-4-hydrogen, gemini-3.8-flash, with option thinking_level low|medium|high|xhigh). Today fm-spawn --harness agy on the t3code backend refuses with "backend=t3code runs only the claude, codex, and pi harnesses, not 'agy'", so a Gemini 4 Neon bake-off worker had to be started as a T3 subagent of the firstmate thread instead of its own top-level thread. The captain approved this firstmate change and its PR to daveonthegit/firstmate.

What Changed

  • Support agy ship and scout workers as top-level T3 Antigravity threads, carrying task environment at launch and skipping CLI model, trust, and pane-readiness steps.
  • Resolve Antigravity models and thinking_level options against T3’s catalog, including CLI-style model suffixes and conflicting-effort refusals.
  • Extend fake-server lifecycle and launch coverage, and document provider setup, environment requirements, and worker-only limits.

Risk Assessment

⚠️ Medium: The launch integration follows existing T3 environment and lifecycle paths, but introduces an additional model-alias behavior beyond the stated requirement.

Testing

Five focused fake-server tests passed for selection, launch environment, refusal guards, and controls. The real isolated CLI attempt stopped at missing captain-issued authentication; its diagnostic transcript is retained. No actual T3 worker was launched, no UI was exercised, and disposable fixtures were removed.

  • Live validation: ⚠️ inconclusive - 0 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Spawn a Neon worker as a top-level T3 Antigravity thread with thinking level and task environment ⏸️ untested no Focused fake-server tests passed. Attempted the real resolve-selection CLI with isolated token location; it returned no_credential before catalog access. Cannot provision authenticated T3 through a di…
Reject unsupported launch environment, conflicting thinking levels, wrong driver, and Antigravity secondmates without mutation ⏸️ untested no Focused fake-server checks passed for these adversarial boundaries. Actual authenticated catalog validation is blocked by the real client's no_credential result; no operator credentials were read or m…
Interrupt and stop an Antigravity worker through native T3 thread controls while refusing conversation-replacing relaunch ⏸️ untested no Focused fake-server control test passed. No real worker can be created without captain-issued T3 authorization, so actual thread lifecycle could not be exercised. Supply an authorized disposable T3 en…
Evidence: T3 live-validation credential blocker

Source: T3 live-validation credential blocker

Real Antigravity selection command refused with no_credential (exit 4); captain sign-in required.

{"ok":false,"error":{"code":"no_credential","message":"no T3 credential at {run-worktree}/.test-tmp/t3-validation.NGNQsA/t3code-token; the captain signs in with: bin/fm-t3-mcp.mjs login --access full-access"}}
fm-t3-mcp: no T3 credential at {run-worktree}/.test-tmp/t3-validation.NGNQsA/t3code-token; the captain signs in with: bin/fm-t3-mcp.mjs login --access full-access

Exit status: 4
  • Outcome: ⚠️ 2 warnings across 1 run (1m28s)

Validation notes

  • Live T3 validation was not run: 0 of 3 live scenarios (spawn, refusals, interrupt/stop/relaunch) were driven against a real T3 server, because no T3 credential was provisioned for the validation pipeline. Coverage here is the portable fake-server suite (tests/fm-backend-t3code.test.sh and tests/fm-t3-mcp.test.sh, all passing locally) plus a read-only check of the live T3 Antigravity catalog recorded in docs/verification/runtime-backends.md. A real Antigravity worker will be spawned on the T3 backend after merge to verify it live.
  • Unrelated pre-existing failure: tests/fm-agy-harness.test.sh case "a zero model bound disabled the deadline" fails locally (26-27s against its 25s ceiling) identically on the base scripts without this change; it exercises the pane-backed agy model listing, which this PR does not alter.
  • The CLI-style model-id mapping (gemini-4-neon-high -> gemini-4-neon + thinking_level=high) flagged in review is deliberate scope, because Firstmate's agy profiles use agy CLI ids.
  • CI's "Behavior portable serial 11" lane was cancelled at its 30-minute job limit (all completed tests passed; the same lane runs 26-30 minutes on main); its failed jobs were re-run.

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 warning
  • ⚠️ bin/fm-t3-mcp.mjs:1069 - Simplification: CLI-style model-suffix aliases exceed the requested T3 worker support. Exact catalog models plus --effort already satisfy the stated intent; remove the suffix parser and conflict branch unless compatibility with CLI-style profiles is explicitly desired. Related sites: bin/fm-t3-mcp.mjs:356 enables the alias, :1028 parses it, :1073 adds conflict semantics; docs/t3code-backend.md:77 documents it; tests/fm-backend-t3code.test.sh:442–451 and :2371 exercise it. Retain the ordinary Antigravity model/effort and launch-environment coverage.
⚠️ **Test** - 2 warnings
  • ⚠️ docs/t3code-backend.md:41 - Focused mocked checks pass, but real Antigravity launch and control remain unproven. The isolated real client returned no_credential. Captain must authorize and provision a full-access T3 credential for a disposable validation environment with Antigravity and per-thread launch environment enabled; agent sign-in and operator-state access are forbidden.
  • ⚠️ live validation verdict: inconclusive (0 of 3 scenarios were driven live against the product); untested: Spawn a Neon worker as a top-level T3 Antigravity thread with thinking level and task environment, Reject unsupported launch environment, conflicting thinking levels, wrong driver, and Antigravity secondmates without mutation, Interrupt and stop an Antigravity worker through native T3 thread controls while refusing conversation-replacing relaunch
  • Live validation: ⚠️ inconclusive - 0 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Spawn a Neon worker as a top-level T3 Antigravity thread with thinking level and task environment ⏸️ untested no Focused fake-server tests passed. Attempted the real resolve-selection CLI with isolated token location; it returned no_credential before catalog access. Cannot provision authenticated T3 through a di…
Reject unsupported launch environment, conflicting thinking levels, wrong driver, and Antigravity secondmates without mutation ⏸️ untested no Focused fake-server checks passed for these adversarial boundaries. Actual authenticated catalog validation is blocked by the real client's no_credential result; no operator credentials were read or m…
Interrupt and stop an Antigravity worker through native T3 thread controls while refusing conversation-replacing relaunch ⏸️ untested no Focused fake-server control test passed. No real worker can be created without captain-issued T3 authorization, so actual thread lifecycle could not be exercised. Supply an authorized disposable T3 en…
  • TMPDIR="$PWD/.test-tmp" FM_TEST_SKIP_ORPHAN_REAP=1 FM_TEST_ONLY=test_agy_selection_maps_cli_ids_to_thinking_level bash tests/fm-backend-t3code.test.sh
  • Same targeted runner: test_spawn_agy_worker_launches_with_environment
  • Same targeted runner: test_spawn_agy_refuses_without_launch_environment
  • Same targeted runner: test_spawn_agy_secondmate_refused
  • Same targeted runner: test_control_agy_thread_interrupt_exit_and_relaunch
  • FM_T3CODE_TOKEN_FILE=<disposable-worktree-path> node bin/fm-t3-mcp.mjs resolve-selection --harness agy --instance antigravity --model gemini-4-neon --effort high (exit 4, no_credential)
  • Removed disposable test directories; confirmed clean working tree.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

🤖 Generated with Claude Code

The t3code backend now accepts the agy harness and launches it as a
top-level T3 thread on the provider instance whose driver is
antigravity (default instance id antigravity). Like Pi, Antigravity
reads no per-directory config, so the task environment rides the
thread launch's per-thread environment. --effort maps to the driver's
thinking_level option, and an agy CLI id such as gemini-4-neon-high
resolves to the catalog model gemini-4-neon with thinking_level high.

On T3 the agy CLI's model listing, workspace-trust pre-registration,
and pane readiness gate are skipped; interrupt, exit, the relaunch
refusal, liveness, and teardown follow the shared T3 paths. agy
second mates stay refused, as for Pi. Docs, the harness reference,
the verification record, and portable tests are updated.
@daveonthegit
daveonthegit merged commit c91b628 into main Nov 23, 2026
54 of 56 checks passed
@daveonthegit
daveonthegit deleted the feat/fm-t3-antigravity-worker branch November 23, 2026 13:10
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