Self-hosted, image built 2026-09-23. I call POST /api/v2/workflows/{id}/execute synchronously, and as soon as it returns status: completed I fetch GET /api/v2/logs/{runId}.
Two things show up:
- Straight after execute returns, the log still says
status: running with endedAt: null. It's final a couple of milliseconds later.
- After the status is
completed, cost.total is set but cost.items is still null. This happened in 379 of 1,608 runs in one batch. The matching usage_log rows are written about 17ms after the log's ended_at.
My workaround is to poll until the status is terminal and cost.items isn't null. It would help if the log were complete before the sync execute returns, or if the docs said the log is eventually consistent and which field to wait on. Without that, telemetry built on the logs API quietly misses cost data.
Self-hosted, image built 2026-09-23. I call
POST /api/v2/workflows/{id}/executesynchronously, and as soon as it returnsstatus: completedI fetchGET /api/v2/logs/{runId}.Two things show up:
status: runningwithendedAt: null. It's final a couple of milliseconds later.completed,cost.totalis set butcost.itemsis stillnull. This happened in 379 of 1,608 runs in one batch. The matchingusage_logrows are written about 17ms after the log'sended_at.My workaround is to poll until the status is terminal and
cost.itemsisn't null. It would help if the log were complete before the sync execute returns, or if the docs said the log is eventually consistent and which field to wait on. Without that, telemetry built on the logs API quietly misses cost data.