* Workspace-turn terminal output is NOT injected into parent history (unlike sub-agent reports); * it lives in the task handle store. So the wake-up must tell the agent to retrieve it with a * one-shot task_await (terminal already, timeout_secs: 0), not to keep waiting.
(handleIds: string[])
| 353 | * one-shot task_await (terminal already, timeout_secs: 0), not to keep waiting. |
| 354 | */ |
| 355 | function buildCompletedWorkspaceTurnPrompt(handleIds: string[]): string { |
| 356 | assert(handleIds.length > 0, "buildCompletedWorkspaceTurnPrompt requires at least one handle id"); |
| 357 | return ( |
| 358 | "Background workspace turn(s) have reached a terminal state: " + |
| 359 | `${handleIds.join(", ")}. ` + |
| 360 | `Call task_await now with task_ids: ${JSON.stringify(handleIds)} and timeout_secs: 0 to ` + |
| 361 | "retrieve their terminal output, then integrate it into your work. These handles are already " + |
| 362 | "terminal — do not repeatedly wait if task_await returns a terminal status." |
| 363 | ); |
| 364 | } |
| 365 | |
| 366 | function workflowRunTerminalOutcome(status: WorkflowRunStatus): TerminalAttentionOutcome { |
| 367 | switch (status) { |
no test coverage detected