Job lifecycle
run creates a persisted job and normally observes it briefly. The returned job_id identifies that same job for every later operation.
- Start. Run a command and retain the
job_id. - Inspect. Use
statusfor current state without waiting. - Observe. Use
waitfor a bounded observation window and the terminal exit code when available. - Read. Use
tailfor bounded, repeatable log excerpts and retained log paths. - Control. Use
killonly to explicitly cancel a running job, orrestartto start a new execution from its definition.
An observation deadline ending does not stop the managed command.
Default observation
run waits for up to 10 seconds by default. This catches many immediate startup failures in one agent turn. Use --no-wait when the caller must return immediately.
Reconnect later
agent-exec status "$JOB_ID"
agent-exec wait "$JOB_ID"
agent-exec tail "$JOB_ID"