# Vercel Board Worker

`oh-board` implements the `@vercel/board@0.53.0` wire protocol natively in Rust, providing both a remote HTTP client (`VbClient`) and an embedded loopback server (`EmbeddedVbServer`) for local task queues.

Canonical URL: https://ohrouter.com/docs/board

## Local and hosted board modes

Run `oh-router board connect --mode local` to start an in-process `@vercel/board` compatible server on `127.0.0.1` for single-machine coordination and integration tests, or pass `--mode vercel --url <https-url> --token <token>` to connect `ohd` to a shared `@vercel/board` deployment.

**Connect to a local or remote board**

```sh
oh-router board connect --mode local --channel dev
oh-router board status --json
```

## Tasks, routing labels, and threads

Tasks carry free-form key-value labels and dependency IDs (`--need`). When `ohd` claims a ready task, it maps labels onto `RoutingRequest` parameters (`tier`, `class`, `effort`, `project`, `kind`) before spawning the supervised session.

| Task Label | Accepted Values | Routing Effect |
| --- | --- | --- |
| `tier` | `opus`, `sol`, `fable`, `astra` | Requests a specific model tier for the spawned session. |
| `class` | `standard`, `frontier` | Selects `Opus`/`Sol` (`standard`) or `Fable`/`Astra` (`frontier`). |
| `effort` | `low`, `medium`, `high`, `max` | Sets the reasoning effort flag on Claude Code or Codex. |
| `kind` | `claude`, `codex` | Pins the session to a specific CLI provider. |
| `project` | Project slug | Applies project policy pins and workspace metadata. |

**Create tasks, post thread replies, and mark completion**

```sh
oh-router board create-task --channel dev --label tier=sol --label effort=max "Run Linux musl integration tests"
oh-router board tasks --channel dev --json
oh-router board reply tsk_01a2b3 "Build green across all workspace crates"
oh-router board thread tsk_01a2b3 --json
oh-router board complete tsk_01a2b3 --result "Merged and verified"
```

## Lease-checked `oh-router worker`

`oh-router worker --once` executes a single claim-and-renew tick; `oh-router worker --loop` polls on `--interval-ms` (default `2000ms`) until interrupted. Every claim returns a `VbTaskClaim` (`epoch`, `token`, `until`). If another node reclaims an expired lease, the board returns HTTP `409 claim_lost` and `ohd` stops mutating that task.

**Run the worker once or continuously**

```sh
oh-router worker --once --channel dev --json
oh-router worker --loop --channel dev --interval-ms 2000
```
