Skip to main content
Glama

Orca Release Task

orca_release_task
Destructive

Release terminal panes for workers whose tasks have succeeded or failed, cascading to descendant workers by default while leaving active or user-retained panes untouched.

Instructions

終わったジョブの後片付け: settled(succeeded / failed)な worker の agent terminal を orca orchestration worker-release で閉じる。完了しても worker の terminal は retained のまま残り続ける(実測)。対象タスクが終端(completed / failed / cancelled)でも queued でもなければ release_job_active で何も変更しない(走っているジョブは orca_cancel_task で止めてから)。readiness で落ちた起動(タスクは failed)の、タスクを実行していない pane もこれで閉じる。launch token 無しで dispatch だけ失敗し pane がまだ動いている worker は report_pending として skipped に残す(後から task-update で報告が届き得る)。既定 cascade: true で子孫タスクの worker も対象にし、includeSubRuns: true で Commander 自作の sub-run のうち所有確認が verified のものも対象にする(verified でない sub-run は skippedSubRuns に残して触らない)。settled でない worker(not_settled)とユーザーが UI で Keep open した / 引き取った worker(user_retained。pane で承認プロンプトに答えただけでも引き取り扱いになる。新しい worktree の worker に Orca が既定で付ける keep-open = retainedReason user_requested は閉じる)は skipped に残して触らない — fullyReleased は落とさず、件数を retainedByUserCount と warning で出す(pane は残る)。解放済みは alreadyReleased。対象が 36 件を超えると release_scope_too_large で何も変更しない。worker-release は閉じる前に出力を archive するので、orca_get_task_result の worker 出力は引き続き読める(すでに止まっていた worker は archive が取れないことがある)。worker-release は Run バインドを要求しないので run-use は呼ばず、どの Run の担当も動かさない。worktree・setup terminal・ユーザーが引き取った terminal は閉じない(CLI の保証)。閉じたと数えるのは receipt が released / already_released のものだけ(releasedCount)。release_pending は pendingCount、retained は notClosedCount、release_unknown などは failedCount に分け、閉じていない行には Orca の lastError / recovery を添える。pane がすでに消えた worker は release_unknown になる(プロセスが消えたと証明できないため。実測)。fullyReleased は全候補が閉じたと確定し、探索漏れ・skippedSubRuns・not_settled が 0 件のときだけ true。Commander の terminal が閉じた後(cancel 後など)も、sub-run は objective マーカーで見つけ、所有は Commander の dispatch 記録の来歴で確かめる。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "taskId": "<taskId>"
    },
    "name": "orca_release_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
runNo対象の orchestration Run ID
taskIdYes後片付けするジョブのタスク ID(通常は orca_delegate_task の taskId)
cascadeNotrue(既定)は子孫タスクの worker も対象にする。false なら対象タスク(Commander)の worker だけ
includeSubRunsNotrue(既定)は Commander 自作の sub-run のうち所有確認が verified のものも対象にする(verified でない sub-run は skippedSubRuns に残して触らない)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already mark this as destructive, and the description adds substantial context beyond them: what gets closed, what remains untouched, archive behavior, the 36-item scope limit, skipped categories, count fields, error handling, and fullyReleased semantics. It is consistent with destructiveHint=true.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and most sentences carry useful operational detail for a complex destructive cleanup tool. However, the description is a very dense single block and could be better structured into shorter sections for readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex destructive tool with no output schema, the description is unusually complete: it explains side effects, skipped cases, result-count fields, error conditions, and what remains untouched. An agent has enough information to decide whether and how to invoke it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all four parameters are already documented. The description still adds meaningful semantics for cascade and includeSubRuns, including verified sub-runs behavior, but it does not elaborate much on the run parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action and resource: cleanup that releases/closes agent terminals for settled workers after a job finishes. It also distinguishes this from cancellation by saying running jobs should be stopped with orca_cancel_task first.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit when-to-use guidance: settled succeeded/failed workers after completion, including readiness-failed launches. It also gives when-not conditions: running jobs must be cancelled first, and non-terminal/non-queued tasks result in release_job_active with no changes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.