Run sume doctor --agent --json as a CI preflight and keep the output
sume doctor --agent --json checks local CLI readiness without calling the API. Run it before job steps, fail on bad JSON or a nonzero exit, and keep the file.

sume doctor --agent --json inspects local readiness without calling the API, according to the CLI configuration docs. Run it as the first step of a pipeline, write its output to a file, fail the step on a nonzero exit or on output that is not valid JSON, and upload the file with the job logs.
What the docs promise
The pages I read do not document the JSON fields or which exit codes the command uses, so this recipe checks only the two things you can rely on: the process status and that the output parses. Add field checks after you read your own run's output.
| Command | Calls the API | Use |
|---|---|---|
sume version | No | Record the installed version |
sume doctor --agent --json | No, local only | Check local readiness |
sume auth status | Not stated | Confirm credentials are present |
sume balance | Yes | Check credit before paid steps |
Preflight script
Order matters: doctor first because it is local and cheap, then the paid work.
set -euo pipefail
mkdir -p ci-artifacts
sume version | tee ci-artifacts/sume-version.txt
sume doctor --agent --json > ci-artifacts/sume-doctor.json
python3 -c 'import json,sys; json.load(open(sys.argv[1]))' ci-artifacts/sume-doctor.json \
|| { echo "sume doctor did not return JSON" >&2; exit 1; }
sume auth statusKeep the evidence
Keep sume-doctor.json for failed runs. When you contact support, the file plus the job id and x-sume-request-id is the useful pair. Avoid committing it to the repository.
If it fails
If auth is missing, the troubleshooting page points to sume login for people and sume auth setup --api-key for automation; see the CI authentication recipe.
Sources
Related posts
More in Developers
- Sume Format run status is spelled canceled with one L: fix your switch
A Format run ends as completed, failed, canceled or skipped. If your code matches cancelled with two Ls, a canceled run will look like it never ended.
- Sume Free plan and Omni: one running, five queued, seventh gets 429
On a Sume Free workspace one video job runs and five wait; a seventh submit returns 429 queue_full. What that means for an Omni test batch and its cost.
- Sume image 400s name the valid values: retry in code
Sume's Image API 400 bodies carry details.supported, allowed, min and max. A tested error table and a small function that retries with a valid value.
- Sort Sume image models by created? The field is one shared value
GET /v1/images/models returns the same created timestamp for every model, so it cannot tell you which is newest. What to use instead, with a script to prove it.
Written by Sume