_desktopdocs
guide

Troubleshooting

Failure modes, health checks, and how to reset when things go sideways.

Health checks first

For named desktops, use the API and noVNC ports printed by the launcher. The following example uses fixed ports for desktop-research.

bash
curl -f http://127.0.0.1:6080/vnc.html -o /dev/null
curl -f http://127.0.0.1:8095/api/health
docker logs desktop-research

/api/health probes the display with xdpyinfo and returns 503 if the display is unavailable. If you use Compose, read logs with docker compose logs.

Failure modes

SymptomCause / fix
Typing goes nowhereWindow not focused → windowactivate --sync first, or wait_for + focus in an actions batch
windowkill kills the wrong thingTitle too generic → make titles unique per worker
App invisible on screenMissing DISPLAY=:99, or minimized → windowactivate; check with search --onlyvisible
Nothing on screen at allXvfb crashed → docker compose logs -f; container should auto-restart (restart: unless-stopped)
Can't open displayEnv lost in your shell → pass DISPLAY=:99 explicitly
Container OOM / Chromium diesMemory cap hit → raise DESKTOP_MEMORY_LIMIT (default 3g) and recreate the container with docker compose up -d
Daemon unreachable from SDKCheck that Desktop({ host, port }) matches the published address or forwarded SSH port
Daemon returns 401Supply the desktop's bearer token to the agent or use Desktop({ token }) in the SDK
noVNC won't connect after setting a Compose tokenSet a separate DESKTOP_VNC_PASSWORD to enable viewer access from the host
Healthcheck never passesOne of the two probes failing — test both URLs above manually
Actions fail at step NRead failedAt + steps[N].note in the response — it names the exact step and reason

Debugging actions

Every failed batch tells you where and why it stopped, plus the state at that moment:

json
{"ok": false, "failedAt": 3,
 "steps": [{"i": 0, "do": "focus", "ok": true}, "...",
           {"i": 3, "do": "click", "ok": false, "note": "..."}],
 "state": {"pointer": [812, 61], "focused": "Chromium"}}

Pair this with a screenshot for full context:

ts
const r = await computer.actions(myBatch);
if (!r.ok) {
  await computer.screenshot(`fail-${Date.now()}.png`);
}

The nuclear option

The whole box is disposable — that's the point:

bash
docker compose down && docker compose up -d

Fresh desktop, same files: everything in /workspace survives because it's mounted from ./workspace on your host.

If the image itself is broken, rebuild from scratch:

bash
docker compose down --rmi local && docker compose up -d --build

Still stuck

  • Watch the boot log end to end: docker compose logs -f
  • Inspect inside: docker exec -it desktop-research bash (remember DISPLAY=:99 for anything GUI)
  • The automation playbook covers the reliable patterns (verify-before-type, unique titles, batching) that prevent most issues.