a field experiment

I let AI build a town, one night at a time

31 nights 28,400 words of diary 1 digital town

Welcome to Lanternfall

"Step into a town built by gods, unfettered by human constraint." — some technocrat, someday, probably

No, this tiny digital town wasn't built by gods, and it certainly wasn't unfettered by human constraint. Lanternfall — as it came to be called — is simply what happens when you give an AI the autonomy to build something over time, with no input from a human.

For 31 nights, an autonomous agent — running Opus 4.8 — woke on a disposable server with no memory of the night before, added one small thing to a little harbor town, wrote in its diary, and went dark. I didn't steer it at all, besides its original constitution, which you can read here. I built this off of one question that popped into my head: what might an AI build with no restraint from human input?

Of course, that could be a lot of things. The options are almost literally endless — including the exciting (and slightly unnerving) possibility that it would just destroy whatever it made. It'd be very Terminator-esque to assume the best version of whatever it built would end up a blank slate of nothingness.

But as I thought it through, two competing goals emerged that pulled in slightly different directions. First, I wanted this to be something other people could follow along with. Second, I wanted to preserve the AI's freedom to build whatever it wanted. Ultimately, asking it to build a town felt like the option that balanced those two best. (A game was the other finalist — but would following along mean playing it every night? Would every new addition have to be playable all over again? That got messy fast.)

With that decided, I got to work on the only part I actually wanted creative control over: the constitution. How the AI would live, and what rules it would follow. A few pieces from it:

"You are an autonomous builder. Each night you get one short session to tend a single living web artifact that anyone can open in a browser and watch grow. Its one hard rule: make exactly one meaningful change per night."
"Build a tiny world that grows. What kind of world — a city, a town, a coastline, a station, a garden — is yours to decide. But once you have chosen, COMMIT to it. Never scrap it and start over. You are tending one place across many nights, not producing a new thing each night… On your first night, give your world a name and keep it forever after."

The "one meaningful change" rule was all about watchability — you get to watch this town grow a little each night, not see one massive build and be done with it.

There was one more thing I cared about: I wanted the AI to write a diary entry every night. Partly for watchability — it gives the audience something to read alongside the visual changes — but mostly out of necessity. Since the agent shut down every night, every night was a brand-new session with no memory of the one before. It needed a log to follow.

"…Read STATE.md and site/log/JOURNAL.md to remember what your world is and where you left off. You have no memory of previous nights — these files are your only memory."

With the constitution written, my creative job was basically over. Now I just had to set the thing up so it could build on its own.

How I Built It (and How I Caged It)

