Tasks

A task is what happens when you run an app.


Every run creates a task

Click "Run" on an app → task created.

Agent calls a tool → task created.

Flow executes → tasks created (one per step).


Task status

StatusMeaning
QueuedWaiting for a worker
RunningExecuting right now
CompletedDone!
FailedSomething went wrong
CancelledYou stopped it

Queued longer than expected?

Queued means the scheduler has not assigned a worker yet. That is normal when all matching workers are busy or starting up. The task is retried automatically; it does not fail just because capacity is momentarily full.

CauseWhat to check
Cloud backlog or maintenanceWait a few minutes; status should move to Running
Private infra, no idle GPUEngines — engine online? Workers configured?
App needs more VRAM or a specific GPU than any worker hasTask may stay queued until a suitable worker exists, or fail after expiring
Wrong infra for the appFails immediately (e.g. cloud-only app with infra: "private")
Plan concurrent-task limit reachedGET /entitlements/usage — concurrency usage vs limit; wait for other runs to finish. See Concurrent task limits

If no worker on a serving engine can run the task (wrong GPU, VRAM or infra, or no engine online), it fails on the scheduler's next pass with no online worker can run this app or an infra message such as this app does not allow cloud workers. If every matching cloud worker is held by another app's min_concurrency floor, the task waits 2 minutes from when the block is first seen, then fails with no online worker can run this app. If workers exist but are busy or leased, the task can stay Queued for up to roughly 24 hours before failing with task expired while waiting for available capacity, please retry.

→ Workers — how the queue interacts with cloud and private workers

Monitor backlog programmatically with GET /tasks/queue-stats — see Queue stats.

Failed tasks and error messages

When status is Failed, the task's error field explains what went wrong. Messages fall into two categories:

SourceWhat you seeWhat to do
Your appThe error your app raised (validation, model errors, etc.)Fix the input or app code; check task logs
PlatformShort, user-friendly messages (see table below)Usually safe to retry; see Troubleshooting

Platform failures intentionally omit internal details (worker reconnects, scheduler state, and similar). The full diagnostic is logged server-side.

Error messageTypical cause
task interrupted, please retryWorker disconnected, engine reconnect, or orphaned task cleanup
task could not be dispatched, please retryScheduler could not assign a worker at submission time
task could not be processed after multiple attempts, please retryTask stuck in Dispatched and exceeded retry limit
task expired while waiting for available capacity, please retryQueued too long (~24 hours) while matching workers stayed busy or leased
no online worker can run this appNo worker on a serving engine can run the task (GPU, VRAM, infra, or no engine online), or every matching cloud worker stayed held by another app's min_concurrency floor for 2 minutes after the block was first seen
none of the listed workers is onlineA private run pinned with workers, and none of those workers is online
no online engine has <capability>, which this task needsWorkers fit, but no online engine has a capability the task needs (for example the egress gateway); fails 2 minutes after the task was created
this app does not allow private workers / … cloud workers / … private or cloud workersThe task's infra is not allowed by the app
failed to prepare secrets for this app, please check your secret configurationMissing or invalid workspace secret for the app
Missing requirements: …A required secret or credential was not found at dispatch. This includes a provider you have no key for when no platform key admits the run: add your own key for that provider.
… no binding takes it, so not sent (a secret never reaches a run as plain text)Dispatch resolved a secret but could not bind it (for example a key its login no longer binds). The run fails closed instead of leaving the value in the environment.
the platform's lent secret …: no host its provider binds, so not sent …A platform key was granted to the run but its provider declares no bound hosts.
no online engine has … egress_host_any …, which this task needsEvery run with secrets or credentials needs an engine that reports both egress_gateway and egress_host_any. Update the engine or run on cloud.
failed to set up this app's upstream proxyPlatform egress proxy misconfiguration for this app (pool URL or policy options); contact support if runs keep failing. See Upstream proxy.
upload did not complete, please retryThe output upload never began (15 minutes after the move to Uploading), or did not finish within 1 hour
session worker busy too longSession worker still running a prior call (~30 seconds)
session worker offlineSession's leased worker is no longer available
session expired or not foundSession ID invalid or idle timeout elapsed

→ Task failure messages (REST API) · Sessions


What's in a task?

  • Inputs — What you provided
  • Outputs — What came back
  • Logs — Real-time progress (setup, build, serve, run, and task-level streams)
  • Timings — Phase durations (queue, prepare, setup, run) derived from status events
  • Telemetry: time-series CPU, RAM, GPU, and volume samples (~30s intervals while the task runs; API and web app charts)
  • Egress — When the task ran on an engine with an egress gateway, total bytes the sandbox sent and received through that gateway (egress.bytes_out, egress.bytes_in on the task). Omitted otherwise. → Task egress
  • Duration — How long it took
  • Worker — Where it ran

