API Reference
Report run completion
/api/executor-callbacks/runs/{id}/complete
Delivered by the executor (via its durable completion journal) when a task run finishes. Idempotent: a late duplicate for a run already terminal via a user stop or a prior completion is skipped. A run marked terminal by the run reaper (terminal_source='reaper') is overwritten — the executor's journaled truth wins over the reaper's guessed failed verdict.
Operation IDexecutorCompleteRun
Authentication
- ExecutorKeyAuth
http bearerShared executor secret (ENVOY_EXECUTOR_KEY). Used by internal executor-to-control-plane routes (registration, heartbeat, completion/log callbacks).Internal executor authentication; use the shared executor key.
Path parameters
idintegerrequiredResource ID
Request body
This request body is required.
Content typeapplication/json
requestobject4 properties
executionIdstringrequiredExecutor-side execution correlation ID.
exitCodeinteger | nullrequiredSubprocess exit code. null indicates an abort without a numeric status.
completedAtstring · date-timeOptional ISO timestamp of when the task actually finished (journaled by the executor at exit). Preferred over the server's now so a late redelivery after control-plane downtime doesn't inflate duration_ms or stamp a wrong completed_at.
reasonstringOptional completion reason. executor_shutdown marks an infra-initiated interruption (deploy/restart) and is recorded as a failure, not a user cancellation.
Success response body
200Completion recorded (or skipped as a duplicate).
Completion recorded (or skipped as a duplicate).
Content typeapplication/json
responseobject2 properties
okbooleanskippedbooleanTrue when the run was already terminal from a user stop or prior completion and the duplicate was ignored.
Error responses
404Resource not found
Resource not found
Content typeapplication/json
responseobject2 properties
errorstringmessagestringExample response
{
"error": "NOT_FOUND",
"message": "Resource not found"
}