Dan Vernon
Work
Open source2025

hx

Developer infrastructure for consistent AI coding environments.

Terminal showing the hx CLI provisioning a reproducible development environment from a declarative config file.
hx resolves an environment definition into a running sandbox.

Problem

Coding agents are only as reliable as the environment they run in. A model that passes locally fails in CI because a toolchain version drifted, a system package is missing, or an environment variable was set by hand months ago. The cost is paid as flaky runs, irreproducible bugs and hours lost re-deriving setup that was never written down.

System

hx defines a development environment as a single declarative file: language toolchains, system packages, services and the commands an agent is allowed to run. The CLI resolves that definition into an identical sandbox on a laptop, in CI, or on a remote machine. Every environment is content-addressed, so two machines with the same definition are byte-for-byte the same.

Decision

Content-addressed environments over imperative setup

The tempting path was a setup script that mutates a base image. Instead each environment is derived purely from its definition and cached by hash. This makes builds reproducible and incremental — change one package and only that layer rebuilds — and it gives agents a stable contract to target rather than a moving filesystem.

Demonstrates

Developer tooling with a real reliability constraint: distributed reproducibility, caching strategy, and an interface designed for autonomous agents rather than only humans.