diagnose_task
Determine the status of a running task by analyzing heartbeat, logs, process liveness, and artifacts, then receive a conservative diagnosis and safe actions.
Instructions
v0.7.0: Diagnose a running or collecting_artifacts task using multi-signal evidence (heartbeat age, log freshness, child PID liveness, watcher ownership, artifact presence). Returns a conservative diagnosis (active_running, stale_running, possibly_stale_running, orphaned_running, artifact_collection_stuck, done_candidate, unknown, terminal) with confidence level and safe_actions. Never relies on a single signal; refuses to call PID-alive tasks 'active' when other signals are stale (PID reuse protection). Read-only — does not modify task state.
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": {
"task_id": "<task_id>"
},
"name": "diagnose_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | Task ID to diagnose | |
| include_logs | No | When true, include redacted stdout/stderr tails in the output. Default false to keep output minimal. |