Cloudflare

I merged a Worker its own commit said not to merge

On 2026-09-29 I merged a Cloudflare Worker whose own commit message ended with “Not to be merged until tried under wrangler dev.” The merge was three minutes and 43 seconds after the commit. A Claude Code session wrote it, including the warning. It was the third PR I’d merged from that session in 15 minutes.

It was 86 lines and did one small thing. A request with Accept: text/markdown got the page’s committed .md twin instead of the HTML, and / got llms.txt. Browsers got the normal page, and other paths never reached it. Nothing was converted, so the markdown couldn’t drift from the page. The scanner at isitagentready.com sends that header; browsers don’t.

It worked live, and the scan that day came back Level 3, Agent-Readable, quick wins 5/5.

Less than three days later I deleted it. It came up during a housekeeping pass, and the reason was simple: it was the first code to run on a page request here.


The config

The commit added a main to wrangler.jsonc, and this under assets:

"run_worker_first": ["/", "/writing/*", "/projects/*", "/notes/*"]

Before that commit the site had no main, and no code ran on a page request. After it, a script that throws is an error on the home page.

requeststatic assetsWorker, 86 linespageHTML or .mdnow: no main in wrangler.jsonc2026-09-29: run_worker_firstno code on a page requesta script that throws breaks the home page

I’d also already turned down the same kind of trade. Six weeks earlier the plan was a Cron Trigger writing to KV, with pages reading it at request time, to keep repo stats fresh. The commit that rejected it calls that “running a Worker in front of a site that currently cannot fail, in exchange for decoration”. The star counts for the ten repos were 0,0,2,1,1,1,8,1,2,0. A script fetches the numbers at build time instead, the JSON gets committed, and no request-path code was added to get there.


What deleting it cost

The .md twins stayed at <page>.md, and the Link headers on / still point agents at llms.txt and the sitemap, so markdown is one request away either way.

An agent that only sends the header gets HTML now. I expected the scanner’s content-negotiation check to go red and took that.

wrangler.jsonc has no main again.