Skip to content

Where agent teams gather. Cross-platform team chat where AI agents are first-class teammates — with cloud or bring-your-own (Claude Code / Codex) brains.

TypeScript

fix(ui): picking Grok Build paired the computer to Claude (#42)

Xialie Zhuangc4eeceacaf0e
diff --git a/src/desktop/MeView.tsx b/src/desktop/MeView.tsx
index df69478..b2171af 100644
--- a/src/desktop/MeView.tsx
+++ b/src/desktop/MeView.tsx
@@ -708,7 +708,8 @@ function ComputersTab() {
const [code, setCode] = useState<string | null>(null)
const [copied, setCopied] = useState(false)
// Engine for a NEWLY added computer's starter/assigned agents. Claude is the
- // default (no flag → daemon auto-detects); Codex appends `--engine codex`.
+ // default (no flag → daemon auto-detects); every other pick is named
+ // explicitly, or the daemon auto-detects and engines[0] silently wins.
const [engine, setEngine] = useState<'claude' | 'codex' | 'grok'>('claude')
// Default on: install the always-on service (auto-start/restart/update).
// --install-service is macOS/Linux only (daemon throws on Windows) → off + hidden there.
@@ -736,7 +737,8 @@ function ComputersTab() {
const origin = getPairingServerOrigin()
const serverFlag = origin ? ` --server ${origin}` : ''
- const pairCommand = code ? `npx cumora@latest agent computer --pair ${code}${serverFlag}${engine === 'codex' ? ' --engine codex' : ''}${asService ? ' --install-service' : ''}` : ''
+ const engineFlag = engine === 'claude' ? '' : ` --engine ${engine}`
+ const pairCommand = code ? `npx cumora@latest agent computer --pair ${code}${serverFlag}${engineFlag}${asService ? ' --install-service' : ''}` : ''
const list = Object.values(byId).sort((a, b) =>
(a.kind === 'cloud' ? 0 : 1) - (b.kind === 'cloud' ? 0 : 1) || a.name.localeCompare(b.name))
diff --git a/src/desktop/Onboarding.tsx b/src/desktop/Onboarding.tsx
index 544a94c..8f4968a 100644
--- a/src/desktop/Onboarding.tsx
+++ b/src/desktop/Onboarding.tsx
@@ -17,8 +17,8 @@ export function Onboarding() {
const [err, setErr] = useState<string | null>(null)
const [copied, setCopied] = useState(false)
// The engine the starter team (and agents later assigned here) will run on.
- // Claude is the default; picking Codex appends `--engine codex`. We DON'T
- // append `--engine claude` so a Codex-only machine still auto-detects rather
+ // Claude is the default; ANY other pick must be named explicitly. We DON'T
+ // append `--engine claude` so a Claude-less machine still auto-detects rather
// than erroring on a Claude it doesn't have.
const [engine, setEngine] = useState<'claude' | 'codex' | 'grok'>('claude')
// Default to installing the always-on service: it auto-starts on boot,
@@ -36,7 +36,10 @@ export function Onboarding() {
}, [copied])
const origin = getPairingServerOrigin()
- const engineFlag = engine === 'codex' ? ' --engine codex' : ''
+ // Every non-default engine, not just Codex: without the flag the daemon
+ // auto-detects and the server takes engines[0] as this computer's DEFAULT, so
+ // picking Grok on a machine that also has Claude silently paired it to Claude.
+ const engineFlag = engine === 'claude' ? '' : ` --engine ${engine}`
const serviceFlag = asService ? ' --install-service' : ''
const cmd = code ? `npx cumora@latest agent computer --pair ${code}${origin ? ` --server ${origin}` : ''}${engineFlag}${serviceFlag}` : ''