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(gemini): name Gemini CLI's personal-account retirement on the node

review46717ba9440f
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsx
index 99307d8c6..f4c067fb3 100644
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@ -4980,6 +4980,30 @@ export function Canvas() {
]
)
+ // A terminal node asking for an agent node BESIDE it — today only the Gemini-retirement banner
+ // ("Open Antigravity", terminal/gemini-retired.ts). Same no-direct-line-to-the-canvas pattern as
+ // `nodeterm:open-terminal`. The new node joins the source's frame (so a bound worktree's cwd is
+ // inherited through `cwdForNewNodeIn`) and is centred one node-width to its right; a source that
+ // has left the canvas, or an id that is not a builtin agent, opens nothing.
+ useEffect(() => {
+ const onOpenAgent = (e: Event): void => {
+ const d = (e as CustomEvent<{ agentId?: string; nearNodeId?: string }>).detail
+ const agentId = BUILTIN_AGENT_IDS.find((a) => a === d?.agentId)
+ if (!agentId) return
+ const all = nodesRef.current
+ const source = all.find((n) => n.id === d?.nearNodeId)
+ const rect = source
+ ? nodeFitRect(source as FocusableNode, all as FocusableNode[])
+ : null
+ const center = rect
+ ? { x: rect.x + rect.width * 1.5 + 40, y: rect.y + rect.height / 2 }
+ : undefined
+ addAgentNode(agentId, center, source?.parentId)
+ }
+ window.addEventListener('nodeterm:open-agent', onOpenAgent)
+ return () => window.removeEventListener('nodeterm:open-agent', onOpenAgent)
+ }, [addAgentNode, nodesRef])
+
// "Spawn a team…" (issue #78): the dialog collects the task; this opens ONE conductor node
// pre-prompted with it. The conductor's own manage-nodeterm-canvas skill does the role split
// and the fan-out — the app ships no model, so the entry point deliberately adds no plumbing.
@@ -9106,6 +9130,7 @@ export function Canvas() {
return {
label: `New ${AGENT_CONFIG[aid].label}`,
icon: <AgentIcon agentId={aid} />,
+ hint: AGENT_CONFIG[aid].notice,
onClick: () => addAgentNode(aid, at, groupId)
}
}
diff --git a/src/renderer/components/Dock.tsx b/src/renderer/components/Dock.tsx
index fea7e4b94..0c85a5e3c 100644
--- a/src/renderer/components/Dock.tsx
+++ b/src/renderer/components/Dock.tsx
@@ -232,7 +232,7 @@ export function Dock({
// rows), byte-identical to before nesting existed.
if (inheriting.length === 0) {
const base = (
- <button key={aid} onClick={pick(() => onAddAgent(aid))}>
+ <button key={aid} title={AGENT_CONFIG[aid].notice} onClick={pick(() => onAddAgent(aid))}>
<AgentIcon agentId={aid} size={18} />
<span>{AGENT_CONFIG[aid].label}</span>
</button>
diff --git a/src/renderer/nodes/TerminalNode.tsx b/src/renderer/nodes/TerminalNode.tsx
index 06638515b..16db24113 100644
--- a/src/renderer/nodes/TerminalNode.tsx
+++ b/src/renderer/nodes/TerminalNode.tsx
@@ -141,6 +141,12 @@ import {
detectsResumeMiss,
resumeSessionMissing
} from '../terminal/resume-fallback'
+import {
+ GEMINI_MIGRATION_URL,
+ GEMINI_RETIRED_TAIL_CHARS,
+ geminiRetiredIn,
+ watchesGeminiRetirement
+} from '../terminal/gemini-retired'
import { MAX_LAUNCH_LINE_BYTES, lineBytes } from '@shared/canonical-line'
import { binariesFor, type PaneOwner } from '@shared/agents/pane-owner-predicate'
import {
@@ -953,6 +959,14 @@ interface CoState {
* top banner as `staleCwd`, and for the same reason.
*/
launchTooLongBytes: number | null
+ /**
+ * A gemini node's pane printed Gemini CLI's own retirement refusal ("This client is no longer
+ * supported for Gemini Code Assist for individuals…", see `terminal/gemini-retired.ts`): the
+ * user's Google account is one Google stopped serving from Gemini CLI on 2026-06-18, and the
+ * sign-in screen will loop forever. A slim banner, like `lostSession`: the terminal is alive and
+ * nothing is typed or relaunched — it names the cause and offers an Antigravity node instead.
+ */
+ geminiRetired: boolean
}
const NO_CO: CoState = {
letterbox: false,
@@ -962,7 +976,8 @@ const NO_CO: CoState = {
spawnError: null,
staleCwd: false,
lostSession: false,
- launchTooLongBytes: null
+ launchTooLongBytes: null,
+ geminiRetired: false
}
const coStates = new Map<string, CoState>()
const coSubs = new Map<string, (s: CoState) => void>()
@@ -1176,7 +1191,8 @@ function setCo(key: string, patch: Partial<CoState>): void {
next.spawnError === prev.spawnError &&
next.staleCwd === prev.staleCwd &&
next.lostSession === prev.lostSession &&
- next.launchTooLongBytes === prev.launchTooLongBytes
+ next.launchTooLongBytes === prev.launchTooLongBytes &&
+ next.geminiRetired === prev.geminiRetired
)
return
coStates.set(key, next)
@@ -2108,6 +2124,14 @@ export function TerminalNode({
}
const dismissStaleCwd = (): void => setCo(termKey, { staleCwd: false })
const dismissLostSession = (): void => setCo(termKey, { lostSession: false })
+ const dismissGeminiRetired = (): void => setCo(termKey, { geminiRetired: false })
+ // Canvas owns node creation; a terminal node has no direct line to it (same pattern as the
+ // file-manager's `nodeterm:open-terminal`). The new node lands beside this one, in its frame.
+ const openAntigravityNode = (): void => {
+ window.dispatchEvent(
+ new CustomEvent('nodeterm:open-agent', { detail: { agentId: 'antigravity', nearNodeId: id } })
+ )
+ }
const dismissLaunchTooLong = (): void => setCo(termKey, { launchTooLongBytes: null })
// "Not connected" (CoState.offline): the host was unreachable, so this node has no session
@@ -3447,6 +3471,25 @@ export function TerminalNode({
gate.push(chunk)
})
cleanups.push(offData)
+ // Gemini CLI refuses personal Google accounts since 2026-06-18, and the refusal comes
+ // BEFORE any session exists — no hook ever fires to report it, so the pane text is the only
+ // evidence. Watch a gemini-harness node's output for the CLI's own sentence and raise the
+ // banner once; it types nothing and relaunches nothing (see terminal/gemini-retired.ts).
+ // Stops at the first match; unsubscribed with the rest of the session on teardown.
+ if (agentId && watchesGeminiRetirement(capabilityAgentId(agentId))) {
+ let seen = ''
+ let offRetired: (() => void) | undefined = transport.onData(sid, (chunk) => {
+ seen = (seen + cleanEcho(chunk)).slice(-GEMINI_RETIRED_TAIL_CHARS)
+ if (!geminiRetiredIn(seen)) return
+ offRetired?.()
+ offRetired = undefined
+ setCo(termKey, { geminiRetired: true })
+ })
+ cleanups.push(() => {
+ offRetired?.()
+ offRetired = undefined
+ })
+ }
// We fell so far behind that the server discarded our queued output and redrew us from
// tmux. The capture IS the current screen, so reset the emulator and write it — writing it
// on top of a stale buffer would splice two different points in time. An EMPTY payload is
@@ -6175,6 +6218,45 @@ export function TerminalNode({
</button>
</div>
)}
+ {/* Gemini CLI retired for personal accounts: the same slim banner as lostSession, and
+ yields to the same bigger problems. Two actions — an Antigravity node (Google's
+ replacement) beside this one, and Google's migration guide — plus dismiss. */}
+ {!co.closed &&
+ !co.ended &&
+ !co.spawnError &&
+ !co.offline &&
+ !co.staleCwd &&
+ co.geminiRetired &&
+ !offscreenDown && (
+ <div className="term-node__stalecwd nodrag">
+ <span className="term-node__stalecwd-text">
+ Google no longer serves Gemini CLI to personal accounts (free, AI Pro, AI Ultra);
+ Antigravity CLI replaces it. Code Assist licenses, Vertex AI and API keys still work.
+ </span>
+ <button
+ className="term-node__stalecwd-restart"
+ onClick={openAntigravityNode}
+ title="Open an Antigravity CLI (agy) node next to this one. Install agy first if it is not on this machine: curl -fsSL https://antigravity.google/cli/install.sh | bash"
+ >
+ Open Antigravity
+ </button>
+ <button
+ className="term-node__stalecwd-restart"
+ onClick={() => void window.nodeTerminal.shell.openExternal(GEMINI_MIGRATION_URL)}
+ title={GEMINI_MIGRATION_URL}
+ >
+ Migration guide
+ </button>
+ <button
+ className="term-node__stalecwd-dismiss"
+ onClick={dismissGeminiRetired}
+ title="Dismiss"
+ aria-label="Dismiss"
+ >
+ ×
+ </button>
+ </div>
+ )}
{armed && !mdMode && (
<div
className="term-hover-guard"
diff --git a/src/renderer/terminal/gemini-retired.test.ts b/src/renderer/terminal/gemini-retired.test.ts
new file mode 100644
index 000000000..c97264b4f
--- /dev/null
+++ b/src/renderer/terminal/gemini-retired.test.ts
@@ -0,0 +1,58 @@
+import { describe, expect, it } from 'vitest'
+import { cleanEcho } from './command-delivery'
+import {
+ GEMINI_RETIRED_PHRASE,
+ GEMINI_RETIRED_TAIL_CHARS,
+ geminiRetiredIn,
+ watchesGeminiRetirement
+} from './gemini-retired'
+
+// The refusal as a 2026-09 Gemini CLI draws it: inside a bordered box, wrapped at the pane width,
+// each row repainted with cursor/colour escapes. Transcribed from a user's screenshot; the escape
+// sequences are the kind Ink emits (erase line, SGR colour, cursor up).
+const BOXED = [
+ '\x1b[2K\x1b[1G\x1b[38;2;255;135;175m│ Failed to sign in. Message: This client is no longer supported for Gemini │',
+ '\x1b[2K\x1b[1G│ Code Assist for individuals. To continue using Gemini, please migrate to the │',
+ '\x1b[2K\x1b[1G│ Antigravity suite of products: https://antigravity.google\x1b[39m │',
+ '\x1b[1A'
+].join('\r\n')
+
+describe('geminiRetiredIn', () => {
+ it('matches the refusal even when the TUI wraps it inside a bordered box', () => {
+ expect(geminiRetiredIn(cleanEcho(BOXED))).toBe(true)
+ })
+
+ it('matches the bare sentence', () => {
+ expect(geminiRetiredIn(`Message: This client is ${GEMINI_RETIRED_PHRASE}.`)).toBe(true)
+ })
+
+ it('does not match an ordinary sign-in screen', () => {
+ const signIn = cleanEcho(
+ '│ ? Get started │\r\n│ How would you like to authenticate for this project? │\r\n│ ● 1. Sign in with Google │'
+ )
+ expect(geminiRetiredIn(signIn)).toBe(false)
+ })
+
+ it('does not match a different sign-in failure', () => {
+ expect(geminiRetiredIn('Failed to sign in. Message: Request had invalid authentication credentials.')).toBe(false)
+ })
+
+ it('does not match half the phrase (a chunk boundary is the watcher’s job, not a match)', () => {
+ expect(geminiRetiredIn('This client is no longer supported for Gemini')).toBe(false)
+ })
+
+ it('still finds the refusal at the end of a full rolling buffer', () => {
+ const noise = 'x'.repeat(GEMINI_RETIRED_TAIL_CHARS)
+ const tail = (noise + cleanEcho(BOXED)).slice(-GEMINI_RETIRED_TAIL_CHARS)
+ expect(geminiRetiredIn(tail)).toBe(true)
+ })
+})
+
+describe('watchesGeminiRetirement', () => {
+ it('watches the gemini harness only', () => {
+ expect(watchesGeminiRetirement('gemini')).toBe(true)
+ for (const other of ['claude', 'codex', 'grok', 'copilot', 'opencode', 'antigravity', undefined]) {
+ expect(watchesGeminiRetirement(other)).toBe(false)
+ }
+ })
+})
diff --git a/src/renderer/terminal/gemini-retired.ts b/src/renderer/terminal/gemini-retired.ts
new file mode 100644
index 000000000..639f8a389
--- /dev/null
+++ b/src/renderer/terminal/gemini-retired.ts
@@ -0,0 +1,61 @@
+/**
+ * GEMINI CLI NO LONGER SERVES PERSONAL GOOGLE ACCOUNTS — say so on the node.
+ *
+ * Google moved the terminal experience from Gemini CLI to Antigravity CLI (`agy`) on 2026-06-18
+ * (google-gemini/gemini-cli discussion #27274). Since then Gemini CLI refuses requests from the
+ * free tier and from Google AI Pro / AI Ultra accounts; Gemini Code Assist Standard/Enterprise
+ * licences, Vertex AI and paid API keys are unaffected. What a refused user sees in the pane is a
+ * browser page saying "Authentication succeeded", then the CLI's own sign-in screen again with:
+ *
+ * Failed to sign in. Message: This client is no longer supported for Gemini Code Assist for
+ * individuals. To continue using Gemini, please migrate to the Antigravity suite of products:
+ * https://antigravity.google
+ *
+ * (captured from a user's screen, 2026-09-28). The loop reads like a nodeterm auth bug, and
+ * reinstalling the CLI or deleting `~/.gemini` does not help. There is no hook to learn it from:
+ * the refusal happens BEFORE a session exists, so no SessionStart ever fires — which is why this
+ * reads the pane, the same way `resume-fallback.ts` does for a CLI's "no such conversation" line.
+ *
+ * It only ever RAISES A BANNER. Nothing is typed into the pane and nothing is relaunched, so the
+ * cost of a false positive (someone printing this sentence in a gemini pane) is one dismissible
+ * strip of text — which is why a plain phrase match is enough here, where the resume fallback
+ * needs its three refusals.
+ */
+
+/** The part of the refusal that names the cause. Stable across the CLI versions that print it. */
+export const GEMINI_RETIRED_PHRASE = 'no longer supported for Gemini Code Assist for individuals'
+
+/** Google's own migration guide, opened by the banner's second button. */
+export const GEMINI_MIGRATION_URL = 'https://antigravity.google/docs/cli/gcli-migration'
+
+/**
+ * How much recent pane text the watcher keeps. The refusal is ~200 characters; this is enough for
+ * it plus the box border and padding the TUI draws around every wrapped line of it, and bounded so
+ * a chatty pane cannot grow the buffer without limit.
+ */
+export const GEMINI_RETIRED_TAIL_CHARS = 4096
+
+/**
+ * Letters and digits only, lowercased. Gemini's TUI wraps the message inside a bordered box, so
+ * between two words of the phrase the stream can hold padding, a `│` border, a line break and the
+ * next row's border — none of which an escape-stripped `includes` survives. Comparing the squashed
+ * forms makes the match independent of where the pane width happened to wrap it.
+ */
+function squash(text: string): string {
+ return text.toLowerCase().replace(/[^a-z0-9]+/g, '')
+}
+
+const NEEDLE = squash(GEMINI_RETIRED_PHRASE)
+
+/**
+ * Should this node watch for the refusal? Takes the CAPABILITY agent id (`capabilityAgentId`), so a
+ * custom agent built on the gemini harness is watched too, and nothing else is.
+ */
+export function watchesGeminiRetirement(capabilityAgent: string | undefined): boolean {
+ return capabilityAgent === 'gemini'
+}
+
+/** Does this pane text (escape sequences already removed) contain Gemini's retirement refusal? */
+export function geminiRetiredIn(text: string): boolean {
+ return squash(text).includes(NEEDLE)
+}
diff --git a/src/shared/agents/config.ts b/src/shared/agents/config.ts
index 203dfb857..49bee2639 100644
--- a/src/shared/agents/config.ts
+++ b/src/shared/agents/config.ts
@@ -34,6 +34,14 @@ export interface AgentConfig {
* `stdin-after-start` could deliver a prompt without producing a silently wrong command line.
*/
promptFlag?: string
+ /**
+ * A one-sentence caveat shown wherever the agent is OFFERED (menu tooltips, palette note) — 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
+ * explanation. Absent = nothing to say.
+ */
+ notice?: string
/**
* Put this between the command and an `argv` prompt — in practice `'--'`, and only for a CLI
* whose grammar has BOTH a positional prompt and subcommands.
@@ -108,7 +116,9 @@ export const AGENT_CONFIG: Record<BuiltinAgentId, AgentConfig> = {
color: '#4285f4',
launchCmd: 'gemini',
promptInjectionMode: 'stdin-after-start',
- expectedProcess: 'gemini'
+ expectedProcess: 'gemini',
+ notice:
+ 'Google stopped serving Gemini CLI to personal accounts (free, AI Pro, AI Ultra) on 2026-06-18 — use Antigravity instead. Code Assist Standard/Enterprise, Vertex AI and paid API keys still work.'
},
opencode: {
label: 'opencode',