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.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
Swarm: every linked task is a step; a step's agent records the task's checks (#2520)
0xken15d5e34786003e
diff --git a/backend/src/superTabs/commands.ts b/backend/src/superTabs/commands.tsindex a52cd2eeb..77351115e 100644--- a/backend/src/superTabs/commands.ts+++ b/backend/src/superTabs/commands.ts@@ -1729,7 +1729,7 @@ export function applyCommand(original: SuperTabState, actor: Actor, input: Comma|| groupProject(state, reviewed).id !== project.id) fail('NOT_FOUND', 'This conversation is unavailable.', 404)open(state, reviewed.id)// One level: a step's own work is a task's step, never a task with steps of its own (task steps design).- if (command.step && reviewed.step) fail('STEP_OF_STEP', 'A step belongs to a task, not to another step.', 400)+ if (command.step && isStep(reviewed)) fail('STEP_OF_STEP', 'A step belongs to a task, not to another step.', 400)}// Who asked: the person named, else the one a Buddy's proposal was sent for, else a person opening it themselves.const proposal = command.proposalMessageId ? proposalOf(state, project, context.proposal) : undefined@@ -2750,7 +2750,7 @@ export function applyCommand(original: SuperTabState, actor: Actor, input: Commadelete worker.lostTaskif (!group.agentIds.includes(worker.id)) group.agentIds.push(worker.id)// A step's agent works in its task's chat, where its owner and the other steps' agents are (task steps design).- const owning = group.step && group.reviewOf ? state.conversations.find(c => c.id === group.reviewOf) : undefined+ const owning = isStep(group) ? state.conversations.find(c => c.id === group.reviewOf) : undefinedif (owning && !owning.agentIds.includes(worker.id) && joinsProject(state, owning, worker.id)) owning.agentIds.push(worker.id)rememberAttempt(group)group.assignment = { id: operationId, agentId: worker.id, status: 'working', configuration: structuredClone(worker.configuration),diff --git a/backend/src/superTabs/parts/write.test.ts b/backend/src/superTabs/parts/write.test.tsindex 18a1e77ab..c8177fd6c 100644--- a/backend/src/superTabs/parts/write.test.ts+++ b/backend/src/superTabs/parts/write.test.ts@@ -39,9 +39,10 @@ describe('the finished-work mark a conversation write stores', () => {for (const status of ['working', 'review', 'lost', 'stopped', null]) expect(extracted('group', group(status), 1).workFinished).toBe(false)})- it('is set on a review while no Reviewer works on it, so the pass can close it once its pull requests are (tidy.ts)', () => {- const review = (status: string | null) => ({ ...group(status), reviewOf: 'built' })- for (const status of [null, 'lost', 'stopped', 'done', 'cancelled']) expect(extracted('group', review(status), 1).workFinished).toBe(true)- for (const status of ['working', 'review', 'needs_human', 'blocked']) expect(extracted('group', review(status), 1).workFinished).toBe(false)+ // Every linked group is a step, which closes with its task, never on its own clock (task steps design; Ken, 2026-11-02).+ // A row written before keeps the mark it had until it is written again, and the pass still closes those as before.+ it('is never set on a linked group: it closes with its task', () => {+ const linked = (status: string | null) => ({ ...group(status), reviewOf: 'built' })+ for (const status of [null, 'lost', 'stopped', 'done', 'cancelled', 'working', 'review']) expect(extracted('group', linked(status), 1).workFinished).toBe(false)})})diff --git a/backend/src/superTabs/parts/write.ts b/backend/src/superTabs/parts/write.tsindex eeb32b0c2..d923957e2 100644--- a/backend/src/superTabs/parts/write.ts+++ b/backend/src/superTabs/parts/write.ts@@ -70,7 +70,7 @@ export function extracted(kind: PartKind, data: unknown, stamp: number): Record<lastActivityAt: group.lastActivityAt ? new Date(group.lastActivityAt) : new Date(stamp), hostDigest: hostDigest(group),// A review with no active Reviewer is read by the archive pass too: it closes once its pull requests are (tidy.ts reviewClosable).// A step is never: it archives with its task (task steps design; steps.ts closeSteps), not on its own clock.- workFinished: !(group.step && group.reviewOf) && (['done', 'cancelled'].includes(group.assignment?.status ?? '') || (!!group.reviewOf && !activeWork(group))) }+ workFinished: !group.reviewOf && (['done', 'cancelled'].includes(group.assignment?.status ?? '') || (!!group.reviewOf && !activeWork(group))) }}case 'agent': {const agent = data as Agentdiff --git a/backend/src/superTabs/projectUpdates.ts b/backend/src/superTabs/projectUpdates.tsindex 61b97703d..0792d8edb 100644--- a/backend/src/superTabs/projectUpdates.ts+++ b/backend/src/superTabs/projectUpdates.ts@@ -62,8 +62,8 @@ export const UNANSWERED_REQUEST_MS = 2 * 60 * 60_000* keeps its own number, which is the conversation whose messages the report asks the coordinator to read. */export function reportedAs(state: SuperTabState, group: Conversation): string {const name = (g: Conversation) => g.number !== undefined ? `#${g.number}` : JSON.stringify(g.title)- const task = group.step && group.reviewOf ? state.conversations.find(c => c.id === group.reviewOf) : undefined- return task ? `${name(group)} (step ${group.step} of ${name(task)})` : name(group)+ const task = group.reviewOf ? state.conversations.find(c => c.id === group.reviewOf) : undefined+ return task ? `${name(group)} (step ${group.step ?? group.title} of ${name(task)})` : name(group)}export function projectUpdateRequest(state: SuperTabState, target: Agent, now: number): MessageDraft | null {diff --git a/backend/src/superTabs/steps.test.ts b/backend/src/superTabs/steps.test.tsindex 42933438d..edb0cddb5 100644--- a/backend/src/superTabs/steps.test.ts+++ b/backend/src/superTabs/steps.test.ts@@ -130,12 +130,6 @@ describe('a step closes with its task', () => {expect(extracted('group', f.group(id), 1).workFinished).toBe(false)})- it('keeps an old linked group\'s mark: it archives on its own clock as today', () => {- const f = stepsFixture()- const old = f.run({ type: 'conversation.create', title: 'Review', brief: 'x', reviewOf: f.task, checks: [] }, f.as(f.dev)).result.conversationId as string- expect(extracted('group', f.group(old), 1).workFinished).toBe(true)- })-it('archiving a task by hand cancels its working step', () => {const f = stepsFixture()const working = f.step('Review'), done = f.step('Test')@@ -222,15 +216,6 @@ describe('who hears a step', () => {expect(to(post(f.task, other), f.task)).toEqual([[f.lead]])})- it('an old linked group keeps today\'s notices', () => {- const f = stepsFixture()- const old = f.run({ type: 'conversation.create', title: 'Review', brief: 'x', reviewOf: f.task, checks: [] }, f.as(f.dev)).result.conversationId as string- const rev = f.add('rev', old)- f.run({ type: 'work.assign', conversationId: old, agentId: rev }, f.as(f.dev))- const messages = f.run({ type: 'work.status', conversationId: old, assignmentId: f.group(old).assignment!.id, status: 'done', result: 'Passed' } as Command, f.as(rev)).messages- expect(to(messages, old)).toEqual([[f.lead]])- expect(messages.find(m => m.conversationId === old)!.text).toBe('Done\n\nPassed')- })})describe('the PM\'s reports', () => {@@ -286,3 +271,36 @@ describe('cancelling an assigned task', () => {expect(effects.messages.filter(m => m.conversationId === working).map(m => [m.text, m.recipients])).toEqual([['Fix login was cancelled.', [rev]]])})})++// Ken, 2026-11-02 (screenshot): the PM opened "Test: PR #2514" the old way, with no step name, a minute after saving the+// workflow that says steps, and the Tester's posts reached the PM. Every linked task is a step, named or not: what reaches+// the PM no longer rests on an agent remembering the workflow.+describe('a linked task opened without a step name', () => {+ function linked() {+ const f = stepsFixture()+ const id = f.run({ type: 'conversation.create', title: 'Test: PR #2514', brief: 'Test it.', reviewOf: f.task, checks: [] } as Command, f.as(f.lead)).result.conversationId as string+ const tester = f.add('tester', id)+ f.run({ type: 'work.assign', conversationId: id, agentId: tester }, f.as(f.lead))+ return { f, id, tester }+ }+ it('tells the task\'s owner its Ready and Done, and its unnamed posts', () => {+ const { f, id, tester } = linked()+ const done = f.run({ type: 'work.status', conversationId: id, assignmentId: f.group(id).assignment!.id, status: 'done', result: 'Passed' } as Command, f.as(tester)).messages+ expect(done.filter(m => m.conversationId === id).map(m => m.recipients)).toEqual([[f.dev]])+ expect(f.group(f.task).agentIds).toContain(tester)+ })+ it('an unnamed post from its agent reaches the owner', () => {+ const { f, id, tester } = linked()+ const posted = f.run({ type: 'message.send', conversationId: id, text: 'Starting on the simulator.', replyTo: null, recipientIds: [] } as Command, f.as(tester)).messages+ expect(posted.map(m => m.recipients)).toEqual([[f.dev]])+ })+ it('closes with its task, not on its own clock', () => {+ const { f, id, tester } = linked()+ f.run({ type: 'work.status', conversationId: id, assignmentId: f.group(id).assignment!.id, status: 'done', result: 'Passed' } as Command, f.as(tester))+ expect(extracted('group', f.group(id), 1).workFinished).toBe(false)+ })+ it('is named in reports by its title', () => {+ const { f, id } = linked()+ expect(reportedAs(f.state, f.group(id))).toBe(`#${f.group(id).number} (step Test: PR #2514 of #${f.group(f.task).number})`)+ })+})diff --git a/backend/src/superTabs/steps.ts b/backend/src/superTabs/steps.tsindex ea834af94..e3772a04d 100644--- a/backend/src/superTabs/steps.ts+++ b/backend/src/superTabs/steps.ts@@ -5,12 +5,17 @@*/import { activeWork, finishWorker, type Conversation, type SuperTabState } from './model.js'-/** Whether [group] is a step of a task (an older linked group, with no name, is not). */-export const isStep = (group: Pick<Conversation, 'step' | 'reviewOf'>): boolean => !!group.step && !!group.reviewOf+/** Whether [group] is a step of a task: any linked group, named or not. Ken, 2026-11-02: a PM that opened "Test: PR #2514"+ * the old way, a minute after saving the steps workflow, still heard every Tester post; what reaches the PM must not rest on+ * an agent remembering the workflow. */+export const isStep = (group: Pick<Conversation, 'reviewOf'>): boolean => !!group.reviewOf++/** A step's name: the one it was opened with, else its title (a linked group opened without one). */+export const stepName = (group: Pick<Conversation, 'step' | 'title'>): string => group.step ?? group.title/** The steps of task [taskId], in creation order. */export const stepsOf = (state: SuperTabState, taskId: string): Conversation[] =>- state.conversations.filter(c => c.reviewOf === taskId && !!c.step)+ state.conversations.filter(c => c.reviewOf === taskId)/** Ends [task]'s steps with it, in the same write. An open one is cancelled with [reason] as its result and its agent* freed; it stays unarchived, as an archived conversation takes no delivery (store.ts deliveryAllowed) and its agent isdiff --git a/backend/src/superTabs/store.ts b/backend/src/superTabs/store.tsindex 5caeb3d95..1844bebfd 100644--- a/backend/src/superTabs/store.ts+++ b/backend/src/superTabs/store.ts@@ -1500,7 +1500,7 @@ export class SuperTabStore {&& !!effects.state.conversations.find(c => c.id === command.conversationId)?.archived// A task's finished steps archive with it (steps.ts endSteps): their deliveries end too (final review, finding 2).const archivedSteps = unreadable && command.type !== 'conversation.agent' ? effects.state.conversations.filter(c => c.reviewOf === command.conversationId- && c.step && c.archived && !original.conversations.find(o => o.id === c.id)?.archived).map(c => c.id) : []+ && c.archived && !original.conversations.find(o => o.id === c.id)?.archived).map(c => c.id) : []// One plain match per conversation: an `in` on this hot collection is sent as $expr, which no index bounds (hotFilters).for (const conversationId of unreadable ? [command.conversationId, ...archivedSteps] : []) {await tx.superTabDelivery.updateMany({ where: { tabId, conversationId, status: { in: ['queued', 'claimed', 'uncertain'] },diff --git a/backend/src/superTabs/sweeps.ts b/backend/src/superTabs/sweeps.tsindex 19d94c840..5d4d2700e 100644--- a/backend/src/superTabs/sweeps.ts+++ b/backend/src/superTabs/sweeps.ts@@ -106,7 +106,7 @@ async function sleepQuietGroups(db: PrismaClient, now: number): Promise<number>if (!group.archived && !quiet) continueif ((await leadsOf(row.tabId)).has(group.id)) continue// A step sleeps with its task (task steps design): read once per task in this pass.- if (group.step && group.reviewOf && !stepSleeps(await taskOf(row.tabId, group.reviewOf))) continue+ if (group.reviewOf && !stepSleeps(await taskOf(row.tabId, group.reviewOf))) continueconst reports = group.audience ? null : await progressOf(row.tabId, group.projectId ?? 'lead')if (reports && (group.reportSeq ?? 0) > (reports.summarized[group.id] ?? reports.summarizedFloor)) continueif (await guarded(db, { tabId: row.tabId, op: 'update', kind: 'group', key: row.key, seen: row.version, data: { ...group, dormant: true } })) slept++diff --git a/cli/src/lib/swarmTools.spec.ts b/cli/src/lib/swarmTools.spec.tsindex 4638c2853..fa546718b 100644--- a/cli/src/lib/swarmTools.spec.ts+++ b/cli/src/lib/swarmTools.spec.ts@@ -25,9 +25,9 @@ describe('SWARM_TOOLS_SKILL', () => {expect(SWARM_TOOLS_SKILL).toContain(CHEAP_FIRST_HELP)expect(SWARM_TOOLS_SKILL).not.toContain('leaves out only')})- it('has the reviewing agent named with --to, since a review status tells only the group\'s coordinator', () => {+ it('has the reviewing agent named with --to, since a review status wakes nobody by itself', () => {expect(SWARM_TOOLS_SKILL).not.toContain('so it is told when that work is ready for review')- expect(lineOf('`reviewOf` naming')).toMatch(/--to/)+ expect(lineOf('is a step of that task')).toMatch(/--to/)})it('tells an older Swarm\'s answer from a passing failure, and a stale save from one that hands text back', () => {expect(lineOf('INSTRUCTIONS_UNAVAILABLE')).toMatch(/no project instructions yet/)@@ -61,4 +61,9 @@ describe('SWARM_TOOLS_SKILL', () => {const line = SWARM_TOOLS_SKILL.split('\n').find(l => l.startsWith('- Add a step to a task:'))!expect(line).not.toContain('A review group')})+ // Ken, 2026-11-02: every linked task is a step, named or not.+ it('says any group linked by reviewOf is a step of that task', () => {+ expect(SWARM_TOOLS_SKILL).toContain('Any group created with \`reviewOf\` is a step of that task')+ expect(SWARM_TOOLS_SKILL).not.toContain('A review group is a group created with')+ })})diff --git a/cli/src/lib/swarmTools.ts b/cli/src/lib/swarmTools.tsindex 35e3abea2..ccfe48b68 100644--- a/cli/src/lib/swarmTools.ts+++ b/cli/src/lib/swarmTools.ts@@ -99,7 +99,7 @@ Swarm and machine settings (each refused unless you may change that setting; a p- A start that fails is reported (\`START_FAILED\`, with why) and moved nowhere: you decide what next, and the project's coordinator is told too.- Starts can be refused when too many starts are pending.- Add a step to a task: create a conversation with \`reviewOf\` set to the task and \`step\` set to the step's name from your project's instructions, then assign it. A step's status reaches the task's assignee.-- A review group is a group created with \`reviewOf\` naming the group it reviews. A \`review\` status wakes nobody by itself: when the work is ready for review, name the reviewing agent with \`--to\` in your post.+- Any group created with \`reviewOf\` is a step of that task, with or without a \`step\` name: its status and its posts that name no one reach the task's assignee. A \`review\` status wakes nobody by itself: when the work is ready for review, name the reviewing agent with \`--to\` in your post.## Requests, tasks and cards- A group opened for a person's request, asked in the chat or proposed by their Buddy, names them as requester (\`requesterId\`, or \`conversation.requester\` later). It records only that they asked, never what they wrote.diff --git a/cli/src/superTabs/agentContext.spec.ts b/cli/src/superTabs/agentContext.spec.tsindex d1c430056..87dbaed54 100644--- a/cli/src/superTabs/agentContext.spec.ts+++ b/cli/src/superTabs/agentContext.spec.ts@@ -44,12 +44,12 @@ describe('mine', () => {expect(mineText(state, changed({}), 'dev1', NOW)).toBe('No task is assigned to you.')})- it('lists linked tasks of its work with their assignee', () => {+ it('lists the steps of its work with their assignee', () => {const state = swarm([task('g12', 12, 'Fix login', 'dev1', 'working'),task('g13', 13, 'Review: Fix login', 'rev1', 'working', { reviewOf: 'g12' })])- expect(mineText(state, changed({}), 'dev1', NOW)).toContain('\n linked: #13 Review: Fix login (conversation g13) — Rev1, working')- // The Reviewer sees the task its work is linked to, either way.- expect(mineText(state, changed({}), 'rev1', NOW)).toContain('\n linked: #12 Fix login (conversation g12) — Dev1, working')+ expect(mineText(state, changed({}), 'dev1', NOW)).toContain('\n steps: Review: Fix login (Rev1): working')+ // The Reviewer sees its step by the task it belongs to.+ expect(mineText(state, changed({}), 'rev1', NOW)).toBe('#12 Fix login · Review: Fix login (conversation g13) — working')})it('the coordinator\'s mine lists its project\'s open tasks and counts them', () => {@@ -62,7 +62,9 @@ describe('mine', () => {expect(text).toContain('#14 Docs (conversation g14) — unassigned')expect(text).not.toContain('#15')expect(text).not.toContain('Web work')- expect(text.endsWith('3 open tasks.')).toBe(true)+ // g12 and g14; g16 is a step of g12, shown under it.+ expect(text).toContain(' steps: Review (Rev1): review')+ expect(text.endsWith('2 open tasks.')).toBe(true)})it('with nothing says so', () => {@@ -108,7 +110,7 @@ describe('task', () => {'- gone, lost, 2026-11-01 09:00 UTC: Stalled','- Dev1, stopped, 2026-10-31 09:00 UTC',])- expect(text).toContain('- #13 Review: Fix login (conversation g13) — Rev1, working')+ expect(text).toContain('Steps:\n- Review: Fix login (Rev1): working (conversation g13)')expect(text).toContain('messages g12')expect(text).toContain('messages g12 --thread ROOT')})@@ -187,3 +189,23 @@ describe('the default project', () => {expect(mineText(state, changed({}), 'pm', NOW)).toBe('#1 Fix login (conversation g1) — Dev1, review\n1 open task.')})})++// E2E 2026-11-02: after the PM stopped the Engineer, task GROUP printed its raw id where it had said "Engineer".+describe('a stopped agent', () => {+ it('task names it from the names it was given', () => {+ const group = task('g1', 1, 'Fix', 'gone', 'done', { checks: [{ id: 'c', description: 'Tests pass', independent: false, evidence: 'ok', passedBy: 'agent:gone' }] })+ const text = taskText(group, swarm([group]), [], changed({}), NOW, new Map([['gone', 'Avery']]))+ expect(text).toContain('Assignee: Avery')+ expect(text).toContain('✓ Tests pass — by Avery')+ })+})++// Ken, 2026-11-02: every linked task is a step, named or not (backend steps.ts isStep).+describe('a linked task with no step name', () => {+ it('is a step named by its title', () => {+ const state = swarm([task('g12', 12, 'Fix login', 'dev1', 'working'),+ task('g13', 13, 'Test: PR #7', 'rev1', 'working', { reviewOf: 'g12' })])+ expect(mineText(state, changed({}), 'dev1', NOW)).toBe('#12 Fix login (conversation g12) — working\n steps: Test: PR #7 (Rev1): working')+ expect(mineText(state, changed({}), 'rev1', NOW)).toBe('#12 Fix login · Test: PR #7 (conversation g13) — working')+ })+})diff --git a/cli/src/superTabs/agentContext.ts b/cli/src/superTabs/agentContext.tsindex b25e7d08c..0d6334438 100644--- a/cli/src/superTabs/agentContext.ts+++ b/cli/src/superTabs/agentContext.ts@@ -39,7 +39,10 @@ const isOpen = (group: Json): boolean => {const leadConversations = (state: Json): string[] =>Array.isArray(state.projects) ? list(state.projects).map(p => String(p.leadConversationId)) : ['lead']/** A step of a task (task steps design): a linked group with a name; an older linked group has none. */-export const isStep = (group: Json): boolean => typeof group.step === 'string' && group.step !== '' && typeof group.reviewOf === 'string'+export const isStep = (group: Json): boolean => typeof group.reviewOf === 'string'+/** A step's name: the one it was opened with, else its title (a linked task opened without one is a step too, Ken+ * 2026-11-02; backend steps.ts stepName). */+export const stepName = (group: Json): string => text(group.step) ?? String(group.title ?? '')/** Work an agent may hold: a group of a project that is not its Lead conversation, a Buddy chat or any other kind. */const isWork = (state: Json, group: Json): boolean => !group.kind && !leadConversations(state).includes(String(group.id))/** A task: work that is not a step. */@@ -63,7 +66,7 @@ function lineOf(state: Json, group: Json): TaskLine {status: text(assignment.status) ?? 'unassigned', agentName: agentName(state, assignment.agentId),updatedAt: null, result: text(assignment.result),pullRequestUrls: Array.isArray(group.pullRequestUrls) ? group.pullRequestUrls.filter((u): u is string => typeof u === 'string') : [],- step: text(group.step), taskId: text(group.reviewOf),+ step: isStep(group) ? stepName(group) : null, taskId: text(group.reviewOf),}}@@ -172,9 +175,21 @@ function attemptLine(state: Json, attempt: Json, current: boolean): string {+ (result ? `: ${firstLine(result, RESULT_MAX)}` : '')}+/** The agent ids [group] and [attempts] name that the Swarm read does not list: agents stopped since. */+export function unknownAgents(group: Json, state: Json, attempts: Json[] | null): string[] {+ const listed = new Set(list(state.agents).map(a => a.id))+ const ids = [object(group.assignment).agentId, ...(attempts ?? []).map(a => a.agentId),+ ...list(group.checks).map(c => typeof c.passedBy === 'string' && c.passedBy.startsWith('agent:') ? c.passedBy.slice(6) : null)]+ return [...new Set(ids.filter((id): id is string => typeof id === 'string' && !listed.has(id)))]+}+/** One task: what it is, its checks, its attempts (the current one, then [attempts] as the backend's attempts read gives* them, newest first; null when that read failed), its linked tasks and how to read its conversation. */-export function taskText(asked: Json, state: Json, attempts: Json[] | null, groupChangedAt: ReadonlyMap<string, number>, now: number): string {+export function taskText(asked: Json, read: Json, attempts: Json[] | null, groupChangedAt: ReadonlyMap<string, number>, now: number,+ knownNames: ReadonlyMap<string, string> = new Map()): string {+ // An agent stopped since is no longer in the Swarm read: [knownNames] names it (E2E 2026-11-02: a raw id was printed).+ const listed = new Set(list(read.agents).map(a => a.id))+ const state: Json = { ...read, agents: [...list(read.agents), ...[...knownNames].filter(([id]) => !listed.has(id)).map(([id, name]) => ({ id, name }))] }// A step is read as its task, with the step marked (task steps design); a step whose task is not in the read reads alone.const owning = isStep(asked) ? list(state.conversations).find(c => c.id === asked.reviewOf) : undefinedconst group = owning ?? askeddiff --git a/cli/src/superTabs/assignmentIds.spec.ts b/cli/src/superTabs/assignmentIds.spec.tsindex e8d168529..2a62e6a17 100644--- a/cli/src/superTabs/assignmentIds.spec.ts+++ b/cli/src/superTabs/assignmentIds.spec.ts@@ -24,6 +24,15 @@ describe('assignment ids', () => {.toMatchObject({ assignmentId: '58c2d5f2bdc100771bc57de7' })})+ // E2E 2026-11-02: a Reviewer holding a step could not record its verdict on the task's checks ("another agent's"), so the+ // Engineer passed its own review check. The backend lets anyone in the task record one; only a status is the holder's.+ it('fills "current" for another agent\'s check on the task, never its status', () => {+ expect(withCurrentAssignment({ type: 'work.check', conversationId: 'g1', assignmentId: 'current', checkId: 'c', passed: true }, state, 'reviewer'))+ .toMatchObject({ assignmentId: '58c2d5f2bdc100771bc57de7' })+ const check = { type: 'work.check', conversationId: 'g1', assignmentId: 'stale', checkId: 'c', passed: true }+ expect(staleAssignmentHint(check, state, 'reviewer')).toMatch(/is 58c2d5f2bdc100771bc57de7/)+ })+it('leaves an explicit id, another command, or a group with no task as sent', () => {const named = { type: 'work.status', conversationId: 'g1', assignmentId: '9887f5667a24ace0b589b7ff' }expect(wantsCurrent(named)).toBe(false)diff --git a/cli/src/superTabs/assignmentIds.ts b/cli/src/superTabs/assignmentIds.tsindex 6d6062f9f..2e676fb14 100644--- a/cli/src/superTabs/assignmentIds.ts+++ b/cli/src/superTabs/assignmentIds.ts@@ -12,9 +12,13 @@ import { ENDED_WORK } from './wire.js'type Json = Record<string, unknown>const object = (value: unknown): Json => value && typeof value === 'object' && !Array.isArray(value) ? value as Json : {}-/** The commands that name an assignment, and those an agent sends only for its own task. */+/** The commands that name an assignment; those that name the agent's own task's group when sent with none; and the one an+ * agent sends only for its own task. A check is anyone's in the task to record (backend commands.ts work.check): a+ * Reviewer holding a step records its verdict on the task's checks (E2E 2026-11-02: refused here, so the Engineer passed+ * its own review check). */export const ASSIGNMENT_COMMANDS: ReadonlySet<string> = new Set(['work.status', 'work.check', 'work.cancel', 'work.resume'])const OWN_TASK: ReadonlySet<string> = new Set(['work.status', 'work.check'])+const HOLDER_ONLY: ReadonlySet<string> = new Set(['work.status'])const CURRENT = 'current'/** The group's active assignment in a Swarm's state (its old shape, as the daemon reassembles it), or null. */@@ -50,7 +54,7 @@ export function withCurrentAssignment(command: Json, state: unknown, agentId: stconst group = OWN_TASK.has(String(command.type)) && !command.conversationId ? ownGroup(state, agentId) : nullif (group) command = { ...command, conversationId: group }const current = currentAssignment(state, command.conversationId)- if (!current || (OWN_TASK.has(String(command.type)) && current.agentId !== agentId)) return command+ if (!current || (HOLDER_ONLY.has(String(command.type)) && current.agentId !== agentId)) return commandreturn { ...command, assignmentId: current.id }}@@ -58,6 +62,6 @@ export function withCurrentAssignment(command: Json, state: unknown, agentId: stexport function staleAssignmentHint(command: Json, state: unknown, agentId: string): string {const current = currentAssignment(state, command.conversationId)if (!current) return 'This group has no active assignment now.'- if (OWN_TASK.has(String(command.type)) && current.agentId !== agentId) return 'This group\'s active assignment is another agent\'s, not yours.'+ if (HOLDER_ONLY.has(String(command.type)) && current.agentId !== agentId) return 'This group\'s active assignment is another agent\'s, not yours.'return `This group's active assignment is ${current.id}: send it again with "assignmentId": "${current.id}" (or "current").`}diff --git a/cli/src/superTabs/deliveryContext.spec.ts b/cli/src/superTabs/deliveryContext.spec.tsindex a8c6de27a..6d9962530 100644--- a/cli/src/superTabs/deliveryContext.spec.ts+++ b/cli/src/superTabs/deliveryContext.spec.ts@@ -19,9 +19,6 @@ describe('placeLine', () => {it('names a task by its number and title', () => {expect(placeLine(state, 'g12')).toBe('In task #12 "Fix login" (conversation g12).')})- it('names a linked task by its title', () => {- expect(placeLine(state, 'g13')).toBe('In "Review: Fix login" (conversation g13).')- })it('names the project chat', () => {expect(placeLine(state, 'lead-app')).toBe('In the project chat of App (conversation lead-app).')})@@ -43,7 +40,8 @@ describe('workLine', () => {expect(workLine(many, 'dev1')).toBe('You are assigned task #12 "Fix login" (working), task #14 "Docs" (review) and task #20 "T20" (working). And 2 more: mine.')})it('gives the coordinator its project\'s open tasks', () => {- expect(workLine(state, 'pm')).toBe('Open tasks in your project: 3; mine lists them.')+ // g12 and g14: the linked g13 is a step of g12, not a task of its own.+ expect(workLine(state, 'pm')).toBe('Open tasks in your project: 2; mine lists them.')})it('says nothing for an agent with none', () => {expect(workLine(state, 'nobody')).toBeNull()@@ -77,3 +75,9 @@ describe('steps', () => {expect(workLine(stepped, 'rev')).toBe('You are assigned task #12 "Fix login", step "Thiết kế \\"v2\\"" (working).')})})++describe('a linked task with no step name', () => {+ it('is said as its task and its title', () => {+ expect(placeLine(state, 'g13')).toBe('In task #12 "Fix login", step "Review: Fix login" (conversation g13).')+ })+})diff --git a/cli/src/superTabs/deliveryContext.ts b/cli/src/superTabs/deliveryContext.tsindex ac0a6e57a..3f0b03993 100644--- a/cli/src/superTabs/deliveryContext.ts+++ b/cli/src/superTabs/deliveryContext.ts@@ -4,7 +4,7 @@* conversation id, so agents and the PM lost track of which task a message was about and who else had answered in its* thread. Each line is left out when it does not apply or cannot be read; the delivery always goes.*/-import { isCoordinator, isStep, openWorkOf, projectOpenWork } from './agentContext.js'+import { isCoordinator, isStep, openWorkOf, projectOpenWork, stepName } from './agentContext.js'type Json = Record<string, unknown>const object = (value: unknown): Json => value && typeof value === 'object' && !Array.isArray(value) ? value as Json : {}@@ -28,7 +28,7 @@ export function placeLine(state: Json, groupId: string): string {const title = JSON.stringify(String(group.title ?? ''))// A step is said as its task and its name (task steps design).const task = isStep(group) ? list(state.conversations).find(c => c.id === group.reviewOf) : undefined- if (task) return `In ${taskWords(task)}, step ${JSON.stringify(String(group.step))} ${at}`+ if (task) return `In ${taskWords(task)}, step ${JSON.stringify(stepName(group))} ${at}`if (group.reviewOf || typeof group.number !== 'number') return `In ${title} ${at}`return `In ${taskWords(group)} ${at}`}diff --git a/cli/src/superTabs/service.spec.ts b/cli/src/superTabs/service.spec.tsindex edb57e05a..972164dc3 100644--- a/cli/src/superTabs/service.spec.ts+++ b/cli/src/superTabs/service.spec.ts@@ -1539,6 +1539,17 @@ describe('mine and task', () => {expect(answer.value.text.split('\n')[0]).toBe('#9 Old fix (conversation g9)')expect(answer.value.text).toContain('- Dev1, done (current): Merged')})+ it('task names a stopped assignee from the task\'s messages', async () => {+ const t = setup()+ const group = { id: 'g9', number: 9, title: 'Fix', archived: false, checks: [], assignment: { agentId: 'gone', status: 'done', result: null } }+ withState(t, [group])+ const answer = vi.mocked(t.core.account.backend).getMockImplementation()!+ vi.mocked(t.core.account.backend).mockImplementation(async (method, path, body) => path.includes('/conversations/g9/messages')+ ? ok({ messages: [{ id: 'm', conversationId: 'g9', author: { kind: 'agent', id: 'gone', name: 'Avery' }, text: 'Done' }], next: null }) as never+ : answer(method, path, body))+ const result = await t.ask({ action: 'task', tabId: 'tab', harnessId: 'native', conversationId: 'g9' }, owner) as { value: { text: string } }+ expect(result.value.text).toContain('Assignee: Avery')+ })it('task of a group it cannot read answers NOT_FOUND', async () => {const t = setup()withState(t, [], () => ({ status: 404, body: { success: false, error: { code: 'NOT_FOUND', message: 'This conversation is unavailable.' } } }))@@ -1562,8 +1573,9 @@ describe('status with steps', () => {data: swarmData(t.agent, path, { agents: [t.agent], conversations }) } }) as never)const answer = await t.ask({ action: 'status', tabId: 'tab', harnessId: 'native' }, owner) as { value: { state: { conversations: Array<Record<string, unknown>> } } }const rows = answer.value.state.conversations- expect(rows.map(c => c.id)).toEqual(['g1835', 'g9'])- expect((rows[0]!.steps as Array<Record<string, unknown>>).map(s => s.id)).toEqual(['g1918'])+ // Every linked group is a step, named or not (Ken, 2026-11-02).+ expect(rows.map(c => c.id)).toEqual(['g1835'])+ expect((rows[0]!.steps as Array<Record<string, unknown>>).map(s => s.id)).toEqual(['g1918', 'g9'])})})diff --git a/cli/src/superTabs/service.ts b/cli/src/superTabs/service.tsindex 5b0316d92..af7b32022 100644--- a/cli/src/superTabs/service.ts+++ b/cli/src/superTabs/service.ts@@ -10,7 +10,7 @@ import { backend, swarmRoleFor, hostJournalFile, identifier, object, SuperTabHosimport { HostFeed } from './hostFeed.js'import { SwarmReads, type SwarmRead } from './swarmReads.js'import { within } from './wire.js'-import { isCoordinator, isStep, mineText, taskText } from './agentContext.js'+import { isCoordinator, isStep, mineText, taskText, unknownAgents } from './agentContext.js'import { machineChoices } from '../lib/newCommand.js'import { wireRole } from '../lib/swarmSkills.js'import { START_REQUIREMENTS } from './capacity.js'@@ -661,7 +661,17 @@ export function superTabService(core: CoreApi, options: SuperTabServiceOptions =const group = active ?? await readGroupAsAgent(core, path, id, identity)if (!group) return { error: 'NOT_FOUND', detail: 'No such task, or this agent cannot read it.', status: 404 }const tried = await within(backend(core, 'GET', `${path}/conversations/${encodeURIComponent(id)}/attempts?${identity}`))- return { ok: true, value: { text: taskText(group, read.state, Array.isArray(tried) ? list(tried) : null, read.groupChangedAt, Date.now()) } }+ const attempts = Array.isArray(tried) ? list(tried) : null+ // An agent stopped since is named as it signed its rows in the task's chat: one read, only when one is unknown.+ const names = new Map<string, string>()+ if (unknownAgents(group, read.state, attempts).length) {+ const page = await within(backend(core, 'GET', `${path}/conversations/${encodeURIComponent(id)}/messages?${identity}`))+ for (const row of list(object(page).messages)) {+ const author = object(row.author)+ if (author.kind === 'agent' && typeof author.id === 'string' && typeof author.name === 'string') names.set(author.id, author.name)+ }+ }+ return { ok: true, value: { text: taskText(group, read.state, attempts, read.groupChangedAt, Date.now(), names) } }}// The jobs running and waiting on a project's GitHub Actions, counts only, for the route's machine-fit plug-in// (machineFit.ts; backend github/ciLoad.ts). The server reads it through its GitHub App, never this machine's login.diff --git a/desktop/lib/super_tabs/controller.dart b/desktop/lib/super_tabs/controller.dartindex b0912c388..c6adff114 100644--- a/desktop/lib/super_tabs/controller.dart+++ b/desktop/lib/super_tabs/controller.dart@@ -1770,7 +1770,9 @@ class SuperTabController extends ChangeNotifier {/// The name of the step [message] was written in; null for a task's own.String? stepNameOf(SuperTabMessage message) {final group = snapshot?.conversation(message.conversationId);- return group != null && superTabIsStep(group) ? group.step : null;+ return group != null && superTabIsStep(group)+ ? superTabStepName(group)+ : null;}/// [group]'s linked tasks with their checks' results ([superTabLinkedLine]);diff --git a/desktop/lib/super_tabs/linked_tasks.dart b/desktop/lib/super_tabs/linked_tasks.dartindex b8e8075fd..d3d13275e 100644--- a/desktop/lib/super_tabs/linked_tasks.dart+++ b/desktop/lib/super_tabs/linked_tasks.dart@@ -35,9 +35,13 @@ String? superTabLinkedLine(}/// Whether [conversation] is a step of a task (task steps design): shown on-/// its task's row and inside its task, never as a task of its own.+/// its task's row and inside its task, never as a task of its own. Every+/// linked task is one, named or not (Ken, 2026-11-02; backend steps.ts).bool superTabIsStep(SuperTabConversation conversation) =>- conversation.step != null && conversation.reviewOf != null;+ conversation.reviewOf != null;++/// A step's name: the one it was opened with, else its title.+String superTabStepName(SuperTabConversation step) => step.step ?? step.title;/// [groups] as the project's list shows them: without steps, which sit on/// their task's row (task steps design).@@ -54,7 +58,9 @@ String _stepLabel(SuperTabSnapshot snapshot, SuperTabConversation step) {final name = agentId is String && snapshot.agent(agentId) != null? snapshot.agentName(agentId): null;- return name == null ? step.step! : '${step.step} ($name)';+ return name == null+ ? superTabStepName(step)+ : '${superTabStepName(step)} ($name)';}/// A linked task's state: its work's status while it has no checks; else adiff --git a/desktop/test/super_tab_live_card_test.dart b/desktop/test/super_tab_live_card_test.dartindex ae0884eb4..73f09419e 100644--- a/desktop/test/super_tab_live_card_test.dart+++ b/desktop/test/super_tab_live_card_test.dart@@ -159,7 +159,7 @@ void main() {expect(find.text('app · PR #7'), findsOneWidget);expect(find.text('Open'), findsOneWidget);expect(find.text('12 checks passed'), findsOneWidget);- expect(find.text('#14 Review avatars: passed'), findsOneWidget);+ expect(find.text('Review avatars: passed'), findsOneWidget);// The reviewer's `Ready: yes` in the chat is not read.expect(find.textContaining('Reviewer: '), findsNothing);});@@ -198,7 +198,7 @@ void main() {expect(find.text('Working'), findsOneWidget);expect(find.text('1 of 2 checks passed'), findsOneWidget);expect(find.text('Round avatars'), findsOneWidget);- expect(find.text('#14 Review avatars: passed'), findsOneWidget);+ expect(find.text('Review avatars: passed'), findsOneWidget);expect(find.textContaining('Reviewer: '), findsNothing);});@@ -389,7 +389,7 @@ void main() {final facts = SuperTabPullRequestFacts(null);addTearDown(facts.dispose);await show(tester, server, facts, 'message-1');- expect(find.text('#13 Review: Avatars: done'), findsOneWidget);+ expect(find.text('Review: Avatars (Ivy): done'), findsOneWidget);expect(find.textContaining('050bab807'), findsNothing);},);diff --git a/desktop/test/super_tab_review_test.dart b/desktop/test/super_tab_review_test.dartindex af32902d6..db956c513 100644--- a/desktop/test/super_tab_review_test.dart+++ b/desktop/test/super_tab_review_test.dart@@ -78,7 +78,8 @@ final reviewAndTest = [},];-const mockup = '#14 Review PR 12: passed · #15 Test PR 12: 1 check failed';+// Every linked task is a step, named by its title (Ken, 2026-11-02).+const mockup = 'Review PR 12: passed · Test PR 12: 1 check failed';Future<void> showView(WidgetTester tester, ConversationServer server) async {final controller = server.controller();@@ -184,8 +185,8 @@ void main() {final snapshot = SuperTabSnapshot.fromJson(server.state);expect(superTabLinkedLine(snapshot, snapshot.conversation('offline')!),- '#20 Not begun: not started · #21 Under way: needs human · '- '#22 Some passed: 1 of 3 checks passed · #23 Two failed: 2 checks failed',+ 'Not begun: not started · Under way (Nova): needs human · '+ 'Some passed: 1 of 3 checks passed · Two failed: 2 checks failed',);expect(superTabLinkedLine(snapshot, snapshot.conversation('a')!), isNull);});@@ -288,10 +289,11 @@ void main() {final snapshot = SuperTabSnapshot.fromJson(server.state);expect(snapshot.conversation('copy')!.step, 'Copy');expect(superTabIsStep(snapshot.conversation('copy')!), isTrue);- expect(superTabIsStep(snapshot.conversation('old')!), isFalse);+ // Named or not, a linked task is a step (Ken, 2026-11-02).+ expect(superTabIsStep(snapshot.conversation('old')!), isTrue);expect(superTabLinkedLine(snapshot, snapshot.conversation('offline')!),- '#20 Review PR 12: not started · Copy (Atlas): done · '+ 'Review PR 12: not started · Copy (Atlas): done · ''Thiết kế "v2" (Nova): working',);});@@ -314,7 +316,8 @@ void main() {);final snapshot = SuperTabSnapshot.fromJson(server.state);final listed = superTabListedWork(snapshot.conversations).map((g) => g.id);- expect(listed, contains('old'));+ // A linked task opened without a step name is a step too (Ken, 2026-11-02).+ expect(listed, isNot(contains('old')));expect(listed, isNot(contains('copy')));});@@ -456,4 +459,28 @@ void main() {lessThan(tester.getTopLeft(find.textContaining('Line 5')).dy),);});++ // Ken, 2026-11-02: every linked task is a step, named or not.+ test('a linked task with no step name is a step, named by its title', () {+ final server = groupServer(+ linked: [+ {+ ...conversationFixture('old', 'Test: PR #2514'),+ 'number': 20,+ 'reviewOf': 'offline',+ 'assignment': {'id': 'w', 'agentId': 'reviewer', 'status': 'working'},+ },+ ],+ );+ final snapshot = SuperTabSnapshot.fromJson(server.state);+ expect(superTabIsStep(snapshot.conversation('old')!), isTrue);+ expect(+ superTabListedWork(snapshot.conversations).map((g) => g.id),+ isNot(contains('old')),+ );+ expect(+ superTabLinkedLine(snapshot, snapshot.conversation('offline')!),+ 'Test: PR #2514 (Nova): working',+ );+ });}diff --git a/desktop/test/super_tab_task_steps_test.dart b/desktop/test/super_tab_task_steps_test.dartindex 45276203c..950c74644 100644--- a/desktop/test/super_tab_task_steps_test.dart+++ b/desktop/test/super_tab_task_steps_test.dart@@ -76,7 +76,8 @@ void main() {snapshot,snapshot.conversation('offline')!,).map((g) => g.id),- ['s1', 's2'],+ // The unnamed linked 'old' (#20) is a step too, first by number.+ ['old', 's1', 's2'],);});diff --git a/docs/swarms.md b/docs/swarms.mdindex d51be9a85..44e62e9e5 100644--- a/docs/swarms.md+++ b/docs/swarms.md@@ -1137,8 +1137,11 @@ lease, attempts, costs and checks; readers show it inside its task.merge their messages into the task's chat with the step's name beside theauthor. The CLI sends `step` only to a backend whose first load says`steps: true`; elsewhere a step opens as a plain linked task.-- **Older linked tasks** (no `step`) keep their own number, row, chat and- notices.+- **Every linked task is a step**, named or not (Ken, 2026-11-02: a PM opened+ "Test: PR #2514" the old way a minute after saving the steps workflow, and the+ Tester's posts reached it). One opened without `step` is named by its title.+ A row written before this keeps the archive mark it had until it is written+ again.## A message that is not getting indiff --git a/mobile/lib/swarm/linked_tasks.dart b/mobile/lib/swarm/linked_tasks.dartindex b8e8075fd..d3d13275e 100644--- a/mobile/lib/swarm/linked_tasks.dart+++ b/mobile/lib/swarm/linked_tasks.dart@@ -35,9 +35,13 @@ String? superTabLinkedLine(}/// Whether [conversation] is a step of a task (task steps design): shown on-/// its task's row and inside its task, never as a task of its own.+/// its task's row and inside its task, never as a task of its own. Every+/// linked task is one, named or not (Ken, 2026-11-02; backend steps.ts).bool superTabIsStep(SuperTabConversation conversation) =>- conversation.step != null && conversation.reviewOf != null;+ conversation.reviewOf != null;++/// A step's name: the one it was opened with, else its title.+String superTabStepName(SuperTabConversation step) => step.step ?? step.title;/// [groups] as the project's list shows them: without steps, which sit on/// their task's row (task steps design).@@ -54,7 +58,9 @@ String _stepLabel(SuperTabSnapshot snapshot, SuperTabConversation step) {final name = agentId is String && snapshot.agent(agentId) != null? snapshot.agentName(agentId): null;- return name == null ? step.step! : '${step.step} ($name)';+ return name == null+ ? superTabStepName(step)+ : '${superTabStepName(step)} ($name)';}/// A linked task's state: its work's status while it has no checks; else adiff --git a/mobile/lib/swarm/swarm_conversation_page.dart b/mobile/lib/swarm/swarm_conversation_page.dartindex 63cd7964a..4655cd921 100644--- a/mobile/lib/swarm/swarm_conversation_page.dart+++ b/mobile/lib/swarm/swarm_conversation_page.dart@@ -29,7 +29,7 @@ import 'swarm_chat_menu.dart';import 'swarm_file_links.dart';import 'swarm_choices.dart';import 'swarm_conversation.dart';-import 'linked_tasks.dart' show superTabIsStep;+import 'linked_tasks.dart' show superTabIsStep, superTabStepName;import 'task_steps.dart';import 'swarm_face.dart';import 'swarm_file_picker.dart';@@ -1449,7 +1449,7 @@ class _SwarmConversationPageState extends State<SwarmConversationPage>// A step's row in its task's chat names its step (task steps design).final group = c.reader.snapshot?.conversation(m.conversationId);final name = group != null && superTabIsStep(group)- ? '$named · ${group.step}'+ ? '$named · ${superTabStepName(group)}': named;if (!swarmIsPmLine(c.reader, m)) return name;// The coordinator's own badge, whatever its role is called.diff --git a/mobile/test/swarm/swarm_live_card_test.dart b/mobile/test/swarm/swarm_live_card_test.dartindex 4d02aa22a..9f04193a2 100644--- a/mobile/test/swarm/swarm_live_card_test.dart+++ b/mobile/test/swarm/swarm_live_card_test.dart@@ -149,7 +149,7 @@ void main() {},};- const linkedLine = '#13 Review: Fix login: passed';+ const linkedLine = 'Review: Fix login (Ivy): passed';FakeSwarm backend({List<Map<String, dynamic>>? groups,diff --git a/mobile/test/swarm/swarm_task_steps_test.dart b/mobile/test/swarm/swarm_task_steps_test.dartindex 067a467e1..feb9405e9 100644--- a/mobile/test/swarm/swarm_task_steps_test.dart+++ b/mobile/test/swarm/swarm_task_steps_test.dart@@ -20,7 +20,7 @@ void main() {).state,);- test('the project list hides steps and keeps old linked tasks', () {+ test('the project list hides every linked task, named as a step or not', () {final snapshot = swarm([groupData('task',@@ -46,7 +46,7 @@ void main() {},]);final work = swarmProjectWork(snapshot, snapshot.projects.single);- expect(work.active.map((g) => g.id), containsAll(['task', 'old']));+ expect(work.active.map((g) => g.id), ['task']);expect([...work.active, ...work.older].map((g) => g.id),isNot(contains('step')),@@ -54,7 +54,7 @@ void main() {expect(superTabIsStep(snapshot.conversation('step')!), isTrue);expect(superTabLinkedLine(snapshot, snapshot.conversation('task')!),- '#9 Review PR 9: not started · Review (Dev): working',+ 'Review PR 9: not started · Review (Dev): working',);});}