Skip to content

Nodes & the daemon

A node is a remote Linux machine that runs agent sessions. It runs the Halyard daemon, a lightweight worker process — bring your own laptop, server, or VM.

The daemon keeps a single persistent outbound WebSocket to the control plane. Crucially, there is no inbound listener on the node and no broker in the middle — every frame flows over that one connection. This is what lets nodes run behind NAT or a firewall without opening ports.

Over that connection the daemon:

  • registers the node and advertises its capacity and hardware profile;
  • heartbeats continuously so the control plane tracks health;
  • receives dispatches and streams live terminal output back.

When you dispatch a session, you choose which node runs it. If that node is online, the session dispatches immediately; if it’s offline, the session stays queued in durable storage and is dispatched the moment the node reconnects and reports capacity. You get durable-queue behavior without operating a queue.

If a node stops heartbeating past the timeout, it’s marked offline and any sessions assigned to it are unstuck and re-queued.

Every session runs inside a devcontainer — a declared, disposable environment rather than whatever toolchain happens to already be on the node. The daemon builds or pulls the container, mounts the workspace into it, and tears it down when the session ends. There is no fallback to running directly on the node’s own host. If the node can’t provide a container — Docker or the devcontainer CLI is missing, the daemon isn’t reachable, the resolved config is invalid, or (see below) the image can’t be pulled and nothing local covers it — the session fails outright, with that reason shown on the session’s page, rather than running unsandboxed.

Each session resolves its environment in one fixed order, stopping at the first source that applies:

  1. The project’s own configuration, if one is set (Settings → the project’s execution config). Wins over everything else.
  2. The repository’s .devcontainer/devcontainer.json — but only if the project has explicitly opted that repository’s configuration back in. A repository that ships a devcontainer config is skipped by default, even though the file is right there in the tree. See why your devcontainer might be ignored below.
  3. Halyard’s catalogue image, selected automatically by the languages detected in the repository (or a project override). This is the outcome for most sessions.

If none of these resolve — or the one that does resolve can’t be provisioned — the session fails; see when a node can’t get the image.

Halyard maintains six pinned, versioned catalogue images, each with the vendor AI CLIs already baked in: polyglot, node, python, rust, go, and jvm. Halyard picks one automatically by scanning the repository tree:

Signal in the repoImage
pyproject.toml / requirements.txtpython
package.jsonnode
go.modgo
Cargo.tomlrust
pom.xml / build.gradlejvm
Multiple languages, or none of the abovepolyglot

If detection picks the wrong image, or your project needs a specific toolchain version, override it explicitly in the project’s execution settings — that override is rank 1 above and always wins.

If your repository ships a .devcontainer/devcontainer.json, Halyard does not use it by default. This trips people up, so the reasoning is worth stating plainly rather than leaving it to look like a bug:

  • Only a small fraction of repositories ship a devcontainer config at all (well under 2% of GitHub repos, by a code-search measurement). Defaulting to Halyard’s catalogue image already matches what happens for most repositories regardless of policy.
  • A warm catalogue image gets an agent running in under a second. Building a repository’s own configuration takes on the order of 20 seconds cold, and still several seconds warm even with everything cached.
  • A devcontainer’s postCreateCommand can’t be baked into any image, so it reruns at the start of every session either way — container from the catalogue or one built from your own config. The catalogue doesn’t cost you that step; it only saves the image build on top of it.

If you want your repository’s own configuration honored, opt it in from the project’s execution settings in the app. Once opted in, your devcontainer.json resolves at rank 2 above, and Halyard builds and caches an image from it (by a digest of the config, so an unchanged config isn’t rebuilt every session). A bad config — one that fails to build, or fails validation — fails the session outright rather than silently falling back to a toolchain your repository never declared as sufficient.

