bernstein_cancel
Cancel a root task and its entire subtask tree, preventing orphaned children. The orchestrator continues running other tasks.
Instructions
Cancel one task and its subtask tree; the orchestrator keeps running.
Posts to /tasks/{task_id}/cancel, which cascades through the
subtask tree (parent_task_id references) so children are not left
running after the parent is aborted. Cancellable statuses are
open, claimed, in_progress, blocked,
waiting_for_subtasks and planned. A task already in a
terminal state is reported with its current state rather than
cancelled again, and an unknown task id is refused. To stop the
whole orchestrator instead, use bernstein_shutdown_orchestrator.
Args: task_id: The root task to cancel. Its descendants are cancelled with it. reason: Optional reason recorded on the cancellation.
Returns: JSON with the cancelled root task, its status, and the count of cascaded descendants - or the task's current state when it was already terminal.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | ||
| task_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |