Summary
Improve final status summaries and JSON output for apify call and apify task run.
Problem
apify call and apify task run start cloud runs and stream logs. A run can start successfully but later finish as FAILED, TIMED_OUT, or ABORTED.
Agents need an explicit final run result, not just evidence that the run started.
Desired human-readable output
For failed runs:
Apify call result: FAILED
Run: FAILED
Actor ID: ...
Run ID: ...
Build number: 0.0.1
Exit code: 1
Dataset ID: ...
Key-value store ID: ...
Run URL: ...
Dataset URL: ...
Reason:
Actor process exited with code 1
<last relevant log lines>
For successful runs:
Apify call result: SUCCEEDED
Run: SUCCEEDED
Actor ID: ...
Run ID: ...
Build number: ...
Dataset ID: ...
Key-value store ID: ...
Run URL: ...
Dataset URL: ...
apify task run should follow the same final-status contract.
Desired JSON output
{
"ok": false,
"operation": "call",
"actor": {
"id": "...",
"url": "https://console.apify.com/actors/..."
},
"run": {
"id": "...",
"status": "FAILED",
"exitCode": 1,
"url": "https://console.apify.com/actors/.../runs/..."
},
"storage": {
"defaultDatasetId": "...",
"defaultKeyValueStoreId": "...",
"datasetUrl": "https://console.apify.com/storage/datasets/..."
},
"error": {
"phase": "run",
"message": "Actor run failed",
"logTail": []
},
"exitCode": 1
}
Acceptance criteria
apify call prints an explicit final result summary.
apify task run prints an explicit final result summary.
--json output includes ok, operation, run.status, and exitCode.
- Failed, timed-out, and aborted runs return non-zero exit codes.
- Agents can reliably distinguish “run started” from “run succeeded”.
Summary
Improve final status summaries and JSON output for
apify callandapify task run.Problem
apify callandapify task runstart cloud runs and stream logs. A run can start successfully but later finish asFAILED,TIMED_OUT, orABORTED.Agents need an explicit final run result, not just evidence that the run started.
Desired human-readable output
For failed runs:
For successful runs:
apify task runshould follow the same final-status contract.Desired JSON output
{ "ok": false, "operation": "call", "actor": { "id": "...", "url": "https://console.apify.com/actors/..." }, "run": { "id": "...", "status": "FAILED", "exitCode": 1, "url": "https://console.apify.com/actors/.../runs/..." }, "storage": { "defaultDatasetId": "...", "defaultKeyValueStoreId": "...", "datasetUrl": "https://console.apify.com/storage/datasets/..." }, "error": { "phase": "run", "message": "Actor run failed", "logTail": [] }, "exitCode": 1 }Acceptance criteria
apify callprints an explicit final result summary.apify task runprints an explicit final result summary.--jsonoutput includesok,operation,run.status, andexitCode.