Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

fix(messaging): accept agy-bin as the antigravity pane owner

review7e340cc86ec2
diff --git a/src/shared/agents/pane-owner-predicate.test.ts b/src/shared/agents/pane-owner-predicate.test.ts
index ad30bdbc2..378220315 100644
--- a/src/shared/agents/pane-owner-predicate.test.ts
+++ b/src/shared/agents/pane-owner-predicate.test.ts
@@ -114,6 +114,16 @@ describe('isAgentPane', () => {
expect(isAgentPane(owner(['node /opt/bin/other']), 'custom:abc', ['whatever'])).toBe('not-agent')
})
+ it('recognises antigravity after its Linux wrapper has exec-ed into agy-bin (issue #1373)', () => {
+ // `~/.local/bin/agy` is a shell script ending in `exec …/agy-bin "$@"`: the wrapper is gone
+ // from the process table, so `agy-bin` is the only name the foreground group ever shows.
+ expect(isAgentPane(owner(['/home/u/.antigravity/bin/agy-bin'], 'agy-bin'), 'antigravity')).toBe('agent')
+ expect(isAgentPane(owner(['agy-bin --conversation=abc'], 'agy-bin'), 'antigravity')).toBe('agent')
+ // Still exact-name: a look-alike is not the agent, and no other agent accepts it.
+ expect(isAgentPane(owner(['/usr/local/bin/agy-bin-helper']), 'antigravity')).toBe('not-agent')
+ expect(isAgentPane(owner(['/usr/local/bin/agy-bin']), 'gemini')).toBe('not-agent')
+ })
+
it('covers every built-in agent, so a new one cannot be silently unverifiable', () => {
for (const id of BUILTIN_AGENT_IDS) {
expect(AGENT_BINARIES[id], `${id} has no binary list`).toBeTruthy()
diff --git a/src/shared/agents/pane-owner-predicate.ts b/src/shared/agents/pane-owner-predicate.ts
index 032e8f44a..665085edb 100644
--- a/src/shared/agents/pane-owner-predicate.ts
+++ b/src/shared/agents/pane-owner-predicate.ts
@@ -68,7 +68,11 @@ export const AGENT_BINARIES: Record<string, readonly string[]> = {
gemini: ['gemini'],
opencode: ['opencode'],
grok: ['grok'],
- antigravity: ['agy'],
+ // `agy-bin` (issue #1373): on Linux `agy` is commonly a shell wrapper that ends in
+ // `exec …/agy-bin "$@"`, so after the exec the foreground group holds `agy-bin` and no `agy` at
+ // all. Reported from the field, not measured here — the name is Antigravity's own and collides
+ // with nothing a plain terminal runs, so admitting it widens the predicate by that one binary.
+ antigravity: ['agy', 'agy-bin'],
cursor: ['cursor-agent']
}