mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 08:37:49 +00:00
fix(orchestration): route dispatched workers to the skill and stop heartbeat loops before worker_done (#34404)
The orchestration skill description only advertised coordinator work, so a dispatched worker never loaded it and built its heartbeat loop from the preamble alone. Neither the preamble nor the guide said to stop a background heartbeat loop before worker_done, so the loop outlived the task. Add worker-role triggers (heartbeats, ask, worker_done) to the description and stub, and tell workers in the preamble and guide to restart an expired heartbeat loop mid-task and stop it before worker_done. Fixes #26605
This commit is contained in:
Generated
+5
-5
@@ -148,16 +148,16 @@
|
||||
{
|
||||
"name": "orchestration",
|
||||
"sourcePath": "skills/orchestration",
|
||||
"packageDigest": "195f26431ecfb6df41b941b22958a2330b110bac7b7e97004e0b35fe586e41d9",
|
||||
"packageDigest": "13530b8456bd56f4b06f95e848e9b99211eecaac2939aae49ed96da5a197c1f5",
|
||||
"files": [
|
||||
{
|
||||
"path": "SKILL.md",
|
||||
"size": 3671,
|
||||
"size": 3876,
|
||||
"executable": false,
|
||||
"classification": "text",
|
||||
"exactSha256": "cd1b364bf35781bad06bf75ab1766afa8d6cec69cb2060529691d89871a2098a",
|
||||
"textNormalizedSha256": "cd1b364bf35781bad06bf75ab1766afa8d6cec69cb2060529691d89871a2098a",
|
||||
"identitySha256": "cd1b364bf35781bad06bf75ab1766afa8d6cec69cb2060529691d89871a2098a"
|
||||
"exactSha256": "ce9a81cb2e6bbb8487107d2e088bf9fd6e0ba71ebc6bcc1929f827fde65fec6b",
|
||||
"textNormalizedSha256": "ce9a81cb2e6bbb8487107d2e088bf9fd6e0ba71ebc6bcc1929f827fde65fec6b",
|
||||
"identitySha256": "ce9a81cb2e6bbb8487107d2e088bf9fd6e0ba71ebc6bcc1929f827fde65fec6b"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Generated
+1
@@ -138,6 +138,7 @@
|
||||
"abb639ec034ab3f50fddf3dc02c4a041876c34278f529ec2c044c0cda7b74059",
|
||||
"b73c7c665aa233a782ba81982ebc954e220fdf1c1c6ca2b6bf38133c1cd76fc9",
|
||||
"cd1b364bf35781bad06bf75ab1766afa8d6cec69cb2060529691d89871a2098a",
|
||||
"ce9a81cb2e6bbb8487107d2e088bf9fd6e0ba71ebc6bcc1929f827fde65fec6b",
|
||||
"d37fa68601e6b383146976baf4ac28b1ecc8acef808394e9cede434a08be82ce",
|
||||
"d6490454f5a2814e98bb3848f05574beb81b7c5111295efd8c1d26c8b16bee4a",
|
||||
"e3b81f4d713f97a65a35ca5db0606939cebfdaade3daf1d709a76df1c869fd8a",
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
---
|
||||
name: orchestration
|
||||
description: >-
|
||||
Coordinate supervised Orca workers: threaded messages, blocking ask/reply,
|
||||
task dispatch, worker_done/escalation waits, task DAGs, decision gates,
|
||||
Coordinate supervised Orca workers, or work as a dispatched worker
|
||||
(heartbeats, ask, worker_done): threaded messages, blocking ask/reply, task
|
||||
dispatch, worker_done/escalation waits, task DAGs, decision gates,
|
||||
coordinator loops, and decomposing work across agents. Use `orca-cli` for full
|
||||
ownership handoffs — "hand off", "handoff", "handover", "give this to another
|
||||
agent", "another worktree" — unless asked to supervise, monitor, or coordinate
|
||||
@@ -81,7 +82,8 @@ The injected preamble is authoritative. A dispatched worker must:
|
||||
coordinator question. Never open a local question TUI the coordinator cannot
|
||||
answer. Resume the same message ID after an ask timeout.
|
||||
2. Send heartbeats only at the cadence in the preamble. A heartbeat proves
|
||||
liveness, not completion.
|
||||
liveness, not completion. If a background loop sends them, restart it if it
|
||||
expires mid-task, and stop it before `worker_done`.
|
||||
3. Read coordinator follow-ups at each natural checkpoint — before starting a
|
||||
new file, after a test run — and once more immediately before `worker_done`:
|
||||
`ORCA orchestration check --terminal <your_handle> --json`.
|
||||
|
||||
@@ -6,12 +6,13 @@ purpose so it can never drift from the binary that will actually run your comman
|
||||
|
||||
Engage Orca orchestration whenever you need structured multi-agent coordination: threaded
|
||||
messages, blocking ask/reply flows, task dispatch, worker_done/escalation waits, task DAGs,
|
||||
decision gates, coordinator loops, or decomposing work across agents. Use the orca-cli skill
|
||||
instead for full ownership handoffs ("hand off", "handoff", "handover", "give this to
|
||||
another agent", "another worktree") when the user did not ask to supervise, monitor, wait
|
||||
for results, or coordinate a DAG — and for ordinary terminal control, shell commands,
|
||||
worktree management, and the built-in browser. Coordination requires real Orca runtime
|
||||
state; never substitute a non-Orca subagent tool.
|
||||
decision gates, coordinator loops, or decomposing work across agents. Engage it as well
|
||||
when you are a dispatched worker sending heartbeats, `ask` questions, or `worker_done`. Use
|
||||
the orca-cli skill instead for full ownership handoffs ("hand off", "handoff", "handover",
|
||||
"give this to another agent", "another worktree") when the user did not ask to supervise,
|
||||
monitor, wait for results, or coordinate a DAG — and for ordinary terminal control, shell
|
||||
commands, worktree management, and the built-in browser. Coordination requires real Orca
|
||||
runtime state; never substitute a non-Orca subagent tool.
|
||||
|
||||
<!-- shared: resolver -->
|
||||
|
||||
@@ -22,9 +23,9 @@ ORCA skills get orchestration
|
||||
```
|
||||
|
||||
That prints the compact, version-matched guide for the exact binary that will handle your
|
||||
next commands. It covers the normal local coordinator loop. For a conditional action gate
|
||||
such as remote placement, uncertain release recovery, or expanded DAG work, load only the
|
||||
reference that gate names with
|
||||
next commands. It covers the normal local coordinator loop and dispatched-worker
|
||||
obligations. For a conditional action gate such as remote placement, uncertain release
|
||||
recovery, or expanded DAG work, load only the reference that gate names with
|
||||
`ORCA skills get orchestration --reference references/<file>.md`
|
||||
(`--references` lists the names). If that binary rejects `--reference`, run
|
||||
`ORCA skills get orchestration --full` and read the named bundled reference before acting.
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
---
|
||||
name: orchestration
|
||||
description: >-
|
||||
Coordinate supervised Orca workers: threaded messages, blocking ask/reply,
|
||||
task dispatch, worker_done/escalation waits, task DAGs, decision gates,
|
||||
Coordinate supervised Orca workers, or work as a dispatched worker
|
||||
(heartbeats, ask, worker_done): threaded messages, blocking ask/reply, task
|
||||
dispatch, worker_done/escalation waits, task DAGs, decision gates,
|
||||
coordinator loops, and decomposing work across agents. Use `orca-cli` for full
|
||||
ownership handoffs — "hand off", "handoff", "handover", "give this to another
|
||||
agent", "another worktree" — unless asked to supervise, monitor, or coordinate
|
||||
@@ -18,12 +19,13 @@ purpose so it can never drift from the binary that will actually run your comman
|
||||
|
||||
Engage Orca orchestration whenever you need structured multi-agent coordination: threaded
|
||||
messages, blocking ask/reply flows, task dispatch, worker_done/escalation waits, task DAGs,
|
||||
decision gates, coordinator loops, or decomposing work across agents. Use the orca-cli skill
|
||||
instead for full ownership handoffs ("hand off", "handoff", "handover", "give this to
|
||||
another agent", "another worktree") when the user did not ask to supervise, monitor, wait
|
||||
for results, or coordinate a DAG — and for ordinary terminal control, shell commands,
|
||||
worktree management, and the built-in browser. Coordination requires real Orca runtime
|
||||
state; never substitute a non-Orca subagent tool.
|
||||
decision gates, coordinator loops, or decomposing work across agents. Engage it as well
|
||||
when you are a dispatched worker sending heartbeats, `ask` questions, or `worker_done`. Use
|
||||
the orca-cli skill instead for full ownership handoffs ("hand off", "handoff", "handover",
|
||||
"give this to another agent", "another worktree") when the user did not ask to supervise,
|
||||
monitor, wait for results, or coordinate a DAG — and for ordinary terminal control, shell
|
||||
commands, worktree management, and the built-in browser. Coordination requires real Orca
|
||||
runtime state; never substitute a non-Orca subagent tool.
|
||||
|
||||
## Resolve the CLI for this session
|
||||
|
||||
@@ -51,9 +53,9 @@ ORCA skills get orchestration
|
||||
```
|
||||
|
||||
That prints the compact, version-matched guide for the exact binary that will handle your
|
||||
next commands. It covers the normal local coordinator loop. For a conditional action gate
|
||||
such as remote placement, uncertain release recovery, or expanded DAG work, load only the
|
||||
reference that gate names with
|
||||
next commands. It covers the normal local coordinator loop and dispatched-worker
|
||||
obligations. For a conditional action gate such as remote placement, uncertain release
|
||||
recovery, or expanded DAG work, load only the reference that gate names with
|
||||
`ORCA skills get orchestration --reference references/<file>.md`
|
||||
(`--references` lists the names). If that binary rejects `--reference`, run
|
||||
`ORCA skills get orchestration --full` and read the named bundled reference before acting.
|
||||
|
||||
@@ -3642,8 +3642,9 @@ const ORCHESTRATION_MARKDOWN = [
|
||||
"---",
|
||||
"name: orchestration",
|
||||
"description: >-",
|
||||
" Coordinate supervised Orca workers: threaded messages, blocking ask/reply,",
|
||||
" task dispatch, worker_done/escalation waits, task DAGs, decision gates,",
|
||||
" Coordinate supervised Orca workers, or work as a dispatched worker",
|
||||
" (heartbeats, ask, worker_done): threaded messages, blocking ask/reply, task",
|
||||
" dispatch, worker_done/escalation waits, task DAGs, decision gates,",
|
||||
" coordinator loops, and decomposing work across agents. Use `orca-cli` for full",
|
||||
" ownership handoffs — \"hand off\", \"handoff\", \"handover\", \"give this to another",
|
||||
" agent\", \"another worktree\" — unless asked to supervise, monitor, or coordinate",
|
||||
@@ -3722,7 +3723,8 @@ const ORCHESTRATION_MARKDOWN = [
|
||||
" coordinator question. Never open a local question TUI the coordinator cannot",
|
||||
" answer. Resume the same message ID after an ask timeout.",
|
||||
"2. Send heartbeats only at the cadence in the preamble. A heartbeat proves",
|
||||
" liveness, not completion.",
|
||||
" liveness, not completion. If a background loop sends them, restart it if it",
|
||||
" expires mid-task, and stop it before `worker_done`.",
|
||||
"3. Read coordinator follow-ups at each natural checkpoint — before starting a",
|
||||
" new file, after a test run — and once more immediately before `worker_done`:",
|
||||
" `ORCA orchestration check --terminal <your_handle> --json`.",
|
||||
@@ -3860,8 +3862,9 @@ const ORCHESTRATION_FULL_MARKDOWN = [
|
||||
"---",
|
||||
"name: orchestration",
|
||||
"description: >-",
|
||||
" Coordinate supervised Orca workers: threaded messages, blocking ask/reply,",
|
||||
" task dispatch, worker_done/escalation waits, task DAGs, decision gates,",
|
||||
" Coordinate supervised Orca workers, or work as a dispatched worker",
|
||||
" (heartbeats, ask, worker_done): threaded messages, blocking ask/reply, task",
|
||||
" dispatch, worker_done/escalation waits, task DAGs, decision gates,",
|
||||
" coordinator loops, and decomposing work across agents. Use `orca-cli` for full",
|
||||
" ownership handoffs — \"hand off\", \"handoff\", \"handover\", \"give this to another",
|
||||
" agent\", \"another worktree\" — unless asked to supervise, monitor, or coordinate",
|
||||
@@ -3940,7 +3943,8 @@ const ORCHESTRATION_FULL_MARKDOWN = [
|
||||
" coordinator question. Never open a local question TUI the coordinator cannot",
|
||||
" answer. Resume the same message ID after an ask timeout.",
|
||||
"2. Send heartbeats only at the cadence in the preamble. A heartbeat proves",
|
||||
" liveness, not completion.",
|
||||
" liveness, not completion. If a background loop sends them, restart it if it",
|
||||
" expires mid-task, and stop it before `worker_done`.",
|
||||
"3. Read coordinator follow-ups at each natural checkpoint — before starting a",
|
||||
" new file, after a test run — and once more immediately before `worker_done`:",
|
||||
" `ORCA orchestration check --terminal <your_handle> --json`.",
|
||||
@@ -5479,7 +5483,7 @@ export const BUNDLED_SKILL_GUIDES = [
|
||||
},
|
||||
{
|
||||
name: "orchestration",
|
||||
description: "Coordinate supervised Orca workers: threaded messages, blocking ask/reply, task dispatch, worker_done/escalation waits, task DAGs, decision gates, coordinator loops, and decomposing work across agents. Use `orca-cli` for full ownership handoffs — \"hand off\", \"handoff\", \"handover\", \"give this to another agent\", \"another worktree\" — unless asked to supervise, monitor, or coordinate a DAG, and for terminal control, lightweight terminal prompts, shell commands, Orca worktree management, and reading or waiting on terminals.",
|
||||
description: "Coordinate supervised Orca workers, or work as a dispatched worker (heartbeats, ask, worker_done): threaded messages, blocking ask/reply, task dispatch, worker_done/escalation waits, task DAGs, decision gates, coordinator loops, and decomposing work across agents. Use `orca-cli` for full ownership handoffs — \"hand off\", \"handoff\", \"handover\", \"give this to another agent\", \"another worktree\" — unless asked to supervise, monitor, or coordinate a DAG, and for terminal control, lightweight terminal prompts, shell commands, Orca worktree management, and reading or waiting on terminals.",
|
||||
markdown: ORCHESTRATION_MARKDOWN,
|
||||
fullMarkdown: ORCHESTRATION_FULL_MARKDOWN,
|
||||
aliases: [],
|
||||
|
||||
@@ -33,7 +33,8 @@ Don't post to Slack, GitHub, or other channels during the run; report through th
|
||||
# while actively working on the task. The coordinator uses this to
|
||||
# distinguish "still thinking" from "hung / crashed." Skip heartbeats only
|
||||
# while blocked inside \`check --wait\` or \`ask\` — those calls are
|
||||
# themselves liveness signals.
|
||||
# themselves liveness signals. If a background loop sends them, restart
|
||||
# it if it expires mid-task, and stop it before you send worker_done.
|
||||
#
|
||||
# Include BOTH taskId and dispatchId in the payload: the coordinator
|
||||
# attributes the heartbeat to the specific dispatch context, not just
|
||||
@@ -122,7 +123,8 @@ Don't post to Slack, GitHub, or other channels during the run; report through th
|
||||
# while actively working on the task. The coordinator uses this to
|
||||
# distinguish "still thinking" from "hung / crashed." Skip heartbeats only
|
||||
# while blocked inside \`check --wait\` or \`ask\` — those calls are
|
||||
# themselves liveness signals.
|
||||
# themselves liveness signals. If a background loop sends them, restart
|
||||
# it if it expires mid-task, and stop it before you send worker_done.
|
||||
#
|
||||
# Include BOTH taskId and dispatchId in the payload: the coordinator
|
||||
# attributes the heartbeat to the specific dispatch context, not just
|
||||
|
||||
@@ -67,7 +67,8 @@ export function buildDispatchPreamble(params: PreambleParams): string {
|
||||
# while actively working on the task. The coordinator uses this to
|
||||
# distinguish "still thinking" from "hung / crashed." Skip heartbeats only
|
||||
# while blocked inside \`check --wait\` or \`ask\` — those calls are
|
||||
# themselves liveness signals.
|
||||
# themselves liveness signals. If a background loop sends them, restart
|
||||
# it if it expires mid-task, and stop it before you send worker_done.
|
||||
#
|
||||
# Include BOTH taskId and dispatchId in the payload: the coordinator
|
||||
# attributes the heartbeat to the specific dispatch context, not just
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user