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.

feat(antigravity): resume on cold restore; refuse --after on SSH projects

review195f410951ba
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsx
index f4c067fb3..d9353a995 100644
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@ -439,6 +439,7 @@ import { activeSessionApi } from '../session/session'
import {
agentConfig,
hasHooks,
+ hasHooksOverSsh,
canBranch,
canRename,
canContextLink,
@@ -11155,6 +11156,15 @@ export function Canvas() {
})
return null
}
+ // Same guardrail, one layer down: this agent reports status only on THIS machine (no
+ // hook installer on an SSH host yet), so on an SSH project it would never say "done".
+ if (ctlSsh && !hasHooksOverSsh(depAgent)) {
+ reply({
+ ok: false,
+ error: `${verb}: --after ${depId} runs an agent that reports no status in SSH projects yet`
+ })
+ return null
+ }
}
return ids
}
diff --git a/src/renderer/components/Dock.tsx b/src/renderer/components/Dock.tsx
index 0c85a5e3c..f19474b4e 100644
--- a/src/renderer/components/Dock.tsx
+++ b/src/renderer/components/Dock.tsx
@@ -276,7 +276,7 @@ export function Dock({
onMouseEnter={() => setOpenSub(aid)}
onMouseLeave={() => setOpenSub((cur) => (cur === aid ? null : cur))}
>
- <button onClick={pick(() => onAddAgent(aid))}>
+ <button title={AGENT_CONFIG[aid].notice} onClick={pick(() => onAddAgent(aid))}>
<AgentIcon agentId={aid} size={18} />
<span>{AGENT_CONFIG[aid].label}</span>
<span className="dock-menu__chevron">▸</span>
diff --git a/src/shared/agents/config.capabilities.test.ts b/src/shared/agents/config.capabilities.test.ts
index 0d4afd9d0..0a07d024a 100644
--- a/src/shared/agents/config.capabilities.test.ts
+++ b/src/shared/agents/config.capabilities.test.ts
@@ -314,9 +314,13 @@ describe('antigravity capabilities', () => {
expect(readsClaudeShapedTranscript('antigravity')).toBe(false)
expect(canTransferFrom('antigravity')).toBe(false)
expect(canContextLink('antigravity')).toBe(false)
- // `agy --conversation <id>` resumes (measured), but it is a later slice: joining now makes cold
- // restore type an unvalidated resume line.
- expect(canResume('antigravity')).toBe(false)
+ // `agy --conversation=<id>` resumes; the id is validated at the interpolation site
+ // (SAFE_SESSION_ID) and a dead one is ignored by agy itself (it starts fresh). Not minted.
+ expect(canResume('antigravity')).toBe(true)
+ expect(resumeCommand('antigravity', '5f0c2f8e-9a51-4c41-9d2e-2b6f0f3e7a11')).toBe(
+ 'agy --conversation=5f0c2f8e-9a51-4c41-9d2e-2b6f0f3e7a11'
+ )
+ expect(resumeCommand('antigravity', "x'; rm -rf ~")).toBeNull()
expect(mintsSessionId('antigravity')).toBe(false)
// No subagent/recurring/branch events are wired (invoke_subagent exists in the enum, unmeasured).
expect(canSubagent('antigravity')).toBe(false)
diff --git a/src/shared/agents/config.ts b/src/shared/agents/config.ts
index 49bee2639..e165e2076 100644
--- a/src/shared/agents/config.ts
+++ b/src/shared/agents/config.ts
@@ -35,7 +35,8 @@ export interface AgentConfig {
*/
promptFlag?: string
/**
- * A one-sentence caveat shown wherever the agent is OFFERED (menu tooltips, palette note) — not
+ * A one-sentence caveat shown as the tooltip where the agent is OFFERED (pane/sidebar menus, the
+ * Dock; not the ⌘K palette, whose right-aligned note does not wrap a sentence this long) — not
* a capability, and never read to decide behaviour. Exists for gemini: Google stopped serving
* Gemini CLI to personal accounts on 2026-06-18 (google-gemini/gemini-cli discussion #27274),
* and a user who picks it with a personal account otherwise meets a sign-in loop with no
@@ -183,7 +184,22 @@ export const AGENT_HOOK_TARGETS = [
'copilot',
'antigravity'
] as const
-export const RESUMABLE_AGENTS = ['claude', 'codex', 'gemini', 'opencode', 'grok', 'copilot'] as const
+// antigravity: `agy --conversation=<id>` — the `=` spelling agy prints in its own exit hint
+// (`agy --conversation=%s`, 1.2.12 binary). The id is the hook payload's `conversationId`, recorded
+// as the node's session id. A dead id is the SAFE failure here: agy logs "Conversation %s not found,
+// ignoring --conversation flag" and starts a fresh conversation (1.2.12 binary) — so a wrong id costs
+// the history, never the launch. Without membership a cold restore (machine reboot) brought an agy
+// node back as a bare shell under an Antigravity badge (`canColdRestore` needs `canResume`).
+// UNVERIFIED on a device: that the hook's conversationId is the id `--conversation` accepts.
+export const RESUMABLE_AGENTS = [
+ 'claude',
+ 'codex',
+ 'gemini',
+ 'opencode',
+ 'grok',
+ 'copilot',
+ 'antigravity'
+] as const
// Agents whose session id we MINT at launch (`--session-id <uuid>`) instead of learning it only
// from hook events. Each member must have a measured caller-chosen-id grammar below.
//
@@ -459,6 +475,15 @@ const includes = (list: readonly string[], id: AgentId): boolean =>
list.includes(capabilityAgentId(id))
export const hasHooks = (id: AgentId): boolean => includes(AGENT_HOOK_TARGETS, id)
+/**
+ * Hook-reporting agents whose hooks nodeterm installs on THIS machine only — `RemoteHooks.setup()`
+ * has no installer for them on an SSH host yet. On an SSH project such a node never reports a
+ * state, so nothing may WAIT on it (`--after`): the dependant would sit QUEUED forever.
+ */
+export const LOCAL_ONLY_HOOK_AGENTS = ['antigravity'] as const
+/** Does this agent report status when its node runs on an SSH project's host? */
+export const hasHooksOverSsh = (id: AgentId): boolean =>
+ hasHooks(id) && !includes(LOCAL_ONLY_HOOK_AGENTS, id)
export const canResume = (id: AgentId): boolean => includes(RESUMABLE_AGENTS, id)
export const mintsSessionId = (id: AgentId): boolean => includes(SESSION_ID_CAPABLE, id)
/** Is the caller-chosen session-id flag available for this effective base harness? */
@@ -651,6 +676,8 @@ export function resumeCommandWith(
return `${launchCmd} --session ${sid}`
case 'copilot':
return `${launchCmd} --resume=${sid}`
+ case 'antigravity':
+ return `${launchCmd} --conversation=${sid}`
case 'claude':
case 'gemini':
case 'grok':