Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

fix(swarm): start Swarm agents on Windows machines again (#1969)

lingrd3dcdd0d5e610
diff --git a/cli/src/superTabs/planInput.spec.ts b/cli/src/superTabs/planInput.spec.ts
index 6d2e4ff76..723ec08d8 100644
--- a/cli/src/superTabs/planInput.spec.ts
+++ b/cli/src/superTabs/planInput.spec.ts
@@ -124,10 +124,11 @@ describe('planSetup', () => {
const s = setup(state({ machines: [machine('m1'), machine('old', {}, { receivedAt: NOW - 60_000 }), machine('paused', { paused: true }),
machine('full', { availableSlots: 0 }), machine('win', {}, { resources: { memoryTotalBytes: 68_719_476_736, memoryUsedBytes: 1, projectDiskFreeBytes: 132_155_797_504, os: 'Windows' } }),
machine('tight', {}, { resources: { memoryTotalBytes: 8_000_000_000, memoryUsedBytes: 7_500_000_000, projectDiskFreeBytes: 132_155_797_504, os: 'macOS' } })] }))
- expect((s.instance.machines as Json[]).map(m => m.id)).toEqual(['m1'])
+ // A Windows machine is planned like any other (Swarm agents run there since grid 0.3.61 and CLI 0.4.95).
+ expect((s.instance.machines as Json[]).map(m => m.id)).toEqual(['m1', 'win'])
expect(Object.fromEntries(s.leftOut.map(l => [l.machine, l.reason]))).toEqual({
'old.local': 'Machine is offline or unreachable.', 'paused.local': 'New work is paused on this machine.',
- 'full.local': 'This machine has no available agent slots.', 'win.local': 'Swarm agents do not run on Windows yet.',
+ 'full.local': 'This machine has no available agent slots.',
'tight.local': 'Insufficient measured free memory.' })
})
diff --git a/cli/src/superTabs/routeCommand.spec.ts b/cli/src/superTabs/routeCommand.spec.ts
index 980c6578b..2b2d0d5e7 100644
--- a/cli/src/superTabs/routeCommand.spec.ts
+++ b/cli/src/superTabs/routeCommand.spec.ts
@@ -313,12 +313,15 @@ describe('routeTask', () => {
expect(open.mock.calls.map(c => c[1])).toEqual(['m1'])
expect(recorded(s).command.decision.candidates.some((c: { title: string }) => c.title.startsWith('New agent') && c.title.includes('m1'))).toBe(true)
})
- it('starts nothing on an account machine that says it runs Windows, or whose last two starts started nothing', async () => {
+ it('offers new agents on an account machine that runs Windows, as on any other, and starts nothing where the last two starts started nothing', async () => {
+ // Swarm agents were kept off Windows while grid's CLI did not run there (2026-10-26). It does since grid 0.3.61 and CLI
+ // 0.4.95: a Claude Code agent on a grid model started and answered on DESKTOP-0TFH0OJ.
const windows = opener(id => daemon(id, { agents: id === 'm1' ? ['h1'] : [], capacity: { resources: { memoryTotalBytes: 8e9, memoryUsedBytes: 1e9, cpuPercent: 10, projectDiskFreeBytes: 1e11, os: 'Windows' }, tools: { git: true }, devices: {} } }))
const s = scoped()
- expect(await routeTask(input, s, where, windows)).toMatchObject({ ok: true, pick: { kind: 'member' } })
- expect(recorded(s).command.decision.excluded).toEqual(expect.arrayContaining([expect.objectContaining({ title: expect.stringContaining('New agent'),
- reason: expect.stringContaining('Swarm agents do not run on Windows yet.') })]))
+ await routeTask({ ...input, assessment: { ...input.assessment, difficulty: 'high' } }, s, where, windows)
+ const decision = recorded(s).command.decision
+ expect(decision.candidates.some((c: { title: string }) => c.title.startsWith('New agent'))).toBe(true)
+ expect(JSON.stringify(decision.excluded)).not.toContain('Windows')
const failed = { id: 's', request: { machineId: 'm1' }, harnessId: null, dispatched: true, error: 'The engine did not start.' }
const t = tab(); Object.assign(t.state, { starts: [failed, { ...failed, id: 's2' }] })
const stuck = scoped({ tab: t })
@@ -891,12 +894,13 @@ describe('routing contributed capacity', () => {
}
const checkout = (extra: Record<string, unknown> = {}) => ({ folder: 'p2', repository: 'github.com/example/two', git: true, push: true, ...extra })
- it('never starts a Swarm agent on Windows, and keeps a member already there', async () => {
+ it('routes on Windows exactly as on any other machine, with or without members there', async () => {
const windows = healthy(); Object.assign(windows.observation.resources, { os: 'Windows' })
- const { answer } = await runPool(windows)
- expect(answer).toMatchObject({ error: 'NO_CANDIDATE' })
- expect(reasons(answer)[0]!.reason).toContain('Swarm agents do not run on Windows yet')
- expect((await runPool(windows, true)).answer).toMatchObject({ ok: true, pick: { kind: 'member' } })
+ for (const members of [false, true]) {
+ const onWindows = (await runPool(windows, members)).answer
+ expect(onWindows.ok).toBe(true)
+ expect(onWindows.pick).toEqual((await runPool(healthy(), members)).answer.pick)
+ }
})
it('leaves out an engine the machine says is signed out or not installed, and keeps one whose sign-in is unknown', async () => {
diff --git a/cli/src/superTabs/routeCommand.ts b/cli/src/superTabs/routeCommand.ts
index d737bc719..6137e0cf4 100644
--- a/cli/src/superTabs/routeCommand.ts
+++ b/cli/src/superTabs/routeCommand.ts
@@ -23,10 +23,11 @@ export const OFFLINE = 'Machine is offline or unreachable.'
const UNKNOWN_QUOTA: Probe['quota'] = { known: false, leftPercent: null, resetsAt: null }
const UNKNOWN_LOAD: NonNullable<Probe['load']> = { agents: null, freeMemoryBytes: null, hasFolder: null }
const EXHAUSTED_WINDOW = 'The subscription has an exhausted usage window. Wait for a fresh allowance reading or choose another account.'
-/** Temporary (Scholes, 2026-10-26): grid's CLI does not run on Windows yet, so a Swarm agent started there never comes up
- * (WIN-DELL took starts that silently never ran). Lifting it is emptying this list. Compared with the OS every reading
- * has (lib/machineHardware.ts names it `Windows`), so a host from before readiness is left out too. */
-export const NO_SWARM_AGENTS_ON: readonly string[] = ['Windows']
+/** The operating systems a Swarm agent is not started on, compared with the OS every reading has (lib/machineHardware.ts
+ * names it `Windows`). Windows was here from 2026-10-26 (Scholes): grid's CLI did not run there, so WIN-DELL took starts
+ * that silently never ran — a held start ran grid's installer every 2 seconds instead. Lifted once grid 0.3.61 and CLI
+ * 0.4.95 ran there: a Claude Code agent on a grid model started and answered on DESKTOP-0TFH0OJ (2026-10-28). */
+export const NO_SWARM_AGENTS_ON: readonly string[] = []
const ENGINE_NAME: Record<string, string> = { claude: 'Claude Code', codex: 'Codex' }
const NO_PUSH = "This machine's git login cannot push to the project repository. Its owner can sign in to GitHub there (gh auth login, then gh auth setup-git)."
/** Said of a candidate where the task cannot be done: it never names the required machine, which the Lead may not see. */