Skip to content

fix(cli): accept agy for supervised worker starts - #21664

Merged
nwparker merged 2 commits into
nwparker/agy-native-chatfrom
nwparker/agy-worker-alias
Sep 21, 2026
Merged

nwparker merged 2 commits into
nwparker/agy-native-chatfrom
nwparker/agy-worker-alias

Conversation

@nwparker

@nwparker nwparker commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​73 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​72
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4

ELI5

Orca now understands agy as another name for Antigravity when starting a supervised worker.

What Changed

orca orchestration worker-start --agent agy previously returned agent_unconfigured. The CLI now sends the existing antigravity agent ID to the runtime and documents the alias in help. Both names use the configured Antigravity launcher.

Why

The installed executable is named agy, so callers naturally use that name. Normalizing at the CLI boundary preserves the existing local/remote validation and works with hosts that already support antigravity, without adding another agent identity or changing the RPC contract.

Linked Issue

Refs #14952, #15125. This addresses only the worker-start alias. Custom vendor registration, verified Antigravity model/effort selection, and the Windows lifecycle reports remain open. Current dispatch --inject targets a terminal with --to; it does not accept --agent.

Stacked on #21660.

Visual Proof

Sanitized before/after report derived from actual CLI receipts, not an app screenshot or a successful generation claim:

Before and after live CLI receipts

Testing

  • I manually tested these changes locally
  • Automated tests added/updated

macOS, installed agy 1.2.7, hidden Orca validation app, isolated folder workspace. Installed CLI rejected agy; rebuilt CLI against the same runtime returned ready / input_accepted, with requested/effective agent both antigravity. The task marker appeared in the real worker output. Generation failed with 401 ACCESS_TOKEN_TYPE_UNSUPPORTED; no successful generation, hook delivery, or worker_done claim. Test worker stopped and released.

34 focused CLI/spec tests pass, including local and remote selection preserving the canonical RPC agent and folder selector. CLI TypeScript compilation passes. Changed-code quality gate and staged lint/format checks pass. Native Windows/Linux, WSL, SSH and live paired-host execution were not tested; remote coverage here is a mocked CLI contract check.

Review

No new process launcher or path handling. Host-side checks remain authoritative. Older clients still require the canonical name; older hosts must already support Antigravity.

Agent skill upstream boundary

  • Not applicable; no upstream skill content copied.

Checklist

  • This PR is small and focused
  • Explained the behavior, mechanism and approach
  • Before/after evidence attached
  • Self-reviewed for correctness, security and performance
  • Cross-platform and remote impact considered
  • Focused tests, CLI compilation and changed-code quality checked; CI covers remaining gates

@nwparker

Copy link
Copy Markdown
Contributor Author

Independent verification update:

  • Installed agy 1.2.7 returned the exact sentinel AGY_ALIAS_LIVE_OK.
  • Alias-focused test file passed; the branch’s CLI help exposes the supervised --agent launch surface.
  • pnpm tc:cli passed.
  • Changed-code quality passed with 0 new findings.
  • CI run 35442259647 passed typecheck, static analysis, all 8 test shards, verify, and both packages; native smoke checks were also green.

Scoped verdict: Approve for the CLI agy → canonical antigravity alias, stacked on #21660. Custom vendor registration, model/effort validation, and Windows lifecycle behavior remain outside this PR.

@nwparker

Copy link
Copy Markdown
Contributor Author

Independent verification (2026-09-20):

  • Alias/worker launch focused test: 2/2 passed.
  • pnpm tc:cli passed.
  • pnpm run check:code-quality:changed origin/main passed with 0 new findings across 142 changed files.
  • Installed agy 1.2.7 authenticated exact sentinel returned AGY_ALIAS_OK.
  • Full CI 35442259647 and native smoke 35442259394 are green, including both package jobs and all test shards.

Verdict: approve in stack order for accepting agy as the supervised-worker alias. Model/effort, authenticated generation, and remote lifecycle remain covered by later stack PRs. No merge performed.

@nwparker

Copy link
Copy Markdown
Contributor Author

ELI5 / evidence / trade-offs audit

ELI5: Typing agy launches the same supervised Antigravity worker as the canonical command.

Proof: Alias tests, CLI typecheck, native smoke, and CI pass; visual proof is not applicable to a command alias.

User-facing trade-off: Custom vendor registration and remote lifecycle behavior remain outside this change.

This note scopes the claim to the evidence above; it does not claim untested remote, SSH, WSL, or vendor combinations.

@nwparker
nwparker marked this pull request as ready for review September 21, 2026 03:50

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No blocking issues — one minor consistency suggestion inline.

Reviewed changes

  • agy alias normalization — worker-start now maps --agent agy to the canonical antigravity id before the RPC call, so host-side isTuiAgent validation and local/federated selection are unchanged.
  • Help note — the alias is documented in the worker-start spec notes.
  • Alias test — a new test asserts the canonical id reaches orchestration.workerStart for both local and remote selection; it would fail if the mapping were removed (verified passing locally).
  • Windows hook payload test + CI env — inherited from the merged stacked PR #21666, not authored by this change set.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

comment: getOptionalStringFlag(flags, 'comment'),
setup: getOptionalStringFlag(flags, 'setup'),
agent: getOptionalStringFlag(flags, 'agent'),
agent: agent === 'agy' ? 'antigravity' : agent,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This literal duplicates knowledge that already lives in src/shared/tui-agent-config.ts, where antigravity.detectCmd is 'agy'. Since the CLI already imports shared agent helpers, deriving the id from that config would keep the two in sync and extend the same normalization to the other CLI verbs that still reject the installed binary name (worktree create --agent, automation --provider). Non-blocking — the current mapping is correct for antigravity.

Technical details
# Derive the alias from the shared agent config instead of a literal

## Affected sites
- `src/cli/handlers/orchestration/worker-launch-handler.ts:63` — hardcoded `agy` -> `antigravity`.
- `src/shared/tui-agent-config.ts:166-170` — `antigravity.detectCmd: 'agy'`; `getTuiAgentDetectCommands` already exposes detect names.
- `src/cli/handlers/worktree.ts:93` and `src/cli/handlers/automation-handler-flags.ts:76,89` — other `--agent`/`--provider` entry points that still reject `agy`.

## Required outcome
- The alias should not be able to drift from the canonical binary name recorded in `TUI_AGENT_CONFIG`.

## Suggested approach (optional)
- Add a small shared resolver (e.g. over `getTuiAgentDetectCommands`) that maps a command/binary name to its `TuiAgent`, and call it here; reuse it at the other entry points if accepting binary names everywhere is intended.

## Open questions for the human (optional)
- Is `agy` intended only for worker-start, or should the installed executable name be accepted anywhere a `TuiAgent` id is taken?

@nwparker

Copy link
Copy Markdown
Contributor Author

Thanks for the consistency suggestion. I’m keeping this PR scoped to the documented orchestration worker-start --agent entry point: the follow-on CLI entry points (worktree create --agent and automation --provider) have separate behavior and are outside this stacked change. The shared config remains the source of truth for launching/detection; this normalization only translates the user-facing binary alias at this one boundary. The alias is covered by the focused local/remote-selection tests and the full CI matrix is green.

@nwparker
nwparker merged commit 26586a6 into nwparker/agy-native-chat Sep 21, 2026
88 of 90 checks passed
@nwparker
nwparker deleted the nwparker/agy-worker-alias branch September 21, 2026 04:42
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