inspect and recover a job

Choose the next action after a job result, disconnect or cancellation.

For: Advanced: job recovery and CI automation

reviewed 2026-10-06 · versions & availability

Use the job’s exit code and recorded state to decide whether to inspect, resume, retry or cancel it. Keep its job identifier and submission key. For an initial guided submission, use the Cargo check tutorial.

exit codes

Start with the command’s exit code:

Exit Meaning Next step
0 Command or followed job succeeded Inspect or download the result.
1 Workload outcome Read the compiler/test output or cancellation source.
2 Invalid, conflicting or refused request Fix the request or confirm workload support.
3 Authentication or scope failure Check the caller’s access.
4 No outcome observed The job may still run; inspect or reattach.
5 Terminal platform failure Inspect the evidence and retry if appropriate. This gives no verdict on the workload.
130 Client follow interrupted The job continues; reattach using its identifier.

For automation, request --json and read the failure classification. check, build and test emit an exit_code that matches the process status; diagnostics go to stderr. Use the CLI reference for the complete result contract.

disconnect and cancel

After Ctrl-C or a lost connection, inspect the existing job before submitting another one. Ctrl-C stops the client follow and leaves the cloud job running. Reattach with:

cargo sorus status <job>

To stop the job, request cancellation explicitly:

cargo sorus cancel <job>

Read the terminal result and recorded cancellation source. A timeout or upstream cancellation does not necessarily indicate a platform failure.

resume and retry

If a submission was interrupted, resume it with the original submission key and Cargo arguments. Follow source recovery to retain the original input and job identity.

After a terminal platform failure, use cargo sorus jobs retry <job> to submit a new, linked job. Apply your team’s retry policy and beta usage terms. Do not use a new job to replace a missing status observation without first checking the original job.

deadlines

Inspect the ceiling recorded on the admitted job when investigating a timeout. The platform contract allows at most six hours; a repository override or beta limit may be lower. The job records both the selected ceiling and its origin.

output delivery failures

If the workload succeeded but the client could not deliver its output, resolve the connection or access problem and retrieve the output again. Delivery failure can produce exit 4, or 3 for an authentication refusal. Check the named job before rerunning work that has already succeeded.