A project-level configuration (rank 1) is restricted to image + features (plus containerEnv, remoteUser, and mounts scoped inside the workspace) — no build, dockerFile, or dockerComposeFile. A repository’s own opted-in config (rank 2) can use the full devcontainer.json spec, with the riskiest fields refused outright: initializeCommand (which would run on the node itself, outside any container) and privilege-escalating runArgs or mounts are rejected before the container ever starts.

Running containers requires rootless Docker and the devcontainers CLI on the node. halyard-node install sets both up automatically — see Register a node for what that does and the one step that needs root.

Every containerized session runs under a memory limit, so a runaway build or a leak in one session can’t take down the whole node. The default is 8 GiB, with the swap limit set equal to the memory limit, so a session can’t quietly spill into host swap once it hits the cap; the kernel ends the container instead.

Operators tune this with HALYARD_SESSION_MAX_MEMORY_MB on the node (MiB). Set it to 0 or none to disable the limit entirely. The node checks with the Docker daemon itself before applying the limit; if that daemon doesn’t report memory-limit support at all, the session still runs, just without the cap, and the node logs a warning rather than failing the session. If the daemon supports a memory cap but not a separate swap cap, the memory limit still applies without the swap half (also logged) rather than failing devcontainer up.

When a session ends because its container hit that limit, or because something outside Halyard killed it (an operator’s docker kill, a host -level OOM that didn’t go through the container’s own cgroup, a systemctl restart that didn’t go through a clean session stop), the session’s page says so plainly: “Out of memory: the session used its 8 GiB limit” or “Killed by SIGKILL from outside Halyard”, instead of leaving the failure unexplained.

Testcontainers, k3d, and any devcontainer feature that starts its own Docker daemon do not work inside a node-executed container. This is a deliberate limitation of rootless Docker, not a bug: a container running under a rootless daemon can’t build the nested user namespace a second layer of containers needs. The alternative — giving the node’s service account membership in the host’s docker group to work around it — was rejected because that group is root-equivalent on the machine, handing that level of access to the account running agent-authored code.

If your repository’s tests depend on testcontainers or k3d, either exclude them from the node run (the rest of the suite still runs normally) or run that suite through the cloud execution backend instead, which runs each session in a microVM with its own full Docker daemon inside. See Cloud usage & limits for what cloud compute includes on each plan — running on your own node, as described on this page, stays free and unlimited on every plan.

A node with no working container runtime at all (no Docker, no devcontainer CLI, the daemon unreachable) fails a session outright, naming the problem in plain language — for example, “Docker or the devcontainer CLI is missing, or the daemon isn’t reachable.”

A node that can run containers but can’t get the specific image a session needs is the same failure, for a narrower reason: the catalogue image pull failed and nothing local covers it. This is the case that matters for a node with no, or restricted, internet access — an air-gapped box, or one with no route to the public registry the catalogue publishes to. Halyard doesn’t silently degrade that node to running sessions unsandboxed; a session that needs an image the node can’t get simply can’t run there. Two ways to avoid it:

  • Pre-pull the image onto the node before dispatching to it, or point the node’s own configuration at a private mirror (HALYARD_CATALOGUE_IMAGE_<KEY> / HALYARD_DEFAULT_DEVCONTAINER_IMAGE) — either way, the image is already local, and no pull is attempted.
  • Set a project devcontainer image (rank 1, above) pointed at whatever registry that node can reach.

The failure names the image ref it couldn’t pull and suggests both options, so you’re not left guessing which one applies.

  • A session’s page shows the resolved image once containerized, and — when the session failed before that — the reason, in plain language.
  • A node’s entry on the Nodes page lists its capabilities (for example “Docker (rootless)” and “Devcontainer”), so you can tell before dispatching whether a node can run container-requiring work at all.

To view a dev server running inside a workspace, Halyard can open an ephemeral preview tunnel bound to a (workspace, port) pair and relay it to your browser — again without the node ever opening an inbound port. Tunnels track their own lifecycle and are swept when idle.

Register, monitor, and retire nodes under Nodes in the app. See Register a node to bring your first worker online.