Smart Agent Teams
EndpointsRuns

Expire Stale Runs

Fail running runs whose runner stopped reporting. A run expires when its last heartbeat (or start time) is older than the lease, `RUN_LEASE_SECONDS` (default 300). Expired runs become `failed`, their running agents move to `error`, and budgets are enforced as for any finished run. Returns the expired run ids as `{"expired": [...]}`. `POST /runs/claim` does this automatically before claiming.

POST
/api/companies/{company_id}/runs/expire-stale

Fail running runs whose runner stopped reporting.

A run expires when its last heartbeat (or start time) is older than the lease, RUN_LEASE_SECONDS (default 300). Expired runs become failed, their running agents move to error, and budgets are enforced as for any finished run. Returns the expired run ids as {"expired": [...]}. POST /runs/claim does this automatically before claiming.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

company_id*Company Id
Formatuuid

Response Body

Successful Response

application/json
  1. response
[key: string]?any
curl -X POST "https://example.com/api/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/runs/expire-stale"
{}