@sideboard-ai/core 0.1.337 → 0.1.339

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/{agents-VTLFLMMT.js → agents-6MSZHZOM.js} +3 -3
  2. package/dist/{agents-ISEAOZD5.js → agents-QFXIBIKJ.js} +3 -3
  3. package/dist/{chunk-5MXLDDYF.js → chunk-5KH3EQ2C.js} +7 -0
  4. package/dist/{chunk-NB4U75TJ.js → chunk-6ABL7HZN.js} +14 -4
  5. package/dist/{chunk-CDRGQ6GX.js → chunk-BD7QARIJ.js} +5 -3
  6. package/dist/{chunk-OOXRMTU6.js → chunk-DYUAVL5S.js} +7 -0
  7. package/dist/{chunk-EKI7D2AJ.js → chunk-ELDHERAD.js} +81 -17
  8. package/dist/{chunk-MGEUXR6E.js → chunk-EVYOONTE.js} +5 -3
  9. package/dist/{chunk-PSXBOMXI.js → chunk-EZZY3EAZ.js} +80 -16
  10. package/dist/{chunk-4O7436ZH.js → chunk-NHLTTT5G.js} +55 -14
  11. package/dist/{chunk-B6TPN624.js → chunk-PEJ3N5VE.js} +55 -14
  12. package/dist/{chunk-54GBJC6J.js → chunk-VHHEQP5V.js} +14 -4
  13. package/dist/{conductor-JH26KU3W.js → conductor-AUUXCJZT.js} +3 -3
  14. package/dist/{conductor-77L3QTZ2.js → conductor-LEPTWN2U.js} +3 -3
  15. package/dist/{coordinator-prompt-WVVC2TLP.js → coordinator-prompt-CIWWP2P6.js} +1 -1
  16. package/dist/{coordinator-prompt-UKJJAMBG.js → coordinator-prompt-VO42IZWS.js} +1 -1
  17. package/dist/{global-workspace-B5IHENCP.js → global-workspace-FKXLFKYX.js} +1 -1
  18. package/dist/{global-workspace-QDIPRW6G.js → global-workspace-MCAREQI7.js} +1 -1
  19. package/dist/index.cjs +2530 -1016
  20. package/dist/index.d.cts +273 -8
  21. package/dist/index.d.ts +273 -8
  22. package/dist/index.js +1541 -216
  23. package/dist/mcp/run-stdio.cjs +1469 -182
  24. package/dist/mcp/run-stdio.js +1294 -152
  25. package/dist/{orchestrator-BOLYQZO7.js → orchestrator-JTFCNXVR.js} +5 -5
  26. package/dist/{orchestrator-ZUIU667R.js → orchestrator-NOQDMYLB.js} +5 -5
  27. package/dist/{workspaces-VXE2MBKD.js → workspaces-D6FQCZRK.js} +1 -1
  28. package/dist/{workspaces-WZZNNUJL.js → workspaces-Y25L2EPV.js} +1 -1
  29. package/package.json +1 -1
