Quick start
Start a job, retain its stable job_id, then wait for a bounded completion result.
agent-exec run --until 1 -- sh -c 'echo started; sleep 3; echo finished'
# Copy the job_id from the JSON response:
job_id='paste-job-id-here'
agent-exec wait "$job_id" --until 5The commands use only agent-exec and a POSIX shell; no JSON parser is required. A successful wait returns a terminal state, exit_code: 0, and bounded stdout and stderr. Run agent-exec tail <job_id> for later or repeated log retrieval.
{"schema_version":"0.1","ok":true,"type":"wait","job_id":"<same id>","state":"exited","exit_code":0,"stdout":"started\nfinished\n","stderr":"","encoding":"utf-8-lossy","stdout_range":[0,17],"stderr_range":[0,0],"stdout_total_bytes":17,"stderr_total_bytes":0,"updated_at":"2026-07-20T00:00:00Z"}