Skip to content

Concepts

Placement

Placement decides where a run may execute. By default a run uses your own private workers first and bursts to Bok Joy's cloud workers when they are full.

On this page

Pools#

Bok Joy runs attempts in pools of workers:

PoolWhat it is
privateMachines you run: a private worker, or the control plane's own slots on a self-hosted control plane.
cloudWorkers Bok Joy starts on demand in its cloud, sized for the run, and removes after 60 seconds idle, or sooner when other runs wait for the room.
burst-simulatedA local stand-in for cloud on a control plane on your own computer. It runs on the same machine.

Each attempt records its pool, so a run's history shows where every try ran.

Choose a placement#

A run's placement decides which pools may take it:

PlacementRuns on
private-firstPrivate capacity when it can fit the run, and cloud capacity otherwise. The default.
private-onlyPrivate capacity only. It never leaves your machines.
cloud-onlyCloud capacity only.

Set it per run when you trigger:

await tasks.trigger('reports.build', payload, {placement: 'private-only'});

A private-first run goes to the cloud only while no private worker that may take it has room. A draining private worker does not count. Children of a workflow, and runs a task starts with ctx.trigger, keep their parent's placement.

Use private-only for work that must stay on your hardware, such as jobs that read a database only your network can reach. The placement is part of the trigger's idempotency check: the same key with another placement is a ConflictError.

When nothing fits#

Bok Joy checks the run's size against every pool its placement allows when you trigger it:

  • No allowed pool could ever hold it: the trigger fails with a CapacityError that says what the run needs.
  • None can hold it yet, for example before a cloud machine exists: the run is accepted with a capacityWait. It starts once a worker that fits appears, and fails without an attempt if none does within an hour.

Runs and attempts covers the wait.

On the hosted alpha#

A cold run, one that has to start a new machine, started about 5 seconds after it was triggered in our October 8, 2026 measurement (median). A warm run, on a worker still inside its 60-second idle window, started in about 0.13 seconds. For warm starts every time, make the task a hot task.