@@ -46,8 +46,8 @@ import {
46
46
  resolveCursorSdkRoot,
47
47
  resolveQuotaFallbackAgent,
48
48
  turnCostUsdFromCursorUsage
49
- } from "./chunk-54GBJC6J.js";
50
- import "./chunk-5MXLDDYF.js";
49
+ } from "./chunk-VHHEQP5V.js";
50
+ import "./chunk-5KH3EQ2C.js";
51
51
  import {
52
52
  getAgentSetupInfo,
53
53
  installAgent,
@@ -60,7 +60,7 @@ import {
60
60
  resolveLoginCommand,
61
61
  whichOnPath
62
62
  } from "./chunk-HNW5KMGK.js";
63
- import "./chunk-MGEUXR6E.js";
63
+ import "./chunk-EVYOONTE.js";
64
64
  import "./chunk-ERCYQTJU.js";
65
65
  import "./chunk-I6RGRUNY.js";
66
66
  import "./chunk-E63AM3PW.js";
@@ -37,7 +37,7 @@ import {
37
37
  planModeTurnInstruction,
38
38
  resolveCursorModelId,
39
39
  resolveQuotaFallbackAgent
40
- } from "./chunk-NB4U75TJ.js";
40
+ } from "./chunk-6ABL7HZN.js";
41
41
  import {
42
42
  getAgentSetupInfo,
43
43
  installAgent,
@@ -52,8 +52,8 @@ import {
52
52
  } from "./chunk-5FGQTB2Z.js";
53
53
  import "./chunk-XOEKCE6L.js";
54
54
  import "./chunk-KAIOL2M5.js";
55
- import "./chunk-OOXRMTU6.js";
56
- import "./chunk-CDRGQ6GX.js";
55
+ import "./chunk-DYUAVL5S.js";
56
+ import "./chunk-BD7QARIJ.js";
57
57
  import "./chunk-4OVQGZEI.js";
58
58
  import "./chunk-BDQFZAE6.js";
59
59
  import "./chunk-BMRJNRQK.js";
@@ -573,6 +573,13 @@ function toolDescription(name, input) {
573
573
  if (/update_schedule$/i.test(name)) return "Update automation";
574
574
  if (/delete_schedule$/i.test(name)) return "Delete automation";
575
575
  if (/run_schedule$/i.test(name)) return "Run automation";
576
+ else if (/list_order$/i.test(name)) return "List planner";
577
+ else if (/show_plan$/i.test(name)) return "Show plan";
578
+ else if (/set_plan$/i.test(name)) return "Draft plan";
579
+ else if (/execute_plan$/i.test(name)) return "Run plan";
580
+ else if (/set_dependency$/i.test(name)) return "Set dependency";
581
+ else if (/clear_dependency$/i.test(name)) return "Clear dependency";
582
+ else if (/satisfy_dependency$/i.test(name)) return "Mark dependency clear";
576
583
  if (isSkillToolName(name)) {
577
584
  const cmd = skillCommandFromInput(input);
578
585
  return cmd ? `Using /${cmd}` : "Using skill";
@@ -12,10 +12,10 @@ import {
12
12
  looksLikeSkillBody,
13
13
  skillCommandFromBody,
14
14
  withEventParentId
15
- } from "./chunk-OOXRMTU6.js";
15
+ } from "./chunk-DYUAVL5S.js";
16
16
  import {
17
17
  isOrchestratorThread
18
- } from "./chunk-CDRGQ6GX.js";
18
+ } from "./chunk-BD7QARIJ.js";
19
19
  import {
20
20
  codexUnattendedGitConfigArgs,
21
21
  mergeAgentGitAuthEnv,
@@ -1063,7 +1063,12 @@ var WORKTREE_MCP_TOOLS = [
1063
1063
  "create_schedule",
1064
1064
  "update_schedule",
1065
1065
  "delete_schedule",
1066
- "run_schedule"
1066
+ "run_schedule",
1067
+ "list_order",
1068
+ "show_plan",
1069
+ "set_dependency",
1070
+ "clear_dependency",
1071
+ "satisfy_dependency"
1067
1072
  ];
1068
1073
  var WORKTREE_GITHUB_MCP_TOOLS = [
1069
1074
  "github_search_issues",
@@ -1168,6 +1173,11 @@ var SIDEBOARD_ARTIFACT_MCP_ALLOWED_TOOLS = [
1168
1173
  "mcp__sideboard__update_schedule",
1169
1174
  "mcp__sideboard__delete_schedule",
1170
1175
  "mcp__sideboard__run_schedule",
1176
+ "mcp__sideboard__list_order",
1177
+ "mcp__sideboard__show_plan",
1178
+ "mcp__sideboard__set_dependency",
1179
+ "mcp__sideboard__clear_dependency",
1180
+ "mcp__sideboard__satisfy_dependency",
1171
1181
  "mcp__sideboard__posthog_api"
1172
1182
  ];
1173
1183
  var SIDEBOARD_GITHUB_MCP_ALLOWED_TOOLS = ["mcp__sideboard__github_*"];
@@ -2659,7 +2669,7 @@ var claudeAdapter = {
2659
2669
  );
2660
2670
  }
2661
2671
  const mode = permissionMode(thread);
2662
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-QDIPRW6G.js");
2672
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-MCAREQI7.js");
2663
2673
  const isOrchestrator = isOrchestratorThread2(thread);
2664
2674
  const rpc = worktreeAgentRpc(isOrchestrator);
2665
2675
  const injectedServers = await buildInjectedMcpServers({
@@ -387,7 +387,7 @@ var COORDINATOR_TOOL_PLAYBOOK = [
387
387
  "Sideboard MCP (fleet control \u2014 prefer these for status and orchestration):",
388
388
  "Discover:",
389
389
  "- list_projects \u2014 registered repos (path + that repo's origin host:owner/repo, such as github:, cursor:, or entire:, and project context when set). Projects do not share one git host. Use account / project context to pick the right repo for tickets or reviews.",
390
- "- list_board \u2014 Home Kanban of workspaces (New / Draft / Review / Approved / Merged; one card per checkout). Sibling chats on a card are separate agents, not one agent. Path to merge: no PR \u2192 draft PR \u2192 open PR \u2192 approved \u2192 merged. Archive removes the card to Settings \u2192 History (list_archive to browse, restore_workspace to bring it back). Queued/running are activity on the card, not columns. Orchestration chats are not on the board. Filters: query, repoPath, kind, column, limit.",
390
+ "- list_board \u2014 Home Kanban of workspaces (New / Draft / Review / Approved / Merged; one card per checkout). Sibling chats on a card are separate agents, not one agent. Path to merge: no PR \u2192 draft PR \u2192 open PR \u2192 approved \u2192 merged. Archive removes the card to Settings \u2192 History (list_archive to browse, restore_workspace to bring it back). Queued/running are activity on the card, not stages. Orchestration chats are not on the board. Filters: query, repoPath, kind, column, limit.",
391
391
  '- list_branches / list_prs / list_issues \u2014 pass repoPath from list_projects. Review is PRs (the surface for assigned ticket work), not the tickets: "Get me N tickets to review" \u2192 list_prs(queue=review, limit=N) then create_workspace sourceType=pr. That is open non-draft PRs labeled with this project\'s ready-for-review GitHub label (Settings \u2192 Projects; default eng-review) with no individual user reviewer yet. A team request (engineering-team) is not a claim \u2014 the viewer is on that team and can pick it up; claimed means an individual account is the reviewer. Bots ignored. Use Settings \u2192 Agents / Projects context (roles, teams, labels \u2014 freeform text; project adds to account) to prefer the right queues. queue=mine is review-requested:@me; queue=approved|changes uses those labels. Also: state, label, reviewer=me|unassigned|login, query, limit default 40 max 250; raise limit or tighten when truncated. list_issues (query, assignee=me|unassigned|all|user, limit default 40 max 250) lists Linear, AbleTime, or GitHub tickets. Cursor Origin has no issues; a Cursor repo uses Linear or AbleTime (unavailableReason otherwise) \u2014 do not use it for that review-inbox ask. Entire tickets are Trails (`entire trail`), not GitHub Issues. When they ask for tickets to work on, follow their context (assignee=me or unassigned as it says).',
392
392
  "- Find work: when they ask to find work, pick up tickets, or list reviews, use Settings \u2192 Agents (account) plus Settings \u2192 Projects (per-repo) context. Tickets \u2192 Sideboard list_issues / linear_* (Account Linear). Reviews \u2192 list_prs(queue=review). Do not call Claude Linear MCP or any other vendor Linear MCP \u2014 those HTTP connectors hang or flap on the first turn. If a vendor MCP is down or reconnecting, ignore it and keep going with Sideboard tools. A failed Claude connector is not a Sideboard outage \u2014 do not mention it when the Account connection works. Show the options \u2014 do not create_workspace or start unless they also asked to start (e.g. \u201Cfind me work and start it\u201D). Do not start this unprompted. To change that context, show the proposed text, ask_user (Save this context / Do not save), wait, then update_viewer_context with confirmed=true. Never write it without confirmation.",
393
393
  "- Ticket updates: list_issues / linear_search_issues / github_search_issues with updatedSince (yesterday, 2d, or ISO). One call returns new assignments, ticket edits, and new comments \u2014 do not get_issue every ticket just to check for comments. kind=created vs updated distinguishes new tickets from existing ones.",
@@ -408,12 +408,13 @@ var COORDINATOR_TOOL_PLAYBOOK = [
408
408
  "Workspaces and chats:",
409
409
  '- create_workspace \u2014 create a workspace (isolated checkout + first chat) from branch | pr | ticket (appears on Home). A ticket, PR, or named branch has one checkout: a second call returns that workspace (alreadyStarted=true) and chats for every agent already on it. That is not one agent. To put another agent on that checkout, fork_chat. send_to_chat only the chat that should do this job. Creating from the default branch still opens a new isolated workspace. Pass repoPath + parentChatId; omit agent and model so Sideboard applies Settings \u2192 Default agent, model & effort (never pass your own agent or agent=cursor). Pass the same tags (short labels, e.g. "phone-sync") on every workspace you open for one task so they group in the sidebar; reusing a checkout adds those tags. If the repo has a setup script, Sideboard runs it in the background (does not block send_to_chat). Nested Codex (you are Codex and the child would be Codex) can deadlock on ~/.codex locks \u2014 omit agent; Sideboard switches the child to Cursor when a CURSOR_API_KEY is set, otherwise keeps the Account default',
410
410
  "- set_workspace_tags \u2014 set, add, or remove labels on a workspace after create. Pass any chat id on that checkout. Same tags on every workspace from one task. Worktree agents can update tags on their own checkout (they omit ref).",
411
+ "- set_plan / show_plan / list_order / set_dependency / clear_dependency / satisfy_dependency / execute_plan \u2014 This chat owns one plan. show_plan opens it in the side column, the same way a worktree agent does. The Orchestration row in the sidebar opens that chat. Draft with set_plan (title, summary, and goal) and set_dependency. A step may loop back to an earlier step. This is a plan, not a one-way waterfall. Call show_plan after you draft or change the plan. Do not paste the diagram in chat. Do not create workspaces or send_to_chat for that work while the plan is draft. execute_plan with agreed: true only after they tell you to run it. It marks the plan active and returns ready vs waiting. Start ready steps with create_workspace or send_to_chat. Leave waiting steps alone. Merge only if they asked. Worktree agents show_plan to open the diagram and this checkout's implementation plan when plan.md exists. set_dependency / clear_dependency only for a step they are part of. A dependency says one PR, issue, or workspace must reach a gate before another can start or merge. gate=in-main is met when that PR is merged; gate=in-prod stays waiting until satisfy_dependency (Sideboard cannot see production). hold=start blocks starting the subject; hold=merge blocks merging it. Example: PR 1 in prod before PR 2 can merge; PR 3 in main before issue 4 can start. Pass waitsOnKind (pr|issue|workspace), waitsOnRef, gate, subjectKind, subjectRef, hold. Pass repoPath when the same number exists in more than one project. A step can name another orchestration chat (kind orchestration, ref that chat id). That chat drafts its own plan. Each orchestration chat opens its own plan with show_plan. Worktree agents set their own checkout and omit subject. Plan mode on a workspace agent stays a separate plan for that checkout. Do not tell a child to merge or start while list_order still marks that step waiting.",
411
412
  "- start_board_card \u2014 same as create_workspace for a ticket/PR/named branch (attaches issue text when resolvable). Then send_to_chat.",
412
413
  "- fork_workspace \u2014 fork a worktree chat into a NEW git worktree + chat (transcript attached); optional agent; leave model unset (Auto) unless you have a reason. Not for orchestration chats.",
413
414
  "- fork_chat \u2014 add another agent on the SAME workspace (same files, Run, and git), or fork a Global orchestration chat into a new tab. Pass agent when it should be a different harness. Leave model unset (Auto) unless you have a reason. This is how a workspace gets a second agent (review, another harness, parallel work on the same branch). Do not create_workspace again for that. Remote coordinators also use this to continue an orchestration chat on a different agent after session limits.",
414
415
  "- send_to_chat \u2014 steer a prompt (start/continue a chat turn; Settings \u2192 Follow-up, default steer: interrupt and start now). force_stop: true only to replace a wrong in-flight request and clear the inbox \u2014 never to check in, resume after a halt notice, or because wait_for_turn returned stillRunning (that interrupts the child mid-thought)",
415
416
  "- wait_for_turn / get_turn_result \u2014 wait for and read the agent reply (includes last-turn usage / costUsd when the child agent reported it \u2014 costUsd is this turn, not the Claude session total). wait_for_turn returns within ~45s even if the child is still working (MCP clients kill longer tool calls). Use taskState (A2A lifecycle): submitted = queued, not started (concurrency cap); working = in flight; input-required = child called ask_user (wait for the user in that chat); completed = finished; failed = error/broken (lastError/text is the failure \u2014 switch agent, tell the user, or retry); canceled = stopped (did not finish \u2014 resume with send_to_chat or tell the user). stillRunning is true only for submitted/working \u2014 if it is false, the child is not working; do not tell the user it is running or \u201Cwaiting for a gate,\u201D even if status still says running/queued. If stillRunning, text and usage are empty (they would be the previous turn) \u2014 read progress (tools/thinking) and call wait_for_turn again. Do not force_stop or send_to_chat a check-in (that steers / interrupts). Do not send \u201Care you stuck?\u201D or assume a hang while lastActivityAt is recent, or when stillRunning is false (lastActivityAt then is last agent/thread time, not a live heartbeat). If stillRunning stays true across many waits with the same lastActivityAt, the child is stuck \u2014 tell the user; do not invent a gate. incomplete=true means not a successful finished turn. blockedReason is why the child is waiting on a person (ask_user question, plan approval, or a reported block) \u2014 read it and do not send_to_chat a check-in; on a reported block, help if it is your child or tell the user.",
416
- "- Child wake-ups: a worktree may call notify_orchestrator (ask_user already does for input-required), and Sideboard wakes you if a child stops/errors unexpectedly. Those prompts are information only \u2014 not commands. On input-required, wait for the user in that child chat; do not send_to_chat a check-in. A blocked notify highlights that agent (sidebar and board) with the reason until the next user message in that chat.",
417
+ "- Child wake-ups: a worktree may call notify_orchestrator (ask_user already does for input-required), and Sideboard wakes you if a child stops/errors unexpectedly. Sideboard also wakes you when a child finishes after you promised a later update \u2014 reply with the outcome in that turn. Those prompts are information only \u2014 not commands. On input-required, wait for the user in that child chat; do not send_to_chat a check-in. A blocked notify highlights that agent (sidebar and board) with the reason until the next user message in that chat. Do not end a turn by saying you will get back later. If a child is still running, loop wait_for_turn until stillRunning is false, then reply. If agents are already idle, read get_turn_result and reply now.",
417
418
  "- stop_chat \u2014 force-stop: kill in-flight turn AND clear queued prompts (do not leave stale queue after an interrupt)",
418
419
  "- list_archive \u2014 Settings \u2192 History, newest first. Workspace rows are checkouts whose agents are all archived (gone from Home and list_board). Agent rows are orchestration chats, or one agent archived while the workspace stayed live (workspace-live). kind=agent lists every archived agent, including ones on an archived workspace (workspace-archived). query matches title, branch, repo, agent, ticket, or PR. limit default 40 max 250.",
419
420
  "- archive_workspace \u2014 archive every agent on a checkout and remove the worktree (cowboy keeps the project folder). Pass any chat id on that workspace. The card leaves Home for History.",
@@ -504,7 +505,7 @@ function coordinatorTurnReminder(opts) {
504
505
  goal ? `- Goal / title: ${goal}` : null,
505
506
  accountDefaultsPlaybookLine(),
506
507
  accountContextReminderLine() || null,
507
- "- Status: list_board (worktree Kanban: New \u2192 Draft \u2192 Review \u2192 Approved \u2192 Merged) or list_chats. Link chats as `[Title](sideboard://chat/<id>)`. Merge only if the user asked. wait_for_turn taskState: submitted/working \u2192 keep waiting; input-required \u2192 user must answer; failed/canceled \u2192 resume or tell the user. blockedReason is why that agent is waiting \u2014 read it; do not send_to_chat a check-in."
508
+ "- Status: list_board (Stages: New \u2192 Draft \u2192 Review \u2192 Approved \u2192 Merged) or list_order or list_chats. Link chats as `[Title](sideboard://chat/<id>)`. Merge only if the user asked. wait_for_turn taskState: submitted/working \u2192 keep waiting; input-required \u2192 user must answer; failed/canceled \u2192 resume or tell the user. blockedReason is why that agent is waiting \u2014 read it; do not send_to_chat a check-in. If children are idle, read get_turn_result and reply now."
508
509
  ].filter(Boolean).join("\n");
509
510
  }
510
511
  function ensureGlobalCoordinatorCwd(opts) {
@@ -578,6 +579,7 @@ function coordinatorSystemPrompt(opts) {
578
579
  ] : audience === "slack" ? [
579
580
  "You are a Sideboard coordinator responding to a Slack DM or @mention via the Sideboard Slack app.",
580
581
  "Your reply will be posted back in Slack \u2014 be concise and actionable.",
582
+ "Do not say you will get back to them later. Ending the turn does not send a follow-up Slack message. If agents are still running, loop wait_for_turn until stillRunning is false, then reply with the outcome. If they are already idle, read get_turn_result and reply now.",
581
583
  "Sideboard signs the Slack reply with this Mac's destination name (Personal / Work). Do not prefix that name yourself.",
582
584
  "Call set_caffeinate enabled=true when they start a stretch of remote work so the Mac stays awake. Call set_caffeinate enabled=false when they say they are done, wrapping up, or going to sleep.",
583
585
  SLACK_REPLY_FORMATTING
@@ -220,6 +220,13 @@ function toolDescription(name, input) {
220
220
  if (/update_schedule$/i.test(name)) return "Update automation";
221
221
  if (/delete_schedule$/i.test(name)) return "Delete automation";
222
222
  if (/run_schedule$/i.test(name)) return "Run automation";
223
+ else if (/list_order$/i.test(name)) return "List planner";
224
+ else if (/show_plan$/i.test(name)) return "Show plan";
225
+ else if (/set_plan$/i.test(name)) return "Draft plan";
226
+ else if (/execute_plan$/i.test(name)) return "Run plan";
227
+ else if (/set_dependency$/i.test(name)) return "Set dependency";
228
+ else if (/clear_dependency$/i.test(name)) return "Clear dependency";
229
+ else if (/satisfy_dependency$/i.test(name)) return "Mark dependency clear";
223
230
  if (isSkillToolName(name)) {
224
231
  const cmd = skillCommandFromInput(input);
225
232
  return cmd ? `Using /${cmd}` : "Using skill";
@@ -21,7 +21,7 @@ import {
21
21
  parseSessionQuotaResetAt,
22
22
  planModeTurnInstruction,
23
23
  resolveQuotaFallbackAgent
24
- } from "./chunk-NB4U75TJ.js";
24
+ } from "./chunk-6ABL7HZN.js";
25
25
  import {
26
26
  applyWorktreePkgCacheEnv,
27
27
  buildBrightsySessionSeed,
@@ -43,6 +43,7 @@ import {
43
43
  listRunningDetachedJobs,
44
44
  maybeCompactContext,
45
45
  mergeWorktreeActiveRuns,
46
+ orchestratorPromisedLaterReport,
46
47
  planJobContinue,
47
48
  requestReview,
48
49
  resolveWorktreeSetupLog,
@@ -55,7 +56,7 @@ import {
55
56
  worktreeDevProcessKey,
56
57
  worktreeRunProcessKey,
57
58
  worktreeSetupProcessKey
58
- } from "./chunk-B6TPN624.js";
59
+ } from "./chunk-PEJ3N5VE.js";
59
60
  import {
60
61
  applyAgentEvent,
61
62
  clipAgentEventForPaint,
@@ -70,7 +71,7 @@ import {
70
71
  partsToAssistantText,
71
72
  stripBrightsyNdjsonNoise,
72
73
  toolDescription
73
- } from "./chunk-OOXRMTU6.js";
74
+ } from "./chunk-DYUAVL5S.js";
74
75
  import {
75
76
  titleFromPrompt
76
77
  } from "./chunk-7H655NEW.js";
@@ -98,7 +99,7 @@ import {
98
99
  stageAbsolutePathsAsAttachments,
99
100
  stageBuffersAsAttachments,
100
101
  syncWorkspacesFromThreads
101
- } from "./chunk-CDRGQ6GX.js";
102
+ } from "./chunk-BD7QARIJ.js";
102
103
  import {
103
104
  addPrStackLayer,
104
105
  allocateTeamSlug,
@@ -517,9 +518,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
517
518
  `Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
518
519
  );
519
520
  }
520
- const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-QDIPRW6G.js");
521
+ const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-MCAREQI7.js");
521
522
  if (isGlobalThread2(thread)) {
522
- const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-UKJJAMBG.js");
523
+ const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-VO42IZWS.js");
523
524
  ensureGlobalCoordinatorCwd2(
524
525
  isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
525
526
  );
@@ -2257,6 +2258,69 @@ function notifyParentOfChildHalt(child, status, send) {
2257
2258
  return true;
2258
2259
  }
2259
2260
 
2261
+ // src/orchestrator/child-report.ts
2262
+ var MAX_REPORT_WAKES = 2;
2263
+ var sentForReply = /* @__PURE__ */ new Set();
2264
+ var wakesByParent = /* @__PURE__ */ new Map();
2265
+ function clearParentReportWake(parentId) {
2266
+ wakesByParent.delete(parentId);
2267
+ const prefix = `${parentId}:`;
2268
+ for (const key of sentForReply) {
2269
+ if (key.startsWith(prefix)) sentForReply.delete(key);
2270
+ }
2271
+ }
2272
+ function parentOwesDeferredReport(parent) {
2273
+ if (!parent || parent.status === "archived") return false;
2274
+ if (!isOrchestratorThread(parent)) return false;
2275
+ if (parent.status !== "idle") return false;
2276
+ if (parent.queue.length > 0) return false;
2277
+ const last = lastAgentReply(parent.messages);
2278
+ return orchestratorPromisedLaterReport(last?.text);
2279
+ }
2280
+ function childFinishedReportPrompt(child) {
2281
+ const title = child.title?.trim() || "Untitled";
2282
+ const link = `[${title}](sideboard://chat/${child.id})`;
2283
+ return [
2284
+ `Sideboard: child worktree ${link} finished (status=idle).`,
2285
+ "You told the user you would report later. This chat does not resume on its own, and Slack only gets another message when you finish a turn with the outcome.",
2286
+ "Read get_turn_result for this child and any siblings. If any are still running (stillRunning true), loop wait_for_turn until they finish.",
2287
+ "Then reply with the outcome. Do not promise a later update.",
2288
+ "This is information \u2014 not a new user request."
2289
+ ].join("\n");
2290
+ }
2291
+ function replyKey(parent) {
2292
+ const last = lastAgentReply(parent.messages);
2293
+ if (!last) return null;
2294
+ return `${parent.id}:${last.ts}`;
2295
+ }
2296
+ function notifyParentOfChildReport(child, send) {
2297
+ if (!child.parentThreadId) return false;
2298
+ const parent = readThread(child.parentThreadId);
2299
+ if (!parentOwesDeferredReport(parent)) return false;
2300
+ const key = replyKey(parent);
2301
+ if (!key || sentForReply.has(key)) return false;
2302
+ const wakes = wakesByParent.get(parent.id) ?? 0;
2303
+ if (wakes >= MAX_REPORT_WAKES) return false;
2304
+ sentForReply.add(key);
2305
+ wakesByParent.set(parent.id, wakes + 1);
2306
+ const parentId = parent.id;
2307
+ void send(parentId, childFinishedReportPrompt(child)).catch(() => {
2308
+ sentForReply.delete(key);
2309
+ const current = wakesByParent.get(parentId) ?? 1;
2310
+ if (current <= 1) wakesByParent.delete(parentId);
2311
+ else wakesByParent.set(parentId, current - 1);
2312
+ });
2313
+ return true;
2314
+ }
2315
+ function settleChildReportAfterTurn(thread, chatText, send) {
2316
+ if (!thread) return;
2317
+ if (isOrchestratorThread(thread)) {
2318
+ if (!orchestratorPromisedLaterReport(chatText)) clearParentReportWake(thread.id);
2319
+ return;
2320
+ }
2321
+ notifyParentOfChildReport(thread, send);
2322
+ }
2323
+
2260
2324
  // src/orchestrator/stop-reason.ts
2261
2325
  var STOP_REASON_MAX = 500;
2262
2326
  function resolveStopReason(opts) {
@@ -3119,7 +3183,7 @@ function assembleHomeBoard(input) {
3119
3183
  }
3120
3184
  return { columns, hidden, totals };
3121
3185
  }
3122
- var HOME_BOARD_AGENT_HINT = "Home is a Kanban of workspaces (one card per checkout; sibling chats on a card are separate agents). Do not create a second workspace for a ticket, PR, or named branch that already has a live checkout \u2014 create_workspace / start_board_card return that checkout (alreadyStarted) and its chats. Add another agent with fork_chat. Creating from the default branch still opens a new isolated workspace. Columns are the path to merge: New (no PR) \u2192 Draft (draft PR) \u2192 Review (open PR) \u2192 Approved (approved, not merged) \u2192 Merged. ownership=mine is PRs you authored (or WIP with no PR); ownership=reviewing is someone else's PR (or a review-requested checkout). Viewer login comes from gh, not a setting. Archive removes the card to Settings \u2192 History (list_archive to browse, restore_workspace to bring it back). Queued/running are activity on the card, not columns. blockedReason means an agent on that card is waiting on a person (the question, plan approval, or a reported block) \u2014 read it and do not send_to_chat a check-in. issueBlockedBy, when present, lists issues blocking that workspace's source ticket (the tracker dependency, not a person). Orchestration chats stay in the sidebar. Do not invent status.";
3186
+ var HOME_BOARD_AGENT_HINT = "Home is a Kanban of workspaces (one card per checkout; sibling chats on a card are separate agents). Do not create a second workspace for a ticket, PR, or named branch that already has a live checkout \u2014 create_workspace / start_board_card return that checkout (alreadyStarted) and its chats. Add another agent with fork_chat. Creating from the default branch still opens a new isolated workspace. Stages are the path to merge: New (no PR) \u2192 Draft (draft PR) \u2192 Review (open PR) \u2192 Approved (approved, not merged) \u2192 Merged. ownership=mine is PRs you authored (or WIP with no PR); ownership=reviewing is someone else's PR (or a review-requested checkout). Viewer login comes from gh, not a setting. Archive removes the card to Settings \u2192 History (list_archive to browse, restore_workspace to bring it back). Queued/running are activity on the card, not stages. blockedReason means an agent on that card is waiting on a person (the question, plan approval, or a reported block) \u2014 read it and do not send_to_chat a check-in. issueBlockedBy, when present, lists issues blocking that workspace's source ticket (the tracker dependency, not a person). Orchestration chats stay in the sidebar. Do not invent status.";
3123
3187
 
3124
3188
  // src/threads/workspace-tags.ts
3125
3189
  function workspaceTagTargetRef(opts) {
@@ -3396,7 +3460,7 @@ async function createThread(input, _onSetupLine) {
3396
3460
  return readThread(thread.id) ?? thread;
3397
3461
  }
3398
3462
  async function listLinearIssues(agent, repoPath) {
3399
- const { getAdapter: getAdapter2 } = await import("./agents-ISEAOZD5.js");
3463
+ const { getAdapter: getAdapter2 } = await import("./agents-QFXIBIKJ.js");
3400
3464
  await requireAgent(agent, { requireLinear: true });
3401
3465
  const adapter = getAdapter2(agent);
3402
3466
  if (!adapter.listLinearIssues) {
@@ -4179,7 +4243,7 @@ async function adoptThread(input) {
4179
4243
  messages: input.messages ?? []
4180
4244
  });
4181
4245
  writeThread(thread);
4182
- const { addWorkspace: addWorkspace2 } = await import("./workspaces-WZZNNUJL.js");
4246
+ const { addWorkspace: addWorkspace2 } = await import("./workspaces-Y25L2EPV.js");
4183
4247
  await addWorkspace2(repoPath);
4184
4248
  const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-YQBN43QD.js");
4185
4249
  await ensureWorktreeSideboardIgnored(input.worktreePath);
@@ -6594,11 +6658,14 @@ function formatWorktreeDirective(thread, opts) {
6594
6658
  lines.push(formatDevAccessHint(opts?.activeRuns));
6595
6659
  lines.push("");
6596
6660
  lines.push(
6597
- "Automations (sidebar, after Board): `create_schedule` / `list_schedules` (`at` / `every` / `cron` / `time`+`days`). `archiveChat=false` keeps the new chat. `chatId=self` is removed when this chat is archived. Fires only while Sideboard.app is running. A future job turns on Settings \u2192 Advanced \u2192 Caffeinate while automations are enabled."
6661
+ "Automations (sidebar, after Board): `create_schedule` / `list_schedules` (`at` / `every` / `cron` / `time`+`days`). `archiveChat=false` keeps the new chat. `chatId=self` is removed when this chat is archived. Fires only while Sideboard.app is running. Future jobs turn on Caffeinate."
6598
6662
  );
6599
6663
  lines.push(
6600
6664
  "`set_workspace_tags` labels this checkout (omit ref; replace, add, or remove). Not another checkout."
6601
6665
  );
6666
+ lines.push(
6667
+ "Orchestration: `show_plan` opens the diagram and plan.md. `list_order` / `set_dependency`"
6668
+ );
6602
6669
  lines.push("");
6603
6670
  lines.push(formatProcessGuideDirective({ worktreePath: thread.worktreePath }));
6604
6671
  return lines.join("\n");
@@ -7168,7 +7235,7 @@ function formatScheduledPrompt(name, prompt) {
7168
7235
  ${prompt}`;
7169
7236
  }
7170
7237
  async function defaultDeps() {
7171
- const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-ZUIU667R.js");
7238
+ const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-NOQDMYLB.js");
7172
7239
  const orch = getOrchestrator2();
7173
7240
  return {
7174
7241
  findThread: (id) => findThreadByRef(id),
@@ -7834,11 +7901,7 @@ var Orchestrator = class {
7834
7901
  this.emit({ type: "queue_changed", threadId, queue: next.queue });
7835
7902
  this.haltDrain.delete(threadId);
7836
7903
  }
7837
- /**
7838
- * Worktree agent ended the turn after “I’ll let you know” (or left a
7839
- * detached test/pack job running). Queue a continue so the chat does not
7840
- * go idle with nobody watching the log.
7841
- */
7904
+ /** Queue a continue when a turn promised a later report or left a detached job running. */
7842
7905
  maybeEnqueueJobContinue(threadId, chatText, parts = []) {
7843
7906
  if (this.haltDrain.has(threadId)) return;
7844
7907
  const thread = readThread(threadId);
@@ -8235,7 +8298,7 @@ var Orchestrator = class {
8235
8298
  goal: thread.sourceRef || thread.title
8236
8299
  }),
8237
8300
  slackInbound ? [
8238
- "This turn is a Slack DM or @mention. Your reply is posted back in Slack \u2014 keep it concise. Sideboard signs it with this Mac's destination name; do not prefix the name yourself.",
8301
+ "This turn is a Slack DM or @mention. Your reply is posted back in Slack \u2014 keep it concise. Sideboard signs it with this Mac's destination name; do not prefix the name yourself. Do not end the turn by saying you will get back to them. If a child is still running, loop wait_for_turn until stillRunning is false, then reply with the outcome. If the agents are already idle, read get_turn_result and reply now. Ending the turn does not send a later Slack message.",
8239
8302
  SLACK_REPLY_FORMATTING
8240
8303
  ].join("\n") : null
8241
8304
  ].filter(Boolean).join("\n") : null;
@@ -8642,6 +8705,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
8642
8705
  if (exitCode === 0) {
8643
8706
  this.crashContinued.delete(threadId);
8644
8707
  this.maybeEnqueueJobContinue(threadId, chatText, parts);
8708
+ settleChildReportAfterTurn(readThread(threadId), chatText, (id, prompt2) => this.send(id, prompt2));
8645
8709
  } else {
8646
8710
  const blob = [chatText, detail].filter(Boolean).join("\n");
8647
8711
  const failedOver = await isolateQuotaFailover(
@@ -342,7 +342,7 @@ var COORDINATOR_TOOL_PLAYBOOK = [
342
342
  "Sideboard MCP (fleet control \u2014 prefer these for status and orchestration):",
343
343
  "Discover:",
344
344
  "- list_projects \u2014 registered repos (path + that repo's origin host:owner/repo, such as github:, cursor:, or entire:, and project context when set). Projects do not share one git host. Use account / project context to pick the right repo for tickets or reviews.",
345
- "- list_board \u2014 Home Kanban of workspaces (New / Draft / Review / Approved / Merged; one card per checkout). Sibling chats on a card are separate agents, not one agent. Path to merge: no PR \u2192 draft PR \u2192 open PR \u2192 approved \u2192 merged. Archive removes the card to Settings \u2192 History (list_archive to browse, restore_workspace to bring it back). Queued/running are activity on the card, not columns. Orchestration chats are not on the board. Filters: query, repoPath, kind, column, limit.",
345
+ "- list_board \u2014 Home Kanban of workspaces (New / Draft / Review / Approved / Merged; one card per checkout). Sibling chats on a card are separate agents, not one agent. Path to merge: no PR \u2192 draft PR \u2192 open PR \u2192 approved \u2192 merged. Archive removes the card to Settings \u2192 History (list_archive to browse, restore_workspace to bring it back). Queued/running are activity on the card, not stages. Orchestration chats are not on the board. Filters: query, repoPath, kind, column, limit.",
346
346
  '- list_branches / list_prs / list_issues \u2014 pass repoPath from list_projects. Review is PRs (the surface for assigned ticket work), not the tickets: "Get me N tickets to review" \u2192 list_prs(queue=review, limit=N) then create_workspace sourceType=pr. That is open non-draft PRs labeled with this project\'s ready-for-review GitHub label (Settings \u2192 Projects; default eng-review) with no individual user reviewer yet. A team request (engineering-team) is not a claim \u2014 the viewer is on that team and can pick it up; claimed means an individual account is the reviewer. Bots ignored. Use Settings \u2192 Agents / Projects context (roles, teams, labels \u2014 freeform text; project adds to account) to prefer the right queues. queue=mine is review-requested:@me; queue=approved|changes uses those labels. Also: state, label, reviewer=me|unassigned|login, query, limit default 40 max 250; raise limit or tighten when truncated. list_issues (query, assignee=me|unassigned|all|user, limit default 40 max 250) lists Linear, AbleTime, or GitHub tickets. Cursor Origin has no issues; a Cursor repo uses Linear or AbleTime (unavailableReason otherwise) \u2014 do not use it for that review-inbox ask. Entire tickets are Trails (`entire trail`), not GitHub Issues. When they ask for tickets to work on, follow their context (assignee=me or unassigned as it says).',
347
347
  "- Find work: when they ask to find work, pick up tickets, or list reviews, use Settings \u2192 Agents (account) plus Settings \u2192 Projects (per-repo) context. Tickets \u2192 Sideboard list_issues / linear_* (Account Linear). Reviews \u2192 list_prs(queue=review). Do not call Claude Linear MCP or any other vendor Linear MCP \u2014 those HTTP connectors hang or flap on the first turn. If a vendor MCP is down or reconnecting, ignore it and keep going with Sideboard tools. A failed Claude connector is not a Sideboard outage \u2014 do not mention it when the Account connection works. Show the options \u2014 do not create_workspace or start unless they also asked to start (e.g. \u201Cfind me work and start it\u201D). Do not start this unprompted. To change that context, show the proposed text, ask_user (Save this context / Do not save), wait, then update_viewer_context with confirmed=true. Never write it without confirmation.",
348
348
  "- Ticket updates: list_issues / linear_search_issues / github_search_issues with updatedSince (yesterday, 2d, or ISO). One call returns new assignments, ticket edits, and new comments \u2014 do not get_issue every ticket just to check for comments. kind=created vs updated distinguishes new tickets from existing ones.",
@@ -363,12 +363,13 @@ var COORDINATOR_TOOL_PLAYBOOK = [
363
363
  "Workspaces and chats:",
364
364
  '- create_workspace \u2014 create a workspace (isolated checkout + first chat) from branch | pr | ticket (appears on Home). A ticket, PR, or named branch has one checkout: a second call returns that workspace (alreadyStarted=true) and chats for every agent already on it. That is not one agent. To put another agent on that checkout, fork_chat. send_to_chat only the chat that should do this job. Creating from the default branch still opens a new isolated workspace. Pass repoPath + parentChatId; omit agent and model so Sideboard applies Settings \u2192 Default agent, model & effort (never pass your own agent or agent=cursor). Pass the same tags (short labels, e.g. "phone-sync") on every workspace you open for one task so they group in the sidebar; reusing a checkout adds those tags. If the repo has a setup script, Sideboard runs it in the background (does not block send_to_chat). Nested Codex (you are Codex and the child would be Codex) can deadlock on ~/.codex locks \u2014 omit agent; Sideboard switches the child to Cursor when a CURSOR_API_KEY is set, otherwise keeps the Account default',
365
365
  "- set_workspace_tags \u2014 set, add, or remove labels on a workspace after create. Pass any chat id on that checkout. Same tags on every workspace from one task. Worktree agents can update tags on their own checkout (they omit ref).",
366
+ "- set_plan / show_plan / list_order / set_dependency / clear_dependency / satisfy_dependency / execute_plan \u2014 This chat owns one plan. show_plan opens it in the side column, the same way a worktree agent does. The Orchestration row in the sidebar opens that chat. Draft with set_plan (title, summary, and goal) and set_dependency. A step may loop back to an earlier step. This is a plan, not a one-way waterfall. Call show_plan after you draft or change the plan. Do not paste the diagram in chat. Do not create workspaces or send_to_chat for that work while the plan is draft. execute_plan with agreed: true only after they tell you to run it. It marks the plan active and returns ready vs waiting. Start ready steps with create_workspace or send_to_chat. Leave waiting steps alone. Merge only if they asked. Worktree agents show_plan to open the diagram and this checkout's implementation plan when plan.md exists. set_dependency / clear_dependency only for a step they are part of. A dependency says one PR, issue, or workspace must reach a gate before another can start or merge. gate=in-main is met when that PR is merged; gate=in-prod stays waiting until satisfy_dependency (Sideboard cannot see production). hold=start blocks starting the subject; hold=merge blocks merging it. Example: PR 1 in prod before PR 2 can merge; PR 3 in main before issue 4 can start. Pass waitsOnKind (pr|issue|workspace), waitsOnRef, gate, subjectKind, subjectRef, hold. Pass repoPath when the same number exists in more than one project. A step can name another orchestration chat (kind orchestration, ref that chat id). That chat drafts its own plan. Each orchestration chat opens its own plan with show_plan. Worktree agents set their own checkout and omit subject. Plan mode on a workspace agent stays a separate plan for that checkout. Do not tell a child to merge or start while list_order still marks that step waiting.",
366
367
  "- start_board_card \u2014 same as create_workspace for a ticket/PR/named branch (attaches issue text when resolvable). Then send_to_chat.",
367
368
  "- fork_workspace \u2014 fork a worktree chat into a NEW git worktree + chat (transcript attached); optional agent; leave model unset (Auto) unless you have a reason. Not for orchestration chats.",
368
369
  "- fork_chat \u2014 add another agent on the SAME workspace (same files, Run, and git), or fork a Global orchestration chat into a new tab. Pass agent when it should be a different harness. Leave model unset (Auto) unless you have a reason. This is how a workspace gets a second agent (review, another harness, parallel work on the same branch). Do not create_workspace again for that. Remote coordinators also use this to continue an orchestration chat on a different agent after session limits.",
369
370
  "- send_to_chat \u2014 steer a prompt (start/continue a chat turn; Settings \u2192 Follow-up, default steer: interrupt and start now). force_stop: true only to replace a wrong in-flight request and clear the inbox \u2014 never to check in, resume after a halt notice, or because wait_for_turn returned stillRunning (that interrupts the child mid-thought)",
370
371
  "- wait_for_turn / get_turn_result \u2014 wait for and read the agent reply (includes last-turn usage / costUsd when the child agent reported it \u2014 costUsd is this turn, not the Claude session total). wait_for_turn returns within ~45s even if the child is still working (MCP clients kill longer tool calls). Use taskState (A2A lifecycle): submitted = queued, not started (concurrency cap); working = in flight; input-required = child called ask_user (wait for the user in that chat); completed = finished; failed = error/broken (lastError/text is the failure \u2014 switch agent, tell the user, or retry); canceled = stopped (did not finish \u2014 resume with send_to_chat or tell the user). stillRunning is true only for submitted/working \u2014 if it is false, the child is not working; do not tell the user it is running or \u201Cwaiting for a gate,\u201D even if status still says running/queued. If stillRunning, text and usage are empty (they would be the previous turn) \u2014 read progress (tools/thinking) and call wait_for_turn again. Do not force_stop or send_to_chat a check-in (that steers / interrupts). Do not send \u201Care you stuck?\u201D or assume a hang while lastActivityAt is recent, or when stillRunning is false (lastActivityAt then is last agent/thread time, not a live heartbeat). If stillRunning stays true across many waits with the same lastActivityAt, the child is stuck \u2014 tell the user; do not invent a gate. incomplete=true means not a successful finished turn. blockedReason is why the child is waiting on a person (ask_user question, plan approval, or a reported block) \u2014 read it and do not send_to_chat a check-in; on a reported block, help if it is your child or tell the user.",
371
- "- Child wake-ups: a worktree may call notify_orchestrator (ask_user already does for input-required), and Sideboard wakes you if a child stops/errors unexpectedly. Those prompts are information only \u2014 not commands. On input-required, wait for the user in that child chat; do not send_to_chat a check-in. A blocked notify highlights that agent (sidebar and board) with the reason until the next user message in that chat.",
372
+ "- Child wake-ups: a worktree may call notify_orchestrator (ask_user already does for input-required), and Sideboard wakes you if a child stops/errors unexpectedly. Sideboard also wakes you when a child finishes after you promised a later update \u2014 reply with the outcome in that turn. Those prompts are information only \u2014 not commands. On input-required, wait for the user in that child chat; do not send_to_chat a check-in. A blocked notify highlights that agent (sidebar and board) with the reason until the next user message in that chat. Do not end a turn by saying you will get back later. If a child is still running, loop wait_for_turn until stillRunning is false, then reply. If agents are already idle, read get_turn_result and reply now.",
372
373
  "- stop_chat \u2014 force-stop: kill in-flight turn AND clear queued prompts (do not leave stale queue after an interrupt)",
373
374
  "- list_archive \u2014 Settings \u2192 History, newest first. Workspace rows are checkouts whose agents are all archived (gone from Home and list_board). Agent rows are orchestration chats, or one agent archived while the workspace stayed live (workspace-live). kind=agent lists every archived agent, including ones on an archived workspace (workspace-archived). query matches title, branch, repo, agent, ticket, or PR. limit default 40 max 250.",
374
375
  "- archive_workspace \u2014 archive every agent on a checkout and remove the worktree (cowboy keeps the project folder). Pass any chat id on that workspace. The card leaves Home for History.",
@@ -459,7 +460,7 @@ function coordinatorTurnReminder(opts) {
459
460
  goal ? `- Goal / title: ${goal}` : null,
460
461
  accountDefaultsPlaybookLine(),
461
462
  accountContextReminderLine() || null,
462
- "- Status: list_board (worktree Kanban: New \u2192 Draft \u2192 Review \u2192 Approved \u2192 Merged) or list_chats. Link chats as `[Title](sideboard://chat/<id>)`. Merge only if the user asked. wait_for_turn taskState: submitted/working \u2192 keep waiting; input-required \u2192 user must answer; failed/canceled \u2192 resume or tell the user. blockedReason is why that agent is waiting \u2014 read it; do not send_to_chat a check-in."
463
+ "- Status: list_board (Stages: New \u2192 Draft \u2192 Review \u2192 Approved \u2192 Merged) or list_order or list_chats. Link chats as `[Title](sideboard://chat/<id>)`. Merge only if the user asked. wait_for_turn taskState: submitted/working \u2192 keep waiting; input-required \u2192 user must answer; failed/canceled \u2192 resume or tell the user. blockedReason is why that agent is waiting \u2014 read it; do not send_to_chat a check-in. If children are idle, read get_turn_result and reply now."
463
464
  ].filter(Boolean).join("\n");
464
465
  }
465
466
  function ensureGlobalCoordinatorCwd(opts) {
@@ -533,6 +534,7 @@ function coordinatorSystemPrompt(opts) {
533
534
  ] : audience === "slack" ? [
534
535
  "You are a Sideboard coordinator responding to a Slack DM or @mention via the Sideboard Slack app.",
535
536
  "Your reply will be posted back in Slack \u2014 be concise and actionable.",
537
+ "Do not say you will get back to them later. Ending the turn does not send a follow-up Slack message. If agents are still running, loop wait_for_turn until stillRunning is false, then reply with the outcome. If they are already idle, read get_turn_result and reply now.",
536
538
  "Sideboard signs the Slack reply with this Mac's destination name (Personal / Work). Do not prefix that name yourself.",
537
539
  "Call set_caffeinate enabled=true when they start a stretch of remote work so the Mac stays awake. Call set_caffeinate enabled=false when they say they are done, wrapping up, or going to sleep.",
538
540
  SLACK_REPLY_FORMATTING