# What it's like to build a language with agents

Alfonso Campodonico · 2026-11-27 · https://alfonsocampodonico.com/posts/what-its-like-to-build-limen

> Agents can write a whole language now. Knowing what belongs in it is still the job.

## Why write about building it

The language from [Making a programming language](/posts/making-a-programming-language) has a name now: [Limen](https://limen-lang.org).

That post was about the compiler. This one is about the building: what it's like to make a language.

The short version: the code was the cheap part. Most of my work was deciding what the language is, asking whether what came back was any good, and saying no.

## How it went, in one minute

1. **Day one, in phases.** A design doc, then short prompts: start phase 2, start phase 3. 115 commits landed on 11 November.
2. **Parallel sessions.** Capabilities, language, runtime and packages, each in its own git worktree, with one main session merging them back.
3. **It compiled itself.** On day four a chain of agents rewrote the compiler in the language, one stage at a time, in about five and a half hours.
4. **Releases with a test.** A roadmap where each release has one goal and a way to know it's done, from 0.4 to 1.0.

It's like running a kitchen with a brigade that never gets tired. You don't chop anything. You decide the menu, taste every plate and send back the ones that aren't right.

## The deep dive

### Day one

It started as one question: what would it take to make my own language? I wanted it simple like Go, fast as Rust, and secure against remote code execution by default. Capabilities are how it gets the last one: a function can only do what it was handed.

By the end of the first day there was an interpreter, a C backend, fibers on a work-stealing scheduler, channels, sockets, a formatter, a test runner, an MCP server for coding agents, modules and packages. And an agent benchmark: five fresh agents with only the spec solved 50 of 50 tasks. The [first post](/posts/making-a-programming-language) has the details.

That pace is the strange part. A day like that used to be a semester.

### Four sessions at once

Once the core existed, I asked for worktrees: one each for capabilities, language, runtime and packages, all merged back into main. Each session got a brief that told it to stay in its area, because the main session does the merging. Later waves added the standard library, TLS, tooling, SQL and a round of ideas borrowed from C#, Go, PHP, Ruby and F#.

### It compiles itself

On day four I asked what it would take for the language to compile itself. The agent said start small, so we did: the lexer first, then the parser, and on up to C generation. Each piece had to produce exactly what the OCaml compiler did before the next one started.

By the evening it compiled itself, and its output matched the original's.

That rule, match it exactly before you move on, is what made it fit in an afternoon. An agent will happily spend half an hour making two outputs equal, and every difference points at a bug.

It also showed me what was missing. Without `mut` parameters, the compiler passes its state around by hand everywhere. Writing a real program in your own language is the fastest way to find what it lacks, and that one is now part of 0.8.

### Is it slop?

It's a fair question about a language agents mostly wrote. I don't think it is, and not because I read every line. The code has to agree with itself in ways that are hard to fake:

- **Two backends that must agree.** Every test runs in the interpreter and as a native binary, and the outputs have to match.
- **Sanitizers on the native tests.** A memory mistake fails a test instead of leaking in production.
- **It compiles itself.** A compiler that builds itself and gets the same output exercises nearly everything at once.
- **Fuzzers** on the parser and on everything that reads outside data: HTTP, JSON, URLs, CSV, time zones.

### Where taste went

Taste, here, is what I know about languages: the ones I've used, what I liked in them, and what would feel wrong in this one. An agent will add any feature you name. It can't tell you whether it belongs.

So most of my work was deciding what fits:

- **`unwrap_or` felt too Rust.** Limen isn't Rust with capabilities on top, so it became the `??` operator.
- **Borrowing from other languages.** C#, Go, PHP, Ruby and F# each have something worth stealing. Knowing which parts fit a small language built around capabilities is the part I brought.
- **Default parameters, but only constants.** Enough to stop callers passing the same thing every time, not enough to hide code in a signature.

None of those are things a test catches. They're the difference between a language and a pile of features, and they come from someone who knows what the language is for.

## What's next

- **The security model.** Why `main` takes `root`, and what a program can and can't reach. Still the next post about the language itself.

## What I learned

- **Make slop hard to hide.** Code that has to agree with itself, twice, catches what reading it won't.
