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.

Merge batch 11-05 i2300: #3198 (#3225)

0xken15bec045be0187
diff --git a/backend/integration/superTabTeam.test.ts b/backend/integration/superTabTeam.test.ts
index 26951d07b..b22e5cbfb 100644
--- a/backend/integration/superTabTeam.test.ts
+++ b/backend/integration/superTabTeam.test.ts
@@ -242,6 +242,44 @@ describe('a task a Team agent worked on', () => {
expect((await storedState(tab)).conversations.find(c => c.id === clean)?.teamWritten).toBeUndefined()
await expect(assign()).resolves.toBeTruthy()
})
+
+ // #3304: a join marked Magnolia2's task before, and nothing cleared it. GitHub's clean read of every pull request it records does.
+ it('clears a stored mark from a join, on the task and its step, once GitHub reads every pull request the task records as clean', async () => {
+ const { tab } = await fixture()
+ const joined = await task(tab, 'Owner work'), main = await owners(tab, joined)
+ const state = await storedState(tab)
+ state.projects!.find(p => p.id === 'lead')!.repository = { machineId: 'owner-host', cwd: '/repo', repositoryUrl: 'https://github.com/acme/app' }
+ Object.assign(state.conversations.find(c => c.id === joined)!, { teamWritten: true, pullRequestUrls: ['https://github.com/acme/app/pull/3154'] })
+ await saveState(tab, state)
+ const review = await step(tab, joined)
+ expect((await storedState(tab)).conversations.find(c => c.id === review)?.teamWritten).toBe(true)
+ const read = vi.fn(async () => 'clean' as const)
+ const asked = new SuperTabStore(db, Date.now, undefined, { pushOrigin: read })
+ await expect(asked.execute(owner, tab, { operationId: randomUUID(), command: { type: 'work.assign', conversationId: review, agentId: main } })).resolves.toBeTruthy()
+ expect(read).toHaveBeenCalledWith('https://github.com/acme/app', ['https://github.com/acme/app/pull/3154'])
+ const stored = await storedState(tab)
+ expect(stored.conversations.find(c => c.id === joined)?.teamWritten).toBeUndefined()
+ expect(stored.conversations.find(c => c.id === review)?.teamWritten).toBeUndefined()
+ })
+
+ // Security review 2 of #3304: the reader reads only the project's own repository's pull requests, and answers clean for none.
+ it('keeps a stored mark when the clean read covered no pull request of the project\'s repository', async () => {
+ const { tab } = await fixture()
+ const joined = await task(tab, 'Owner work'), main = await owners(tab, joined)
+ const state = await storedState(tab)
+ state.projects!.find(p => p.id === 'lead')!.repository = { machineId: 'owner-host', cwd: '/repo', repositoryUrl: 'https://github.com/acme/app' }
+ state.conversations.find(c => c.id === joined)!.teamWritten = true
+ await saveState(tab, state)
+ const review = await step(tab, joined)
+ // Recorded as stored, under a name the project's repository no longer matches.
+ const later = await storedState(tab)
+ later.conversations.find(c => c.id === joined)!.pullRequestUrls = ['https://github.com/acme/old-app/pull/3154']
+ await saveState(tab, later)
+ const asked = new SuperTabStore(db, Date.now, undefined, { pushOrigin: async () => 'clean' })
+ await expect(asked.execute(owner, tab, { operationId: randomUUID(), command: { type: 'work.assign', conversationId: review, agentId: main } }))
+ .rejects.toMatchObject({ code: 'TEAM_WRITTEN_WORK' })
+ expect((await storedState(tab)).conversations.find(c => c.id === joined)?.teamWritten).toBe(true)
+ })
})
// Huy's groupme, 2026-11-05 (task #3266): a Team account start for a repository the Harness GitHub App is not on failed
diff --git a/backend/src/superTabs/commands.ts b/backend/src/superTabs/commands.ts
index d7a59a569..d17828b17 100644
--- a/backend/src/superTabs/commands.ts
+++ b/backend/src/superTabs/commands.ts
@@ -1,4 +1,4 @@
-import { applyPushOrigin, failPushUnknown, failTeamWritten, hasStep, mainAccountMembers, markTeamWritten, mayName, requireTeamWrittenAccount, requireTeamWrittenMachine, TEAM_WRITTEN_REASON, TEAM_WRITTEN_STOP, teamWrittenTask } from './teamWritten.js'
+import { applyPushOrigin, failPushUnknown, failTeamWritten, mainAccountMembers, markTeamWritten, mayName, requireTeamWrittenAccount, requireTeamWrittenMachine, stepMark, TEAM_WRITTEN_REASON, TEAM_WRITTEN_STOP, teamWrittenTask } from './teamWritten.js'
import type { PushOrigin } from '../github/pushOrigin.js'
import { requireRepositoryReach, unknownPushReason, type RepositoryReach } from './repositoryReach.js'
import { admitByRoom, admitMachineStart, noRepositoryStart, failOwnAccountTeamEntry, ownAccountTeamEntry, defaultProfileId, storedProfileId, BUDDY_WINDOWS_REFUSAL, refusesWindowsBuddy, buddyHomeFolder, buddyProjectsOn, SWARM_BUDDY_CAPABILITY, cleanupOverdue, dropIdleBuddyMachines, machineLimitReached, MACHINE_LIMIT_MESSAGE, NOT_SWARM_MACHINE, downSince, expireRemoval, expireRemovals, failTeamWork, machineContribution, machineOffline, machineSlots, contributedEngines, ownedMachine, productManagerOn, projectFolder, projectsOnMachine, requireTeamWork, teamMachineFor, teamAccountPool, teamPoolsOf, teamStartRequest, teamWorkCheck, movedToTeamAccount, type ContributedMachine } from './machines.js'
@@ -592,6 +592,8 @@ export interface CommandContext {
machineVersions?: Record<string, string>
/** Who pushed the pull requests of a work.assign's or a Ready for review's task, read before the command (store.ts pushOriginFor). */
pushOrigin?: PushOrigin
+ /** The pull requests [pushOrigin] read, as the store read them; none for a branch. A clean read clears only a mark it covered (teamWritten.ts). */
+ pushOriginPulls?: string[]
/** Whether the Harness GitHub App reaches the project's repository, read before an agent.start or work.assign (store.ts repositoryReachFor). */
repositoryReach?: RepositoryReach
/** The person's role in the Swarm's Workspace, read by the store for invitations (workspaces.ts); absent outside a Workspace. */
@@ -1025,11 +1027,8 @@ function applyCommandOnce(original: SuperTabState, actor: Actor, input: Command,
const member = agent(state, agentId)
requireTeamWork(state, member.machineId, member.contributorId, project, context.now, context.teamMachines, context.otherWorkspaceMachines)
// A named agent or a poster joins a task as an assignment would: Team-written code stays in a Team account (audit H2).
- if (group) {
- requireTeamWrittenAccount(state, group, member)
- // Joining a chat is not working on the task: a Team Reviewer or Tester with a step on it does not mark it (review 1 of #2559).
- if (!hasStep(state, group, member)) marking(group, () => markTeamWritten(state, group, member))
- }
+ // Joining a chat is not writing its code, so it marks nothing: a Team agent's push shows in GitHub's record (#3304).
+ if (group) requireTeamWrittenAccount(state, group, member)
}
/** Runs [mark], and tells every main-account member when it just marked [group]'s task: nothing else reaches a session
* that already has the branch, or a member the workflow would ask again (teamWritten.ts, audit H2). */
@@ -1045,7 +1044,7 @@ function applyCommandOnce(original: SuperTabState, actor: Actor, input: Command,
/** What GitHub's read says for an agent about to take [group]'s work (store.ts pushOriginFor): a bot's push marks the task and
* refuses the main account, and the store keeps that mark after this command is refused. Unknown refuses it unmarked. */
const pushedRefusal = (group: Conversation, worker: Agent) => {
- marking(group, () => applyPushOrigin(state, group, context.pushOrigin))
+ marking(group, () => applyPushOrigin(state, group, context.pushOrigin, context.pushOriginPulls))
if (onTeamAccount(state, worker) || ledProject(state, worker.id)?.id === groupProject(state, group).id) return
if (context.pushOrigin === 'unknown') failPushUnknown(unknownPushReason(context.repositoryReach))
if (context.pushOrigin === 'team') failTeamWritten({ pushed: true })
@@ -1060,7 +1059,6 @@ function applyCommandOnce(original: SuperTabState, actor: Actor, input: Command,
if (member.workDecision === 'stop') fail('STOP_REQUESTED', 'This agent is stopping. Wait for its execution host.')
requireTeamWork(state, member.machineId, member.contributorId, groupProject(state, group), context.now, context.teamMachines, context.otherWorkspaceMachines)
requireTeamWrittenAccount(state, group, member)
- marking(group, () => markTeamWritten(state, group, member))
}
/** The project chat is the people's and is never archived: its work, name and records are its coordinator's or a person's,
* as its members are (conversation.agent, joinsProject; security review L2). A task's are any agent's of its project. */
@@ -2297,8 +2295,8 @@ function applyCommandOnce(original: SuperTabState, actor: Actor, input: Command,
state.conversations.push({ id: operationId, ...(state.projects ? { projectId: project.id } : {}),
number, title: command.title, leadId, agentIds: [...leadId ? [leadId] : [], ...creator],
archived: false, brief, ...(command.task ? { task: command.task } : {}), ...(command.reviewOf ? { reviewOf: command.reviewOf } : {}),
- // A Team agent's own task is Team-written from its first line, and a step keeps its task's mark (teamWritten.ts, audit H2).
- ...((command.reviewOf ? teamWrittenTask(state, conversation(state, command.reviewOf)) : creator.some(id => onTeamAccount(state, agent(state, id)))) ? { teamWritten: true as const } : {}),
+ // A step keeps its task's mark (teamWritten.ts, audit H2). Opening a task writes none of its code (#3304).
+ ...(command.reviewOf ? stepMark(state, conversation(state, command.reviewOf)) : {}),
...(command.step ? { step: command.step } : {}),
...(prioritized ? { priority: command.priority ?? (proposal ? proposalPriority(proposalNamed(context.proposal)?.source?.priority) : DEFAULT_PRIORITY) } : {}),
assignment: null, lastMessageSequence: 0,
@@ -2575,7 +2573,7 @@ function applyCommandOnce(original: SuperTabState, actor: Actor, input: Command,
// that names no model runs its engine's own: role defaults live in the project's instructions now.
// So does a start for code a Team agent wrote, whoever's project it is, with its project settings off (audit H2).
const startGroup = conversation(state, command.request.conversationId)
- marking(startGroup, () => applyPushOrigin(state, startGroup, context.pushOrigin))
+ marking(startGroup, () => applyPushOrigin(state, startGroup, context.pushOrigin, context.pushOriginPulls))
const written = teamWrittenTask(state, startGroup)
// Named the Team account's entry itself, which its owner's choice keeps teammates' work off (task #3060). A branch GitHub
// cannot place runs only in a Team account (below), so it counts as Team-written here (security review 2 of #3081).
@@ -3280,7 +3278,6 @@ function applyCommandOnce(original: SuperTabState, actor: Actor, input: Command,
requireTeamWork(state, member.machineId, member.contributorId, groupProject(state, group), context.now, context.teamMachines, context.otherWorkspaceMachines)
pushedRefusal(group, member)
requireTeamWrittenAccount(state, group, member)
- marking(group, () => markTeamWritten(state, group, member))
if (!group.agentIds.includes(command.agentId)) group.agentIds.push(command.agentId)
// Added to a task, it is reused, as an assignment reuses a worker: its finished-work mark goes.
delete member.workDecision
@@ -3639,7 +3636,7 @@ function applyCommandOnce(original: SuperTabState, actor: Actor, input: Command,
// Only on the server's own read: a refused command rolled its mark back (store.ts execute), and no client's word marks a task.
if (context.pushOrigin !== 'team') fail('NOT_FOUND', 'This conversation is unavailable.', 404)
const group = open(state, command.conversationId)
- marking(group, () => applyPushOrigin(state, group, 'team'))
+ marking(group, () => applyPushOrigin(state, group, 'team', context.pushOriginPulls))
break
}
case 'work.assign': {
@@ -3749,7 +3746,7 @@ function applyCommandOnce(original: SuperTabState, actor: Actor, input: Command,
else effects.result.notAsked = `Not asked ${agentWrittenNameOf(state, person(state, personId).id)}: ${context.openDecisions} decisions you asked them are still open, and at most ${MAX_OPEN_DECISIONS} can be. Wait for answers before asking more.`
}
// A Team agent's push can land on any branch: its Ready reads who pushed (teamWritten.ts, audit H2).
- if (command.status === 'review') marking(group, () => applyPushOrigin(state, group, context.pushOrigin))
+ if (command.status === 'review') marking(group, () => applyPushOrigin(state, group, context.pushOrigin, context.pushOriginPulls))
const changed = assignment.status !== command.status || assignment.result !== command.result || !!command.ask, previous = assignment.status
const waited = waitingForReview(assignment)
assignment.status = command.status
diff --git a/backend/src/superTabs/model.ts b/backend/src/superTabs/model.ts
index 90465162d..aa2c27d5c 100644
--- a/backend/src/superTabs/model.ts
+++ b/backend/src/superTabs/model.ts
@@ -340,9 +340,13 @@ export interface Conversation {
task?: WorkTask
/** A review group names the group whose work it reviews; only a Reviewer is assigned it, and a Reviewer nothing else. */
reviewOf?: string
- /** A Harness Team agent worked on this task, or GitHub shows the app's bot pushed to its branch: its code runs only in a
- * Team account (teamWritten.ts, audit H2). Set once and never cleared. */
+ /** A Harness Team agent was assigned to build this task, or GitHub shows the app's bot pushed to its branch: its code runs
+ * only in a Team account (teamWritten.ts, audit H2). */
teamWritten?: true
+ /** What set [teamWritten] (#3304): `assigned` (a Team agent given the task) and `branch` (a bot's push on a branch a start
+ * named) are never cleared; `pushed` names the pull requests GitHub showed a bot's push among, and only a clean read of all
+ * of them clears it. Absent on a mark from before #3304, which a join may have set. */
+ teamWrittenBy?: { kind: 'assigned' | 'branch' } | { kind: 'pushed'; pulls: string[] }
/** A step of the task `reviewOf` names (task steps design, 2026-11-02): its name as the instructions give it, in any
* language. Readers show it inside its task, never as a task of its own. Absent on a linked group opened before steps. */
step?: string
diff --git a/backend/src/superTabs/parts/light.test.ts b/backend/src/superTabs/parts/light.test.ts
index 02a9b68b8..be606b6e9 100644
--- a/backend/src/superTabs/parts/light.test.ts
+++ b/backend/src/superTabs/parts/light.test.ts
@@ -13,7 +13,7 @@ const assignment: Required<Assignment> = {
}
const conversation: Required<Conversation> = {
id: 'g', kind: 'leads', projectId: 'p', number: 1, title: 't', leadId: null, agentIds: [], archived: false, brief: '',
- task: { goal: '', changes: '', constraints: '', owns: [] }, reviewOf: 'r', teamWritten: true, step: 'Review', reviewStamp: { assignmentId: 'w', handoff: 1 }, checks: [], assignment, lastMessageSequence: 0, lastMainSequence: 0, lastPersonSequence: 0, heardAt: 0, pullRequestUrls: [], pullRequestEvents: {}, cards: {},
+ task: { goal: '', changes: '', constraints: '', owns: [] }, reviewOf: 'r', teamWritten: true, teamWrittenBy: { kind: 'assigned' }, step: 'Review', reviewStamp: { assignmentId: 'w', handoff: 1 }, checks: [], assignment, lastMessageSequence: 0, lastMainSequence: 0, lastPersonSequence: 0, heardAt: 0, pullRequestUrls: [], pullRequestEvents: {}, cards: {},
messageSeq: 0, reportSeq: 0, dormant: false, lastActivityAt: '', audience: { people: [] }, lostAttempt: { id: 'w', agentId: 'a' }, reactionSeq: 0,
requesterId: 'p', ledger: {}, proposals: [], buddyName: 'Sparky', buddySessions: [], buddyDownTold: true, liveness: { state: 'quiet', why: 'silent', since: 1 }, leadAction: { kind: 'post', at: 1 },
stepUp: { attempt: 2, floor: 2, reason: 'r', at: 1, carry: '' }, queueRank: 1.5, notBefore: '2026-12-04', priority: 'P0',
diff --git a/backend/src/superTabs/parts/light.ts b/backend/src/superTabs/parts/light.ts
index 3b69a2873..0d125c0f5 100644
--- a/backend/src/superTabs/parts/light.ts
+++ b/backend/src/superTabs/parts/light.ts
@@ -27,7 +27,7 @@ export const GROUP_FIELDS = {
always: ['id', 'kind', 'projectId', 'leadId', 'agentIds', 'archived', 'audience', 'dormant', 'assignment.id', 'assignment.agentId', 'assignment.status',
'assignment.lost'],
whenRunning: ['title', 'task.owns', 'assignment.execution', 'assignment.result'],
- unread: ['number', 'brief', 'reviewOf', 'teamWritten', 'step', 'reviewStamp', 'checks', 'lastMessageSequence', 'lastMainSequence', 'lastPersonSequence', 'heardAt', 'pullRequestUrls', 'pullRequestEvents', 'cards', 'messageSeq', 'reportSeq', 'lastActivityAt', 'lostAttempt', 'requesterId', 'ledger', 'reactionSeq', 'proposals', 'buddyName', 'buddySessions', 'buddyDownTold', 'liveness', 'leadAction', 'stepUp', 'queueRank', 'notBefore', 'priority',
+ unread: ['number', 'brief', 'reviewOf', 'teamWritten', 'teamWrittenBy', 'step', 'reviewStamp', 'checks', 'lastMessageSequence', 'lastMainSequence', 'lastPersonSequence', 'heardAt', 'pullRequestUrls', 'pullRequestEvents', 'cards', 'messageSeq', 'reportSeq', 'lastActivityAt', 'lostAttempt', 'requesterId', 'ledger', 'reactionSeq', 'proposals', 'buddyName', 'buddySessions', 'buddyDownTold', 'liveness', 'leadAction', 'stepUp', 'queueRank', 'notBefore', 'priority',
'assignment.configuration', 'assignment.recordingProgress', 'assignment.leaseUntil', 'assignment.progressAt', 'assignment.askedOf', 'assignment.reviewFoundAt', 'assignment.changesRequestedAt', 'assignment.toldEngineerAt',
'assignment.handoffs', 'assignment.verdicts'],
} as const
diff --git a/backend/src/superTabs/store.ts b/backend/src/superTabs/store.ts
index 33a32631f..0dd974b2f 100644
--- a/backend/src/superTabs/store.ts
+++ b/backend/src/superTabs/store.ts
@@ -86,7 +86,7 @@ import { WORKSPACE_LABEL, workspaceCan, type WorkspaceRole } from './workspaces.
import { STATUS_LABELS,
activeWork, actorKey, agent, agentOnly, appendPullRequestUrls, author, conversation, createSuperTab, fail, person, stableId, visibleState, finishWorker,
SuperTabError, isLeads, knownKind, parkLaterConversations, type Actor, type Agent, type Assignment, type Author, type CommandEffects, type Conversation, type MessageDraft, type Person, type SuperTabState,
- pullRequestLinks,
+ projectPullRequestUrl, pullRequestLinks,
} from './model.js'
import { QUIET_CLAIM, type HoldReason } from './holdReason.js'
import { stuck } from './deliverySettle.js'
@@ -1487,9 +1487,10 @@ export class SuperTabStore {
/**
* Who pushed the pull requests of the task a work.assign or a Ready for review is about (github/pushOrigin.ts, audit H2).
* Read outside the command's transaction, as GitHub may take seconds, so it can only ever add a mark. Undefined when there is
- * nothing to read, or this reader cannot read that task: the command then refuses as it would.
+ * nothing to read, or this reader cannot read that task: the command then refuses as it would. `pulls` are the pull requests
+ * it read (none for a branch): a clean read clears only a mark it covered (teamWritten.ts applyPushOrigin, #3304).
*/
- private async pushOriginFor(user: AuthUser, tabId: string, command: unknown): Promise<PushOrigin | undefined> {
+ private async pushOriginFor(user: AuthUser, tabId: string, command: unknown): Promise<{ origin: PushOrigin; pulls: string[] } | undefined> {
const hook = this.hooks.pushOrigin
const asked = command as { type?: unknown; conversationId?: unknown; status?: unknown; result?: unknown; present?: unknown; projectId?: unknown; branchRef?: unknown;
request?: { branchRef?: unknown; conversationId?: unknown } } | null
@@ -1505,7 +1506,7 @@ export class SuperTabStore {
const group = state.conversations.find(c => c.id === asked.request?.conversationId)
return group ? groupProject(state, group).repository?.repositoryUrl ?? null : undefined
})
- return repositoryUrl === undefined ? undefined : await this.hooks.branchPushOrigin(repositoryUrl, branch)
+ return repositoryUrl === undefined ? undefined : { origin: await this.hooks.branchPushOrigin(repositoryUrl, branch), pulls: [] }
}
const reads = asked.type === 'work.assign' || asked.type === 'work.teamWritten' || (asked.type === 'conversation.agent' && asked.present === true) || (asked.type === 'work.status' && asked.status === 'review')
if (!hook || typeof asked.conversationId !== 'string' || !reads) return undefined
@@ -1520,13 +1521,16 @@ export class SuperTabStore {
return { repositoryUrl, urls: [...new Set(urls)], step: !!group.reviewOf }
})
if (!facts) return undefined
- if (facts.urls.length) return await hook(facts.repositoryUrl, facts.urls)
+ // Only what the reader reads covers a mark: the project's own repository's pull requests (pushOrigin.ts projectPushOrigin),
+ // which answers clean for none of them (security review 2 of #3304).
+ const read = githubRepository(facts.repositoryUrl) ? facts.urls.flatMap(url => projectPullRequestUrl(url, facts.repositoryUrl) ?? []) : []
+ if (facts.urls.length) return { origin: await hook(facts.repositoryUrl, facts.urls), pulls: read }
// A step reads or runs a branch, and with no pull request named nothing shows whose. It may name one in a sentence no read
// can parse, and then its agent runs `gh pr checkout` itself (security review 2 of #2559).
- return facts.step && facts.repositoryUrl && githubRepository(facts.repositoryUrl) ? 'unknown' : undefined
+ return facts.step && facts.repositoryUrl && githubRepository(facts.repositoryUrl) ? { origin: 'unknown', pulls: [] } : undefined
} catch (error) {
if (error instanceof SuperTabError) return undefined
- return 'unknown'
+ return { origin: 'unknown', pulls: [] }
}
}
@@ -1845,7 +1849,7 @@ export class SuperTabStore {
context.otherWorkspaceMachines = await this.otherWorkspaceMachines(tx, original)
if (this.hooks.teamAccountsIdle) context.teamAccountsIdle = true
}
- if (pushOrigin) context.pushOrigin = pushOrigin
+ if (pushOrigin) Object.assign(context, { pushOrigin: pushOrigin.origin, pushOriginPulls: pushOrigin.pulls })
if (repositoryReach) context.repositoryReach = repositoryReach
if (command.type === 'agent.screen' || command.type === 'agent.input') {
// A machine that is gone or no longer shared refuses at once instead of leaving the request to time out.
diff --git a/backend/src/superTabs/teamWritten.test.ts b/backend/src/superTabs/teamWritten.test.ts
index ac6ee4d8e..a070b982b 100644
--- a/backend/src/superTabs/teamWritten.test.ts
+++ b/backend/src/superTabs/teamWritten.test.ts
@@ -58,13 +58,33 @@ describe('a task a Team agent worked on', () => {
expect(teamWrittenTask(f.state, stored())).toBe(true)
})
- it('is marked when a Team agent opens it or is added to it', () => {
- const f = swarm()
+ // #3304: joining a task is not writing its code. Hazel4 joined Magnolia2's task to post a list, and no main-account agent could
+ // take its steps after, though every commit on its branch was a person's. A Team agent's push shows in GitHub's record.
+ it('does not mark a task when a Team agent opens it, is added to it, is named into it or posts there', () => {
+ const f = swarm(), builder = f.member('main-builder', 'mac')
+ const asBuilder: Actor = { kind: 'agent', agentId: builder, machineOwnerId: 'owner' }
const opened = f.group({}, { kind: 'agent', agentId: f.member('team-a', 'mac-team'), machineOwnerId: 'owner' })
- expect(f.state.conversations.find(c => c.id === opened)!.teamWritten).toBe(true)
- const added = f.group()
- f.run({ type: 'conversation.agent', conversationId: added, agentId: f.member('team-b', 'mac-team'), present: true, lead: false })
- expect(f.state.conversations.find(c => c.id === added)!.teamWritten).toBe(true)
+ const added = f.group(), named = f.group(), posted = f.group()
+ for (const task of [added, named, posted]) f.run({ type: 'conversation.agent', conversationId: task, agentId: builder, present: true, lead: false })
+ const told = [
+ f.run({ type: 'conversation.agent', conversationId: added, agentId: f.member('team-b', 'mac-team'), present: true, lead: false }),
+ f.run({ type: 'message.send', conversationId: named, text: 'Please look.', replyTo: null, recipientIds: [f.member('team-c', 'mac-team')] }, asBuilder),
+ ]
+ const poster = f.member('team-d', 'mac-team')
+ f.run({ type: 'conversation.agent', conversationId: posted, agentId: poster, present: true, lead: false })
+ f.state.conversations.find(c => c.id === posted)!.agentIds = f.state.conversations.find(c => c.id === posted)!.agentIds.filter(id => id !== poster)
+ told.push(f.run({ type: 'message.send', conversationId: posted, text: 'Here is the list.', replyTo: null, recipientIds: [] }, { kind: 'agent', agentId: poster, machineOwnerId: 'owner' }))
+ expect(told.flatMap(e => e.messages).some(m => m.text === TEAM_WRITTEN_STOP)).toBe(false)
+ for (const task of [opened, added, named, posted]) {
+ expect(f.state.conversations.find(c => c.id === task)!.teamWritten, task).toBeUndefined()
+ const step = f.group({ reviewOf: task, step: 'Review' })
+ expect(refusal(() => f.run({ type: 'work.assign', conversationId: step, agentId: f.member(`main-reviewer-${task}`, 'mac') })), task).toBeNull()
+ }
+ })
+
+ it('is marked when a Team agent is assigned to build it', () => {
+ const f = swarm(), task = f.written()
+ expect(f.state.conversations.find(c => c.id === task)!.teamWritten).toBe(true)
})
it('refuses an agent in the main account: assigned to its step, or to the task itself', () => {
@@ -312,13 +332,6 @@ describe('a task a Team agent worked on', () => {
expect(f.state.conversations.find(c => c.id === task)!.teamWritten).toBe(true)
})
- it('marks a clean task when another agent names a Team agent into it', () => {
- const f = swarm(), task = f.group(), builder = f.member('main-builder', 'mac')
- f.run({ type: 'work.assign', conversationId: task, agentId: builder })
- f.run({ type: 'message.send', conversationId: task, text: 'Please look.', replyTo: null, recipientIds: [f.member('team-a', 'mac-team')] }, { kind: 'agent', agentId: builder, machineOwnerId: 'owner' })
- expect(f.state.conversations.find(c => c.id === task)!.teamWritten).toBe(true)
- })
-
it('reads who pushed the branch a start names: a bot\'s push moves it to the Team account, an unknown branch stays out of the main account', () => {
const f = swarm(), task = f.group()
const request = (conversationId: string) => ({ type: 'agent.start' as const, request: { conversationId, machineId: 'mac', engine: 'claude', name: 'Tester', cwd: '/swarm/lead', worktree: true, branchRef: 'refs/remotes/origin/fix', requirements } })
@@ -356,6 +369,73 @@ describe('a task a Team agent worked on', () => {
expect(f.state.conversations.find(c => c.id === task)!.teamWritten).toBe(true)
})
+ // #3304: a mark set by a join before this change clears once GitHub reads every pull request the task records as clean.
+ describe('a clean read from GitHub', () => {
+ const P = 'https://github.com/acme/app/pull/7', Q = 'https://github.com/acme/app/pull/8'
+ const assignMain = (f: ReturnType<typeof swarm>, step: string, pushOriginPulls: string[]) =>
+ refusal(() => f.run({ type: 'work.assign', conversationId: step, agentId: f.member(`main-${step}-${pushOriginPulls.length}`, 'mac') }, owner, { pushOrigin: 'clean', pushOriginPulls }))
+ /** A task marked as a join marked it before #3304: no cause, a step opened after it holding a copy. */
+ const joinMarked = (f: ReturnType<typeof swarm>, recorded: string[]) => {
+ const task = f.group(), stored = f.state.conversations.find(c => c.id === task)!
+ stored.teamWritten = true
+ stored.pullRequestUrls = recorded
+ return { task, step: f.group({ reviewOf: task, step: 'Review' }) }
+ }
+ const marked = (f: ReturnType<typeof swarm>, id: string) => f.state.conversations.find(c => c.id === id)!.teamWritten
+
+ it('clears a mark from before this change, on the task and its steps, once it covers every pull request the task records', () => {
+ const f = swarm(), { task, step } = joinMarked(f, [P])
+ expect(marked(f, step)).toBe(true)
+ expect(assignMain(f, step, [P])).toBeNull()
+ expect(marked(f, task)).toBeUndefined()
+ expect(marked(f, step)).toBeUndefined()
+ })
+
+ it('keeps a mark when it did not read every pull request the task records, or the task records none', () => {
+ const f = swarm(), { task, step } = joinMarked(f, [P, Q])
+ expect(assignMain(f, step, [P])).toBe(TEAM_WRITTEN_WORK)
+ expect(assignMain(f, step, [])).toBe(TEAM_WRITTEN_WORK)
+ expect(marked(f, task)).toBe(true)
+ const bare = joinMarked(f, [])
+ expect(assignMain(f, bare.step, [P])).toBe(TEAM_WRITTEN_WORK)
+ })
+
+ it('keeps the mark of a Team agent assigned to build the task', () => {
+ const f = swarm(), task = f.written(), stored = f.state.conversations.find(c => c.id === task)!
+ stored.pullRequestUrls = [P]
+ stored.assignment = null
+ expect(assignMain(f, f.group({ reviewOf: task, step: 'Review' }), [P])).toBe(TEAM_WRITTEN_WORK)
+ expect(marked(f, task)).toBe(true)
+ })
+
+ it('keeps a bot push\'s mark until it covers the pull requests that push was read on', () => {
+ const f = swarm(), task = f.group()
+ f.state.conversations.find(c => c.id === task)!.pullRequestUrls = [P]
+ f.run({ type: 'work.teamWritten', conversationId: task }, owner, { pushOrigin: 'team', pushOriginPulls: [P, Q] })
+ const step = f.group({ reviewOf: task, step: 'Review' })
+ expect(assignMain(f, step, [P])).toBe(TEAM_WRITTEN_WORK)
+ expect(assignMain(f, step, [P, Q])).toBeNull()
+ expect(marked(f, task)).toBeUndefined()
+ })
+
+ it('keeps the mark of a bot\'s push on a branch a start named', () => {
+ const f = swarm(), task = f.group()
+ f.state.conversations.find(c => c.id === task)!.pullRequestUrls = [P]
+ f.run({ type: 'agent.start', request: { conversationId: task, machineId: 'mac', engine: 'claude', name: 'Tester', cwd: '/swarm/lead', worktree: true, branchRef: 'refs/remotes/origin/fix', requirements } }, owner, { pushOrigin: 'team' })
+ expect(assignMain(f, f.group({ reviewOf: task, step: 'Review' }), [P])).toBe(TEAM_WRITTEN_WORK)
+ expect(marked(f, task)).toBe(true)
+ })
+
+ it('keeps a step\'s own mark from a bot\'s push on the pull request it records', () => {
+ const f = swarm(), { task, step } = joinMarked(f, [P])
+ const other = f.group({ reviewOf: task, step: 'Test' }), stored = f.state.conversations.find(c => c.id === other)!
+ stored.pullRequestUrls = [Q]
+ expect(assignMain(f, step, [P])).toBeNull()
+ expect(marked(f, task)).toBeUndefined()
+ expect(marked(f, other)).toBe(true)
+ })
+ })
+
it('reads a mark set before its assignee existed in the Swarm\'s record, on an open task, by its current assignee', () => {
const f = swarm(), task = f.written(), stored = f.state.conversations.find(c => c.id === task)!
delete stored.teamWritten
diff --git a/backend/src/superTabs/teamWritten.ts b/backend/src/superTabs/teamWritten.ts
index 65bdc1f42..87e7fa112 100644
--- a/backend/src/superTabs/teamWritten.ts
+++ b/backend/src/superTabs/teamWritten.ts
@@ -3,9 +3,11 @@
* only in a Team account, never with the main account's rights, as install scripts, tests and project settings would
* run there with no race and no bug. docs/plans/2026-11-02-team-written-branch-plan.md.
*
- * The mark comes from the Swarm's own record of who worked on the task, or from GitHub's record of who pushed. It never
- * clears, and it is never read from a commit's author, which anyone can write. A step reads its task's mark. A Team agent
- * given only a step does not mark the task: it reads or tests, and a push of its own shows in GitHub's record.
+ * The mark follows the code (#3304): a Team agent assigned to build the task, or GitHub's record of a bot's push. Joining the
+ * task, being named into it, posting or opening it marks nothing: a push of the agent's own shows in GitHub's record. It is
+ * never read from a commit's author, which anyone can write. A step reads its task's mark, and a Team agent given only a
+ * step does not mark the task. An assignment's mark stays; a push's, or one a join set before #3304, clears only when a clean
+ * GitHub read covers every pull request it rests on (applyPushOrigin).
*/
import type { PushOrigin } from '../github/pushOrigin.js'
import { fail, type Agent, type Conversation, type SuperTabState } from './model.js'
@@ -33,10 +35,26 @@ export function teamWrittenTask(state: SuperTabState, group: Conversation): bool
return !!assignee && onTeamAccount(state, assignee)
}
-/** Marks [group] when [worker], assigned to it or added to it, runs in a Team account. A step or the project's coordinator marks nothing. */
+type Cause = NonNullable<Conversation['teamWrittenBy']>
+
+/** Marks [group] for [cause], keeping the strongest: a lasting cause over pull requests, and the pull requests of every push read. */
+function mark(group: Conversation, cause: Cause): void {
+ const was = group.teamWrittenBy
+ group.teamWritten = true
+ if (was && was.kind !== 'pushed') return
+ group.teamWrittenBy = cause.kind === 'pushed' && was?.kind === 'pushed' ? { kind: 'pushed', pulls: [...new Set([...was.pulls, ...cause.pulls])] } : cause
+}
+
+/** Marks [group] when [worker], assigned to build it, runs in a Team account. A step or the project's coordinator marks nothing. */
export function markTeamWritten(state: SuperTabState, group: Conversation, worker: Agent): void {
if (group.reviewOf || coordinates(state, group, worker) || !onTeamAccount(state, worker)) return
- group.teamWritten = true
+ mark(group, { kind: 'assigned' })
+}
+
+/** What a step opened on [task] stores: a copy of its task's mark, or an assignment's when it reads as Team-written by its assignee. */
+export function stepMark(state: SuperTabState, task: Conversation): Pick<Conversation, 'teamWritten' | 'teamWrittenBy'> {
+ if (task.teamWritten) return { teamWritten: true, ...task.teamWrittenBy ? { teamWrittenBy: structuredClone(task.teamWrittenBy) } : {} }
+ return teamWrittenTask(state, task) ? { teamWritten: true, teamWrittenBy: { kind: 'assigned' } } : {}
}
/** Refuses an agent outside a Team account for Team-written code. The project's coordinator stays: it never builds or runs it. */
@@ -57,10 +75,6 @@ export function failTeamWritten(details?: Record<string, unknown>): never {
return fail(TEAM_WRITTEN_WORK, TEAM_WRITTEN_REASON, 403, details)
}
-/** Whether [worker] has a step of [group], assigned now or before: it reads or tests that task, and a push of its own shows in GitHub. */
-export const hasStep = (state: SuperTabState, group: Conversation, worker: Agent): boolean =>
- state.conversations.some(c => c.reviewOf === group.id && (c.assignment?.agentId === worker.id || c.agentIds.includes(worker.id)))
-
/** Whether [sender] may name [named] in a post: not a main-account member of Team-written work, how a re-test or re-check is
* asked for, unless [sender] coordinates. A post that names one it may not goes out without it (commands.ts message.send). */
export const mayName = (state: SuperTabState, group: Conversation, sender: Agent, named: Agent): boolean =>
@@ -82,12 +96,30 @@ export function mainAccountMembers(state: SuperTabState, group: Conversation, ex
})
}
-/** GitHub's record of who pushed: a bot among [group]'s pushes marks its task for good. A clean reading clears nothing. */
-export function applyPushOrigin(state: SuperTabState, group: Conversation, origin: PushOrigin | undefined): void {
- if (origin !== 'team') return
+/**
+ * GitHub's record of who pushed [pulls], the pull requests the store read (none for a branch). A bot among them marks [group]
+ * and its task. A clean read clears a mark only where it covered everything that mark rests on (#3304): every pull request
+ * the task and that conversation record, and for a push's mark the pull requests it was read on. An assignment's mark and a
+ * branch's stay. A pull request recorded after the read was not covered, so it clears nothing.
+ */
+export function applyPushOrigin(state: SuperTabState, group: Conversation, origin: PushOrigin | undefined, pulls: readonly string[] = []): void {
const task = taskOf(state, group)
- if (task) task.teamWritten = true
- group.teamWritten = true
+ if (origin === 'team') {
+ const cause: Cause = pulls.length ? { kind: 'pushed', pulls: [...new Set(pulls)] } : { kind: 'branch' }
+ if (task) mark(task, cause)
+ mark(group, cause)
+ return
+ }
+ if (origin !== 'clean' || !task?.pullRequestUrls?.length) return
+ const read = new Set(pulls.map(url => url.toLowerCase()))
+ const covers = (urls: readonly string[]) => urls.every(url => read.has(url.toLowerCase()))
+ if (!covers(task.pullRequestUrls)) return
+ for (const marked of [task, ...state.conversations.filter(c => c.reviewOf === task.id)]) {
+ const by = marked.teamWrittenBy
+ if (!marked.teamWritten || (by && (by.kind !== 'pushed' || !covers(by.pulls))) || !covers(marked.pullRequestUrls ?? [])) continue
+ delete marked.teamWritten
+ delete marked.teamWrittenBy
+ }
}
/** [reason]: why GitHub cannot show it, when that is known (repositoryReach.ts unknownPushReason). */
diff --git a/docs/plans/2026-11-02-team-written-branch-plan.md b/docs/plans/2026-11-02-team-written-branch-plan.md
index 7600a00cd..5d204e96c 100644
--- a/docs/plans/2026-11-02-team-written-branch-plan.md
+++ b/docs/plans/2026-11-02-team-written-branch-plan.md
@@ -29,8 +29,10 @@ project settings off.
A branch is **Team-written** when any of these holds. It is trusted only when the check reads clean, and a failed read counts
as Team-written:
-1. An agent on a Team account opened its task, was assigned to it or was added to it (a lasting mark on the task, kept by the
- server). A Team agent given only a step does not count, and neither does the project's coordinator.
+1. An agent on a Team account was assigned to build its task (a lasting mark on the task, kept by the server). A Team agent
+ given only a step does not count, and neither does the project's coordinator. Opening the task, joining it, being named
+ into it or posting there writes no code and marks nothing (#3304, `docs/plans/2026-11-05-team-written-follows-code-plan.md`):
+ a push of the agent's own shows under 2.
2. GitHub shows a push by the app's bot of a commit in the pull request. This also catches a batch branch that the PM pushed with
Team commits inside.
3. Its head has commits not on the default branch, and the activity log can't cover them (the log was too short, the read
diff --git a/docs/plans/2026-11-05-team-written-follows-code-plan.md b/docs/plans/2026-11-05-team-written-follows-code-plan.md
new file mode 100644
index 000000000..af101c73e
--- /dev/null
+++ b/docs/plans/2026-11-05-team-written-follows-code-plan.md
@@ -0,0 +1,109 @@
+# A task is Team-written only when a Team agent's code is on it: implementation plan
+
+Task #3304, audit finding H2 (`docs/security/2026-11-02-team-account-boundary.md`). Requested by Ken. Written by the
+Engineer's way of working in the project's instructions: this plan, then each task test first, one pull request.
+
+**Goal:** the Team-written mark follows the code. A Team agent joining a task, being named into it, posting there or
+opening it no longer marks it; a Team agent assigned to build it, or GitHub showing the app's bot pushed to its pull
+request, still does. A mark from a join, set before this change, clears once GitHub reads every pull request the task
+records as clean.
+
+**Architecture:** `backend/src/superTabs/teamWritten.ts` keeps the rule. The mark gets a cause (`teamWrittenBy`): a Team
+assignment, or the pull requests a bot's push was read on. The joins in `commands.ts` stop calling the marker. The store
+passes the pull requests it read to the command (`context.pushOriginPulls`), so a clean read can clear only a mark whose
+pull requests it covered.
+
+**Tech Stack:** TypeScript, vitest, the Super Tab store (MongoDB through Prisma, no schema change: the state is JSON).
+
+**Spec:** the task's brief (#3304); the rule it changes is in `docs/plans/2026-11-02-team-written-branch-plan.md`, "The rule".
+
+## Global Constraints
+
+- Security-sensitive (the Team-written rule, audit H2): two security reviews before merge.
+- Keep the rule for real Team-pushed code: GitHub's record of a bot's push, and a Team agent assigned to the task, still mark it.
+- A clean read never clears a mark it did not cover: an assignment's mark and a mark from a branch read (no pull request) stay.
+- `unknown` still refuses the main account; a step still reads its task's mark.
+- Swarm code stays out of `cli/src/core`. Backend only.
+
+## Design
+
+- Growth: two optional fields on a task and its steps (`teamWrittenBy`, at most the 5 pull requests a read covers). Deleted with the conversation.
+- Concurrency: the command's own transaction on the Swarm row, as today. The read happens before it; the command checks the read
+ covered every pull request the task records at commit time, so a pull request added between the two keeps the mark.
+- Read cost: no new GitHub read. The existing read at an assignment, an added agent, a Ready and `work.teamWritten` decides.
+- Scale: unchanged; no new query.
+- Compatibility: a mark without a cause is one from before this change. It is kept until a clean read covers every recorded pull
+ request, so an old mark from a push or an assignment is cleared only when GitHub shows no bot's push there now. Old clients read
+ `teamWritten` only.
+- Migration + rollback: none needed. A rollback reads `teamWritten` as before and ignores the cause; a mark cleared meanwhile stays
+ cleared, which GitHub's read justified.
+- Audience: the server sets and clears it; no client's word does (`work.teamWritten` still needs the server's own read).
+- Identity: GitHub's activity log, never a commit's author, as today.
+- Failure: a failed read is `unknown` and clears nothing.
+- Platforms: N/A because it is server code.
+
+## Review Focus
+
+- A Team agent named into a task by another agent's post: no mark, and no stop message to the main-account members.
+- A Ready whose result names a clean pull request while the task records a bot-pushed one: the read is the worst of both, so the mark stays.
+- A pull request recorded on the task after the read and before the command: the read did not cover it, so a clean read clears nothing.
+- A task a Team agent was assigned, its pull request later reading clean (a person rebased the commits): the mark stays.
+- A step created while its task was marked keeps a copy; clearing the task clears the step's copy of the same cause too.
+
+---
+
+### Task 1: joins, posts and openings no longer mark
+
+**Files:**
+- Modify: `backend/src/superTabs/commands.ts` (`teamJoin`, `joinable`, `conversation.agent`, `conversation.create`)
+- Modify: `backend/src/superTabs/teamWritten.ts` (`markTeamWritten` comment; `hasStep` removed once unused)
+- Test: `backend/src/superTabs/teamWritten.test.ts`
+
+**Interfaces:**
+- Produces: `markTeamWritten(state, group, worker)` is called from `work.assign` only.
+
+- [ ] **Step 1: Write the failing tests** in `teamWritten.test.ts`:
+ - `does not mark a task when a Team agent opens it, is added to it, is named into it or posts there`: each path leaves
+ `teamWritten` undefined, sends no `TEAM_WRITTEN_STOP`, and a main-account agent is then assigned the task's step.
+ - Replace `is marked when a Team agent opens it or is added to it` and `marks a clean task when another agent names a Team agent into it`.
+- [ ] **Step 2: Run** `npx vitest run src/superTabs/teamWritten.test.ts`. Expected: the new test fails (marked on join).
+- [ ] **Step 3: Implement**: drop the `marking(... markTeamWritten ...)` call in `teamJoin`, `joinable` and `conversation.agent`,
+ and the creator clause of `conversation.create` (a step still copies its task's mark). `requireTeamWrittenAccount` stays on each.
+- [ ] **Step 4: Run** the same file and `ownAccountWork.test.ts`. Expected: PASS.
+- [ ] **Step 5: Commit** the test, then the code.
+
+### Task 2: the mark has a cause, and a covering clean read clears a mark without a lasting one
+
+**Files:**
+- Modify: `backend/src/superTabs/model.ts` (`Conversation.teamWrittenBy`)
+- Modify: `backend/src/superTabs/teamWritten.ts` (`markTeamWritten`, `applyPushOrigin`)
+- Modify: `backend/src/superTabs/commands.ts` (`CommandContext.pushOriginPulls`; the call sites of `applyPushOrigin`; step copy)
+- Modify: `backend/src/superTabs/store.ts` (`pushOriginFor` returns the pull requests it read)
+- Test: `backend/src/superTabs/teamWritten.test.ts`, `backend/integration/superTabTeam.test.ts`
+
+**Interfaces:**
+- Produces: `Conversation.teamWrittenBy?: { assigned: true } | { pulls: string[] }`;
+ `CommandContext.pushOriginPulls?: string[]`;
+ `applyPushOrigin(state, group, origin, pulls?: readonly string[]): void`.
+
+- [ ] **Step 1: Write the failing tests**:
+ - `clears a mark from before this change once GitHub reads every pull request the task records as clean`: a task with
+ `teamWritten: true`, no cause, `pullRequestUrls: [P]`, and its step's copy; a step `work.assign` of a main agent with
+ `{ pushOrigin: 'clean', pushOriginPulls: [P] }` is taken and both marks are gone.
+ - `keeps a mark a clean read did not cover`: same with `pushOriginPulls: []` or a different pull request: refused.
+ - `keeps a Team assignment's mark through a clean read`: `f.written()`, then a clean covering read: refused.
+ - `keeps a bot push's mark until a clean read covers the pull requests it was read on`: a `team` read on `[P, Q]` marks it;
+ a clean read of `[P]` keeps it; a clean read of `[P, Q]` clears it.
+ - `keeps a branch read's mark`: a `team` read from an `agent.start` with a branch (no pull requests) is never cleared.
+ - Integration (`superTabTeam.test.ts`): the store passes the pull requests it read, and a stored legacy mark clears through it.
+- [ ] **Step 2: Run** `npx vitest run src/superTabs/teamWritten.test.ts`. Expected: the clearing tests fail.
+- [ ] **Step 3: Implement**:
+ - `markTeamWritten` sets `teamWrittenBy = { assigned: true }`. `applyPushOrigin('team', pulls)` sets `{ pulls }` (merged with an
+ earlier push's pulls; never over an assignment).
+ - `applyPushOrigin('clean', pulls)`: for the task and each of its steps, a mark is cleared when it is not an assignment's,
+ the task records at least one pull request, every one of them is in `pulls`, and a push mark's own pulls are all in `pulls`.
+ - `pushOriginFor` returns `{ origin, pulls }`; `executeOnce` sets `context.pushOriginPulls` from it (empty for a branch read).
+ - A step opened on a marked task copies the task's cause.
+- [ ] **Step 4: Run** the file, `ownAccountWork.test.ts`, `src/github/pushOrigin.test.ts`, and the integration file. Expected: PASS.
+- [ ] **Step 5: Commit** the tests, then the code, and update the rule in `docs/plans/2026-11-02-team-written-branch-plan.md`
+ and the H2 status in `docs/security/2026-11-02-team-account-boundary.md`.
diff --git a/docs/security/2026-11-02-team-account-boundary.md b/docs/security/2026-11-02-team-account-boundary.md
index 5b01c0185..011783874 100644
--- a/docs/security/2026-11-02-team-account-boundary.md
+++ b/docs/security/2026-11-02-team-account-boundary.md
@@ -80,8 +80,9 @@ there with its project settings off. Until then, route those Reviewers and Teste
**Status (task #2025, `docs/plans/2026-11-02-team-written-branch-plan.md`):** the attack was then tried with Claude Code 2.1.316 on a
fixture: planted `settings.json`, `settings.local.json` and `.mcp.json` all ran in a trusted folder. The fix:
-- The server refuses a main-account agent for a task a Team agent worked on, and for any pull request GitHub's activity log shows the
- app's bot pushed to. If GitHub can't say, or a review names no pull request, the main account is refused too.
+- The server refuses a main-account agent for a task a Team agent was assigned to build, and for any pull request GitHub's activity log
+ shows the app's bot pushed to. If GitHub can't say, or a review names no pull request, the main account is refused too. A Team agent
+ joining or posting in a task marks nothing, and a push mark clears only on a clean read of the pull requests it rests on (#3304).
- A new mark tells every main-account member of the task and its steps to stop, and another agent's post can't name them.
- These agents start with project settings off, and a daemon in the main account refuses such a start.