ssh_task_status
Check if a background process on a remote SSH host is still running by PID. Returns live status: running, exited, invalid, or error.
Instructions
Check the liveness of a background task by PID (from ssh_task_launch, or any other
real remote PID - e.g. the pid field from ssh_cmd_run). This does a live check on
the remote host every call, not a cached lookup, so it's safe to call repeatedly.
Returns:
{'pid', 'status', 'running' (bool, True iff status=='running'), 'timestamp'}.
status is one of:
- 'running': the process currently exists.
- 'exited': the process is gone - it either completed or was killed; there's
no way to distinguish which, or recover its exit code, from this tool alone.
- 'invalid': the given pid isn't a valid positive integer.
- 'error': the liveness check itself failed (e.g. connection issue) - this
does NOT mean the process exited, just that its status is unknown.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes | Process ID to check status for |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||