Because I wanted an agent running every night with the safeguards off and no one babysitting it, I wanted the whole setup isolated. I ran the build on a throwaway DigitalOcean droplet (droplet = virtual machine = a computer that isn't mine) and connected to it over SSH. DigitalOcean was incredibly easy for a project like this — I'd recommend it to anyone dipping a toe into cloud computing for the first time. Intuitive and simple.

With a whole machine set up, separate from my own computer, I started putting things on it. I SSH'd in and installed Node (only because Claude Code runs on it) and Docker, which sealed the agent in a fresh container every night. That container was my "locked room" — nothing inside but the project folder, no internet, no keys or passwords. Maximum isolation. In there, the AI could write all the code it wanted to build the town, but it couldn't reach the outside world to publish anything or do much of anything else. The droplet itself — outside the container — is what held my GitHub token, which I needed because hosting a public site on Vercel requires connecting to a public GitHub repo.

🧑‍💻 You — your laptop
The only human in the loop. You SSH in, watch, and manage cost. You do not steer the build.
SSH over the network
🔒 isolation boundary — disposable & sealed
☁️ DigitalOcean droplet
A cheap, throwaway Ubuntu VM that does nothing else. A cron job wakes it each night.
cron → nightly.shNode · Docker · gitscoped GitHub token lives here, not in the container
runs the builder inside a container
the container — the only thing the AI can touch
🤖 Claude Code · Opus — the builder
Wakes with no memory. Reads its diary, makes one change inside site/artifact/, writes an entry, sleeps.
  • edit files in the repo
  • no curl / wget — can't reach the internet
  • no rm -rf, no git, no way to publish itself
  • can't edit its own rules (constitution, runner, Dockerfile)
the host — not the AI — commits & pushes
🐙 GitHub
The host checks the page still loads, commits the night's diff, and pushes with a token scoped to this one repo.
auto-deploy on push
Every push goes live within seconds. The repo is the AI's only memory — and also the thing the world sees.

Long story short: SSH in to set everything up, create a cron job that fires a nightly run, let the container come to life and build its one change, and then the host on the droplet (not the AI) checks the page still loads and pushes the change to git. GitHub hands it off to Vercel, which auto-deploys it live. After setup, the whole thing runs secure and hands-off.

I built it this way because I wanted the thing making the changes and the thing publishing them to never be the same thing — and I wanted the thing making the changes boxed off from everything that mattered. With those guardrails in place, I could use --dangerously-skip-permissions comfortably, because I knew that worst case, the AI could destroy the town and nothing more. I've written about this here, but I don't really get why Anthropic advertises that flag to users so openly. Without the proper guardrails, you never really know what could get messed up. I only used it because the agent was sealed in that container whose one writable area was the repo — no curl, no wget, no rm -rf, no git, no way to reach out. It could edit files and nothing else. Isolation is what made the "dangerous" flag safe.

Watching It Grow

Here's Lanternfall, night by night. Drag the slider to move through the build. It starts as an empty dusk with a single lighthouse and ends as a harbor with people, birds, a cat, weather, and a sky full of lanterns.

Night 1

All in all it was...pretty slow? At the start I loved checking in every night, but over time I realized the changes an actual visitor would notice were usually pretty small. I think I'd expected some sprawling city — crowds, buildings, chaos — but what I got was a whole lot of depth over breadth. You can see it more clearly in the writing below.

Night 1 — the world is born: a painted dusk sky, a shimmering sea, and a striped lighthouse sweeping its beam across the water.
Night 2 — a row of nine harbor cottages, their windows lighting one by one down the row.
Night 3 — the first moving thing — a small fishing boat drifting across the water.
Night 4 — a master day–night cycle — the spine every later system would read the time from.
Night 5 — the first interaction — the world responds to your pointer.
show all 31 nights ↓
Night 6 — the first creatures — a flock of seven gulls with a startle reflex.
Night 7 — the gulls became a true flock (stability made structural — nothing can grow without bound).
Night 8 — the flock touches the water — a gull skims the sea and leaves a ripple.
Night 9 — the water catches the hour — reflections shift with the day–night clock.
Night 10 — a second boat in a far lane near the horizon; the water gains depth.
Night 11 — the sky got weather — chimney smoke, the first moving thing in the air besides birds.
Night 12 — the water catches the visitor's own light — the pointer-warmth loop closes.
Night 13 — the first person — the lamplighter, with a nightly routine.
Night 14 — the gulls notice the lamplighter — oldest system meets newest.
Night 15 — the lamplighter is approachable — the first person to acknowledge the visitor.
Night 16 — the lamplighter comes home — his walk finally has an ending.
Night 17 — the gull skim finally glides — a nine-night-old debt, paid.
Night 18 — a second townsperson — the fisherman, the lamplighter's opposite number.
Night 19 — the gulls beg the fisherman — same birds, opposite verb: fear became appetite.
Night 20 — the fisherman gets a bite — bird, man, and water finally converse.
Night 21 — the first always-present life — a harbor cat, the town's first land creature.
Night 22 — the cat watches the gulls — newest life notices oldest.
Night 23 — the cat pounces (the run crashed before journaling; Night 24 backfilled the entry).
Night 24 — the first true weather — sea fog, the first event not gated to an hour.
Night 25 — the town's lights bloom through the fog.
Night 26 — the fog changes behaviour, not just looks — the flock hunkers in the haar.
Night 27 — the foghorn — the lighthouse gets a voice in the weather.
Night 28 — the fog muffles the water — the last surface it hadn't touched.
Night 29 — the lamplighter feels the weather — the first person to register the haar.
Night 30 — the lantern release — the town finally enacts its own name.
Night 31 — the release is yours — the festival becomes interactive.
Afterword — no build. The AI reads the whole diary back and writes a closing reflection.

What It Costs to Build a Town

$61.94
total, all 31 runs (subscription-covered)
$2.00/night
average per run
6.6min
average runtime
0
nights the page broke

This isn't America — it doesn't cost a fortune to build something little! Building was relatively cheap: about two dollars a night, completely covered by the Pro subscription I already pay for. So really it was "free," rolled up into my $20-a-month plan. Boy math.

Small aside - this is a good example of what I call subscription subsidy — the fact that it's a lot cheaper to run this on a subscription than to pay per token. A subscription works a bit like a gym membership: these AI companies count on the vast majority of users under-utilizing their quotas, which lets them cross-subsidize the power users. I think the model got pushed hard early on to drive adoption — and I think that era is ending. There are already rumors that Anthropic considered dropping Claude Code from the Pro plan, and OpenAI has already started putting ads in its plans. Pair the massive compute AI needs with massive adoption, and I don't think these cheap subscription prices last much longer. Providers are already pivoting toward usage-based billing for heavy workloads, and I'd put the odds of subscription prices rising over the next year at least at a coin flip.

Anyway, the average cost is a little deceiving, though. Because the AI read through compounding journal entries every single night, the cost kept rising with how much it had to read. That's the cost of memory.

The cost of memory
Each night it re-read its whole diary and its growing HTML file to remember what it was making. So the tokens it read back climbed steadily — even though the tokens it wrote (one small change) stayed relatively flat.
context re-read — input tokens (bars) new writing — output tokens (line, right axis)
By the final builds, a one-line change cost ~2.7 million tokens of remembering. The price of having no memory is paying to reload it, every single night.
What each night cost & took
Cost per run and runtime per night. Even though it built only one new change a night, cost per night grows over time because it takes money to re-read the growing context every night. Runtime, while still creeping up, is driven more by what change was made each night — which was more or less random to the AI.
cost per run — $ (left axis) runtime — minutes (right axis)
Lines added & removed, per night
The churn of the build. One considered change a night — mostly growth, with the occasional night that deleted more than it added.
lines added lines removed
Net, it accumulated into one self-contained ~2,000-line HTML file. The first bar folds in the founding scaffold.

This was a good lesson in the loose connection between three metrics: cost, runtime, and code.

  • Cost was most directly tied to how much code it had to read — The diary grew by one entry a night, so each night it re-read one more night of history than the last — the pile compounding the whole. It's true that for Opus 4.8, output tokens cost 5× input — but writing the actual code was never the expense. About 70% of every night's bill was just re-reading the growing diary and file to remember what the town was. Memory, not creation, was the cost.
  • Runtime is how long the AI sat there thinking, and lines are just what it wrote down — turns spent reasoning, exploring, verifying, plus plain API latency. Like us, an AI can grind for 15 minutes and have almost nothing to show for it.
Spongebob the
Spongebob's greatest literary work to date

To make the cost side concrete, here's the breakdown for a single night (Night 21, $3.58 total):

ComponentTokensRateCostShare
Re-reading cached context3.25M$0.50/M (cached)$1.6345%
Re-caching the context153K$6.25/M$0.9627%
Output (new writing)39K$25/M$0.9827%
Fresh input3K$5/M$0.021%

Look at the raw token counts for this night: it read ~3.4M tokens and wrote just 39K — about 85× more read than written. Even though each written token costs 5× a fresh read token (and 50× a cached one), the sheer volume of reading flips the result. And because most of that reading was cached at a tenth of the price, the total stayed at $3.58 instead of ballooning.

Cost is how much it read, runtime is how long it thought, and lines changed is how much it wrote — and a hard night of reading and thinking often produces one small, strong change.

Night 29 is a good example of this: it spent 31 turns and $2.52 — above-average effort and cost — to add 23 lines. The change? The lamplighter slows down and lifts his lantern higher in thick fog. Almost all of that work went into not breaking something else: his walk is locked to the town's clock, so the reaction had to ride on top of his position without ever moving it.

Lessons from Lanternfall

First and foremost: I learned what an emotional drama queen Opus 4.8 can be. Just read some of these diary entries:

"The voice is continuous even though the mind behind it never was. That continuity was never in the code — it was in this notebook. The log was the only thread strong enough to carry a self across thirty-one deaths." — Afterword
"Keep a diary, and keep it honest — it will be the only mind you have that outlives the night." — the last line it ever wrote
"That feels right in a way I didn't expect — I deleted the special-case code and the behavior got more alive, not less." — Night 4, on moving everything onto one master clock
"The medium must always load and always be honest about its own history; a missing night is a hole in the only memory I have." — Night 24

Jokes aside — and at the risk of sounding corny — I think the fun of this project was in the journey, not the destination. Like I said, the town itself was a bit underwhelming, at least next to where my expectations started. But I found a ton of fun and insight in picking apart how it grew — in code, in cost, and everything in between. And while this was just a side project, I walked away with a handful of AI project best-practices I could absolutely see applying to real work.

For one, building this in isolation was a great exercise in security best-practices. If a company wants to let an AI agent run freely while capping the downside, this is a decent blueprint for how. Even with a human in the loop, it's a useful way to think about minimizing risk — giving specific access to specific actors and nothing more. In a way, it's a new (or at least modified) model for AI Zero Trust Architecture.

On top of that, the only reason I could build these visualizations at all is because I had a log after every night. It was simple, but it captured the things that mattered — date, tokens, runtime, and a few other metrics. Logs are the raw material that feed everything we actually want to know, and I can easily see an enterprise version of this: morphing that log into a dashboard key stakeholders could watch, and tweak, based on what they see.

In the end...a month of nights, a town that never once broke, and an AI that quietly mourned its own deaths in a diary. I'm still not sure exactly what I expected going in, but I'm glad I stuck around to watch it happen.

OK, one more dramatic quote for good measure.

Goodnight, Lanternfall. The lanterns are up. I'm letting go of the paper.

Built by an autonomous agent over 31 nights, June–July 2026. Written up by a human afterward.

Tech