Execution logs

Each task stores logs by phase. In the web app you see these in the task runner; via API use GET /tasks/:id/logs or stream updates on GET /tasks/:id/stream.

PhaseWhat it captures
setupEnvironment and dependency initialization
buildContainer image build output
serveModel loading and serving
runApp runtime stdout/stderr
taskPlatform task messages

→ Get task logs · Stream task updates


Finding apps to run

Use Search or the web app's search bar to discover apps and skills before starting a task. Each run creates a new task with its own ID and status.


Viewing tasks

Go to Tasks to see history.

Click any task to see full details.

From a terminal: belt task list, belt task get <id>, belt task logs <id>. See CLI setup.


Following progress

In the web app, the task runner shows live status and logs. From code:

ApproachWhen to use
SSE streamLong-lived connection; updates as the task runs
CLI followbelt task get <id> -f or belt task logs <id> -f after --no-wait runs
Timings breakdownAfter the task finishes — belt task timings <id> or GET /tasks/:id/timings for per-phase durations
Resource telemetryAfter or during a run — GET /tasks/:id/telemetry or client.tasks.getTelemetry(id) (JavaScript SDK) for CPU/RAM/GPU samples
PollSimple loops or environments that block streaming

→ Stream task updates · Get task timings · Get task telemetry · CLI setup · SDK polling

Status values in API responses use numeric codes (for example 7 = Running, 10 = Completed). See Task status codes.


Cancelling

Running tasks can be cancelled from the web app or API. Status becomes Cancelled and the worker is released.

A cancelled task always ends Cancelled. If its app returned a result while stopping, or had already returned one that was still uploading, the task stays Cancelling until the upload finishes and then ends Cancelled with that result as its output, billed like any other. See Returning what you have.

Web app: Open the task in Tasks or the app runner and click Cancel while status is Running.

REST API: POST /tasks/:id/cancel — see Cancel task. Pass {"force": true} to skip graceful shutdown, or timeout (milliseconds) to control how long to wait.

CLI: belt task cancel <id> (graceful). Use belt task cancel <id> --force to end the run immediately. See CLI setup. What the app sees, and what happens if it does not stop, is in Graceful cancellation.

MCP: The platform MCP server exposes task_cancel for the same operation.

The platform requests a graceful stop by default. Apps with an on_cancel hook can clean up before exit; apps that do not respond within the timeout are force-terminated. See Graceful cancellation for app authors.

If the API already marked a task Failed or Cancelled while your engine was disconnected, a worker might still be executing it until telemetry after reconnect triggers a force cancel on that worker.


Deleting

You can remove finished tasks from your history in the web app or API. Deleting a task does not remove its files unless you ask for that.

Web app: On app runs, open the delete dialog for a task. Confirm delete, or enable also delete its input and output files to remove the platform files the task consumed or produced as well.

REST API:

  • DELETE /tasks/:id — remove the task record
  • DELETE /tasks/:id?files=true — delete its input and output files, then the task
  • GET /tasks/:id/files — list files linked to the task
  • DELETE /tasks/:id/files — delete files but keep the task

A task that is still queued or running answers 409; cancel it first.

JavaScript SDK: client.tasks.delete(id), client.tasks.delete(id, { files: true }), client.tasks.files(id), client.tasks.deleteFiles(id).

CLI: belt task delete <id> (add --files to remove platform files too), belt task files <id>, belt task delete-files <id>. Both delete commands prompt for confirmation unless you pass --yes. See CLI setup.

→ Delete task · List task files · Delete task files


Cost

Completed tasks record a cost breakdown (total, discounts, amount charged, refunds). Amounts are in microcents (1 microcent = $0.00000001; $1 = 100,000,000 microcents). To convert to dollars: dollars = microcents / 100000000.

Usage-based pricing uses output_meta that app authors attach to task output. That metadata is stored for billing but is not included in public task output responses.

GPU/CPU resource fees bill wall time from the last Dispatched status to a terminal status, measured to the millisecond. See Run time for resource fees.

→ Output metadata (app authors) · Usage-based pricing (CEL formulas) · Get task cost (API)

Cost is available after the task finishes. A 404 means no cost record exists yet (for example, the task is still running).


Webhooks

Pass a webhook URL when starting a run to receive a POST when the task reaches a terminal state (completed, failed, or cancelled). Use this for async workflows instead of polling task status.

Combine with wait=false on POST /run (or wait: false in the SDK) so your client returns immediately after the task is queued.

→ Task webhooks (REST API)

→ Task webhooks (SDK)


Next

→ Flows

we use cookies

we use cookies to ensure you get the best experience on our website. for more information on how we use cookies, please see our cookie policy.

by clicking "accept", you agree to our use of cookies.
learn more.