Suman Patra.writing / urja

● Writing · Urja

Suman Patra · 3 parts · about 22 min read · October 2026

Nine small agents, one website, one five-hour session

A swarm of short-lived agents built a bespoke site for a real Mumbai studio. Two of them died mid-job. The session did not notice, because the session was never on a VM.

urja is a durable multi-agent session on Supabase: a deterministic lead, disposable workers, a queue with leases, and artifacts by reference. This is the architecture, the run, and every integration edge that cost time.

The urja systemA human and a lead talk to Supabase; specialist VMs claim one job each, report artifacts, and terminate; binaries go to Storage.◆ HUMAN · BROWSERtoken URL · poll 3s · chat◆ LEAD VM · TTL 290mlead.pypolicy engine · dashboard :80no LLM loop · deterministicSUPABASE · THE SESSIONsessions · agents · jobsmessages · artifacts · events17 security-definer RPCsanon: zero table grants◆ SPECIALIST VMone job, then dieopencode · free model30–75 min TTLSTORAGE · 32.2 MBagent-runs/s/…reads · talks15 RPCsclaim · report≤4 MB binarieslaunch / terminate · instance principal
fig. 1. The lead, the session, the swarm. Nothing important lives on a worker.

read in order, or jump

  1. part 1The architectureDurable session, disposable workers, a lead that is a policy engine, and a queue that remembers.
  2. part 2The runTwo hours, seven jobs, nine agent rows, two deaths, and a 53 KB site that passed five viewports.
  3. part 3What brokeEighteen failures, a green QA gate over broken copy, and the test that killed the live session.

the run, as a receipt

agent rows dispatched
9
specialist roles
6 + polish
jobs completed
7 / 7
wall clock, session start to publish
1 h 57 m
artifact rows
72
artifact bytes, 25 in Storage
32.2 MB
messages / events
30 / 55
site, one HTML file
53,479 B
QA viewports, px of overflow
5, 0
AI cost, free model pool
$0
box cost, whole session (est.)
≈ $0.60

part 1 of 3

The architecture

A five-hour job cannot live on a machine that is allowed to die. So the session became a database, the workers became disposable, and the coordinator stopped being an LLM.

The five-hour problem

The first agent died at 18:55:14Z, eleven seconds after its VM was created. It had been hired to write site copy. It never claimed the job. In most agent systems, that is where the story ends: a failed run, a lost tab, a retry from zero.

In this one, the copy was finished seven minutes later by a different agent on a different VM, and nobody wrote a line of recovery code for it. The lead did what it does every fifteen seconds: read the queue, saw a job assigned to a dead row, and hired a replacement.

That property is the whole design. A long task made of short-lived workers cannot keep its state on a worker. VMs are cattle. The session is the product.

The session here is a Supabase Postgres database. It holds the plan, the agents, the jobs, the mail, the artifacts, and the event log. Every other component is replaceable: the lead can restart, a worker can die, the dashboard can disappear with its VM. The work is in six tables.

Three primitives, kept apart

Strip an agent session to first principles and three jobs remain. Something has to do the work. Something has to check that the work happened. Something has to remember what occurred.

urja assigns those jobs to different things, on purpose.

jobwhohow
DoSpecialist VMsOne job per VM, one opencode run, then self-terminate
CheckThe deterministic leadArtifact gates, retry caps, lease expiry, deadline guard
RememberSupabase PostgresSix tables, append-only events, artifacts by reference

The separation is not stylistic. It is what makes a five-hour wall clock safe with thirty-minute workers. The workers have no coordination logic. They do not know that other agents exist, which phase the session is in, or what happens next. They claim one row, do one thing, report, and die. All planning lives in a Python file that can be read in one sitting.

Three layersThe session is durable in Postgres, the workers are ephemeral, and the evidence is stored by reference.→ 01 THE SESSIONdurable· 6 Postgres tables· 17 token-scoped RPCs· dedupe + 14-min leases· survives every VM death→ 02 THE SWARMephemeral· one job per VM· claim: for update skip locked· text ≤256 KB inline· report, then self-terminate→ 03 THE EVIDENCEby reference· 72 artifact rows· 32.2 MB, 25 in Storage· SHA-256 on every file· byte-identical publishreadswritesthe machine never lives on a VM
fig. 2. Three layers, three lifetimes: the session outlives the swarm; the evidence outlives the VMs.

The bus is a function call, not a table

The bus runs on a free Supabase project with a publishable key that is public by design. That key sits in every worker's /etc/urja.env, in the dashboard JavaScript, and in the URL the human opens. It cannot be treated as a secret, so it is not asked to act like one.

Instead, anon gets zero table grants. It can only call 17 named security definer functions, each of which takes a token and resolves it to a session or an agent row before it does anything:

sqlbus/schema.sql · the lockdown
revoke all on public.sessions, public.agents, public.jobs, public.messages,
              public.artifacts, public.events from anon, authenticated;

revoke execute on all functions in schema public from public, anon, authenticated;
grant execute on function public.rpc_agent_claim(text, uuid) to anon;
-- ...17 grants, one per function, and nothing else

The proof is one line: GET /rest/v1/jobs with the publishable key returns 401, while POST /rest/v1/rpc/rpc_human_state returns the session. The key can knock on seventeen doors and open none of them without a token.

Tokens are per row and random: one per session for the lead, one for the human, one for each agent. An agent token can claim only jobs in its own session, with its own role, assigned to itself or to nobody. A leaked worker token is a leaked worker, not a leaked session.

This is the cheapest security model that survives a public client: authorization in the function, not in the caller.

Leases, dedupe, and a job that survives its agent

The queue is a jobs table with a small state machine: pending → claimed → done | failed, with cancelled available and the lead allowed to reset a row to pending for a retry.

Claims are atomic and boring, which is the point:

sqlrpc_agent_claim (abridged)
select * into j from public.jobs
 where session_id = a.session_id
   and state = 'pending'
   and role = a.role
   and (assigned_to is null or assigned_to = a.id)
   and (p_job is null or id = p_job)
 order by priority desc, created_at
 limit 1
 for update skip locked;

-- claim = one UPDATE that sets the 14-minute lease and increments attempts
update public.jobs
   set state = 'claimed', claimed_by = a.id,
       lease_until = now() + interval '14 minutes',
       attempts = attempts + 1

Three properties fall out of this shape:

  • No double spend. for update skip locked means two workers cannot claim the same row, even if they wake in the same millisecond.
  • Crash recovery is a timeout. A worker that dies holds a lease, not a job. The lead's reap returns an expired claim to pending; after two attempts the job becomes failed and a message goes to the human.
  • Restart safety is a unique index. Every enqueue carries a dedupe key, and (session_id, dedupe) is unique. A lead that restarts mid-spawn cannot enqueue the same phase twice; the insert does nothing and returns the existing row.

That last property was tested by accident. The lead restarted five times during bring-up between 18:11 and 18:24, and still produced one research job, one analyst job, one build job. The in-memory spawned set is an optimisation; the database is the guarantee.

The worker has one job

A specialist VM boots from a shared image: Ubuntu, Docker, the oci CLI, and opencode. Cloud-init drops a role bootstrap script and a 600-mode env file, fetches a small gzipped bundle from Storage, and starts agent-worker.py as opc.

The worker then follows the same seven steps every time:

One job on one VMA worker claims with skip-locked, holds a 14 minute lease with heartbeats, runs opencode under a timeout, collects at most 40 artifacts, reports once, and terminates itself.CLAIMfor updateskip lockedLEASE14 minheartbeats 45 sRUNopencodetimeout 1,500 sCOLLECT≤40 filestext / binariesREPORTdone | failed+ artifactsDIEIMDS idinstance principalt+045 s≤ 1,500 s≤ 401 RPC~2 s
fig. 3. One job, one VM. The lease is 14 minutes; the heartbeat is 45 seconds; the runner has a hard timeout.
  1. Claim. Up to eight attempts, five seconds apart, filtered to its own role and assignment. No job means exit.
  2. Write the task. The job's task_md is written to task.md with a header that states the absolute working directory, because a child process inherits the environment but not the shell's PWD.
  3. Write the inputs. Text artifacts from upstream jobs are materialised into the work directory as files, so the agent reads them like normal files rather than parsing JSON from a prompt.
  4. Run. timeout 1500 opencode run --model … "$(cat task.md)". Most jobs use a free DeepSeek model; the builder uses opencode/big-pickle.
  5. Heartbeat. A thread renews the lease every 45 seconds. It is best effort: a failed heartbeat is noise, not a reason to stop working.
  6. Collect. At most 40 files. Text under 256 KB goes inline into the database; binaries under 4 MB go to a public Storage bucket under an unguessable session prefix. Every file gets a SHA-256.
  7. Report and die. One RPC closes the job with done or failed, the artifact list, and a short handover message. Two seconds later the VM asks the instance metadata service for its own OCID and terminates itself with the instance principal. The TTL is the backstop, not the mechanism.

The task header is worth quoting because it fixed the most expensive silent bug of the run:

textevery task.md begins with this
# Working directory
All paths are relative to /home/opc/work. Write every output file here with an
absolute path (for example /home/opc/work/result.md). The shell may start
elsewhere; cd /home/opc/work first.

The lead is a policy engine

The coordinator is 615 lines of Python, and none of them is a model call. Every fifteen seconds it does the same six things: heartbeat the session, reap expired leases, read the whole state, heal jobs assigned to dead agents, check the deadline, then apply the rules for the current phase.

The phases are fixed: boot → research → shortlist → brand → build → qa → publish → done, with a fix branch between the two QA passes. A phase advances only when the artifact it depends on exists and passes a content check:

phasejobadvance when
boot / researchresearchercandidates.json parses and lists at least 3 candidates
shortlistanalystchosen.json exists; the subject name is extracted from it
brandbrand, then copywriterboth brand-kit.md and content.md exist; brand unlocks copy
buildbuilderindex.html exists and is at least 4 KB
qaqaresult.json verdict is PASS; otherwise one fix round
publishleadindex.html exists; write the site, the archive, and the report
The phase machineBoot, research, shortlist, brand, build, QA, publish. Each phase advances only when its artifact gate passes; a failed QA gets one fix round.01BOOTspawn02RESEARCH≥3 candidates03SHORTLISTchosen.json04BRANDbrand + copy05BUILD≥4 KB html06QAverdict PASS07PUBLISH100%one fix round: fix-1 → qa-2deadline guard, T−10 min: publish what exists
fig. 4. Seven phases, six gates, one retry round. The deadline guard fires ten minutes before the session's deadline.

Two rules keep it honest. First, an agent can never move the session forward: it writes an artifact, and the lead decides what that artifact means. Second, a phase that fails twice stops the session with a message rather than looping. The lead prefers a declared failure to an unbounded retry.

This is deliberately not an AI loop. A five-hour LLM loop is unpredictable, expensive, and hard to restart. A policy engine is none of those things. The intelligence lives in the role prompts and in the artifacts; the coordinator only routes.

The human is a message, not a controller

The dashboard is 191 lines of HTML served by python -m http.server on the lead VM. It polls rpc_human_state every three seconds and shows phase, agents, jobs, the event feed, artifacts, screenshots, and a chat box. The human token is in the URL fragment, so it never reaches the server logs.

Chat is one insert into messages. The lead reads unread human messages on every tick and answers with a status, not with an action. There is no command channel, no approval button, no remote shell. That was the right scope for this run: the human could watch and ask, but the plan belonged to the machine.

At 19:24Z, with QA still running, the human asked the only question that mattered: "the link is website?" The lead answered with the phase, the job counts, and the next step. That is the entire human interface, and it was enough.

What we left out

  • No worker-to-worker messaging. The bus has rpc_agent_inbox and rpc_agent_send, and this run never called them. Handoffs are job inputs and artifacts. A mesh of agent conversations would have made the run harder to audit, not more capable.
  • No realtime. Polling three seconds against a free Postgres project is simpler than sockets, and the failure mode is a stale dashboard, not a broken session.
  • No durable dashboard. The console lives on the lead VM and dies with it. The session does not.
  • No durable hosting. Storage serves HTML as text/plain, so the rendered demo and the archived copy are two different promises. Part 3 is about that.
  • No git. The session captured artifacts, not diffs. That is the largest omission in the whole design.

None of these are architectural mysteries. They are scope cuts, declared before the run and repeated after it.

part 2 of 3

The run

Two hours of a five-hour budget, one free-tier box, six specialist roles, and a real studio that never asked for a website.

The brief and the box

The session opened at 17:55:52Z with a deadline of 22:55:50Z and a budget of five dollars. The goal was deliberately awkward: find a credible Mumbai wedding photographer with strong public reviews and no first-party website, then build a bespoke site for them from public facts alone. No brief from the subject, no brand assets, no interview. The machine had to earn the subject and then earn the design.

The box was a two-OCPU OCI VM in Hyderabad. The lead VM ran lead.py under systemd, served the dashboard on port 80, and launched specialists through the same agent-vm.sh tool used in earlier runs. Everything ran on free models. The estimated box cost for the whole session was about 60 cents; the AI cost was zero.

The first twenty minutes were not the run. They were bring-up: six lead restarts between 18:11 and 18:24 while the service, the bundle, and the boot path were fixed. The event log keeps all six. By 18:24 the lead was stable enough to hire its first researcher, and the phase machine begun.

Research: five candidates, 38 fetches

The researcher had one VM, forty minutes, and a hard cap of forty HTTP requests. It used curl with a browser user agent, slept two seconds between requests, and wrote a query log with the URL and HTTP status for every fetch. Instagram and Facebook were recorded as blocked rather than bypassed.

It returned five candidates, each with a platform URL, rating, review count, a website verdict, and quoted evidence:

studioratingreviewspublished ratewebsite
That Big Day4.8116₹60,000/daynone (parked domain)
Lensfixed Photo Works4.790₹55,000/dayhas one
Stories For You by Simreen4.9125₹80,000/daynone
Authentic Clicks5.0102₹70,000/daynone
Eternity Wedding Films5.092₹55,000/daynone

The analyst opened the evidence for the top three and checked the claims that mattered: the rating, the review count, the published rate, and the absence of a first-party site. It chose Stories For You by Simreen: 4.9 from 125 reviews (122 of them five-star), seven years on the platform, 313 portfolio folders, 75 albums, 39 films, Mumbai and Alibaug, and no site of their own. storiesforyou.in resolved to a GoDaddy parking IP and returned 403 with no MX; the .com resolved but failed HTTPS; the name variants were NXDOMAIN.

It also recorded the risks, which is the part agents usually skip: one long one-star review about colour and retouching sat at the top of the review list, several five-star reviews were near-duplicates, and the review stream had been quiet since July. The chosen file carries those risks into every downstream job.

The choice, in one paragraph

The positioning came from the evidence rather than from a slogan: a Mumbai studio that photographs one family's wedding as a continuous story, the courtyard in the city and the same faces at Alibaug, in stills and film, at the top of the market. The brand agent produced 1,108 words in 30 seconds: five voice rules against five banned phrases, a five-colour palette with usage ratios, a display serif and a grotesque, photography direction, a one-line job for each of ten sections, and three headlines. The copy agent then wrote the full site copy in 112 seconds, including the rate card, three verbatim reviews, five FAQs, and an explicit list of the facts it could not verify.

Both agents stayed inside the evidence. The copy does not invent an award, a client, or a price. Where a fact did not exist, it wrote a placeholder and said so, which is correct behaviour for a copywriter and a trap for a QA gate. More on that in Part 3.

The clock

Seven jobs ran. The table separates the job age (enqueue to report, which includes VM boot and claim waiting) from the worker run (claim to report, which is the work):

rolejob ageworker runmodelwhat it produced
researcher821 s553 sdeepseek-free5 candidates, 38 fetches, 40 artifacts
analyst689 s420 sdeepseek-freefinalists, chosen facts, 4 artifacts
brand303 s30 sdeepseek-free1,108-word brand kit
copywriter495 s112 sdeepseek-freefull site copy
builder942 s676 sbig-pickle53,761 B single-file site
qa1,957 s1,571 sdeepseek-freereport, 5 screenshots, 10 artifacts
polisher614 s342 sdeepseek-freefinal 53,479 B site

The fixed tax is visible in the gap: about four to six minutes per job for boot, claim, and teardown. Research and build are dominated by the work; brand and copy are dominated by the tax. That is why the lead did not try to run everything in parallel: on this free tenancy, a third two-OCPU VM was refused outright, so brand and copy were serialised on purpose after the first copy VM died.

Two deaths, two replacementsThe copywriter and QA agents died seconds after launch; the lead created new agents, retried the same job rows, and both finished.18:0018:3019:0019:30researcherdied18:1118:38copywriterdied18:5519:03qadied19:1919:52a job is not an agent: the same row moved to a fresh VM
fig. 5. Nine agent rows, two deaths, two replacements. The retried job keeps its identity; only the worker changes.

Two agent rows in the final table are dead. Both died within three seconds of creation, before they could claim: the first copywriter at 18:55:14 and the first QA at 19:19:30. Each was replaced within twenty seconds, and each replacement finished the same job row. The copy VM died because the tenancy refused a third concurrent instance; the QA VM hit the same ceiling while the builder was still winding down. The lead never treats a dead agent as a failed job. It creates a new agent, reassigns the row, and launches.

The site

The builder produced one self-contained HTML file of 53,761 bytes in 11 minutes: eight sections, four photographs, two Google fonts, inline CSS and JavaScript, no framework, no build step. The concept is "the city and the coast": a Mumbai courtyard on a Tuesday, the same family at Alibaug by Sunday, one continuous record in stills and film. The only ask on the page is a date check, because the studio's real constraint is availability, not leads.

The built site at 1600 by 1000: a cream editorial layout with a large serif headline and a Nauvari wedding portrait.
1600×1000 · hero, rate card, reviews, enquiry.
The same site at 390 by 844: single column, large headline, date check field.
390×844 · one column.

Concept website. Unaffiliated with the studio; built as an unsolicited design pitch. Facts were read from the studio's public WedMeGood profile on 24 October 2026. Photography © Stories For You by Simreen, served from their public WedMeGood portfolio and used here as placeholders; the originals carry the platform watermark. No enquiry from this page was ever sent anywhere.

The QA agent rendered the page in Playwright 1.55 on five viewports, forced lazy images, and recorded the mechanical facts:

viewportoverflowimagesconsolefontsh1sections
360×8000 px4/40 errorsloaded18
390×8440 px4/40 errorsloaded18
768×10240 px4/40 errorsloaded18
1200×9000 px4/40 errorsloaded18
1600×10000 px4/40 errorsloaded18

That is a real result. It is also an incomplete one. The QA verdict was PASS, and the page shipped with an email field reading [studio email to be supplied], a WhatsApp link that jumped to the top of the page, and a form that showed "Enquiry sent" while sending nothing. The gate was green; the page was not finished. The lead published, because the lead's rule was verdict == "PASS", and the verdict only covered layout, console, images, and headings.

Publish, twice

Publishing was two operations with one name. The lead wrote the final HTML to /site/index.html on the dashboard VM, where it rendered as a live page with a 240-minute host TTL. It also uploaded the same bytes to Supabase Storage at websites/demos/e5ebdb17-f05/index-v2.html, where the gateway serves HTML as text/plain by design. Local file, Storage object, and live host all hashed to 502586a6…. One was a demo; one was an archive; neither was a durable website.

The session marked itself done at 19:52:21Z, one hour fifty-seven minutes after it opened, with three hours of budget unused. The lead VM stayed alive until its TTL, which is how the dashboard and the rendered site outlived the work by a few hours. That is not a publishing strategy. It is a demo with a timer.

The run, as a receipt

Everything the machine claimed is traceable to a row, a file, or a hash. The full event log is 55 rows; the message log is 30; the artifact table is 72 rows and 32,179,461 bytes, of which 25 objects live in Storage. The subject's facts, the brand kit, the copy, the QA report, five screenshots, and four raw research pages are all in the same session, addressed by session id.

That is the difference between a demo and an experiment: the demo shows a page, the experiment can prove where every word on it came from.

part 3 of 3

What broke

Eighteen integration edges, one green gate over broken copy, one outage caused by the operator, and the lessons that survived the run.

Every failure below cost real time inside the session. None was a model failure. All of them were edges between systems that only appear when the thing is actually running: cloud-init metadata limits, psql variable interpolation, sudo's PATH, systemd's missing HOME, UTC parsed as local time, a tenancy that refuses a third VM.

The list matters because the architecture is otherwise ordinary. The interesting part of a multi-agent system is not the happy path; it is how many ways the environment can lie to an agent and still look like work.

Eighteen failures, grouped

They fall into five families. The full table is in the appendix; these are the ones that changed the design.

Cloud-init is not a payload channel

Detect. Launch rejected: "Metadata size is 86752 bytes > 32000".

Cause. The entire lead bundle was base64'd into metadata.user_data. The VM service accepts 32 KB, and base64 makes everything larger.

Fix. Upload the bundle to Storage and boot with --bundle-url; keep only the bootstrap script and a 600-mode env file in cloud-init.

psql variables do not interpolate under -c

Detect. ERROR: syntax error at ":" on the first session insert.

Cause. psql -c does not process :'var'; it passes the colon through to the server. The same script also read the INSERT 0 1 tag as a session id, because -c insert … returning prints both.

Fix. Feed SQL on stdin where variables work, and take the first line of command output. Every destructive or identity-bearing script now parses exactly one row.

sudo resets PATH

Detect. Worker exit code 127: "opencode: command not found", "no oci cli".

Cause. The bootstrap started the worker through sudo -u opc, and sudo resets PATH to /sbin:/bin:/usr/sbin:/usr/bin. Both binaries lived in /home/opc/.opencode/bin and /usr/local/bin.

Fix. The worker prepends both directories, and self-termination uses the absolute path. Never trust PATH across sudo or systemd.

cwd is not PWD

Detect. The agent reported success, and the artifact count was zero.

Cause. subprocess(cwd=WORK) changes the child's working directory but not the PWD environment variable. opencode spawned a shell that inherited the old PWD and wrote files into /.

Fix. Set os.environ["PWD"] and put an explicit absolute working directory at the top of every task. This was the most expensive silent bug of the run because nothing failed; the work simply landed somewhere else.

systemd has no HOME, and SELinux owns /var/log

Detect. The lead service restarted every ten seconds, then crashed on start with HOME: unbound variable.

Cause. StandardOutput=append:/var/log/… was blocked by SELinux on Oracle Linux; the script also used set -u and assumed HOME existed.

Fix. Log to journald and set Environment=HOME=/root. A unit needs HOME, PATH, and one smoke start before it is trusted.

All timestamps UTC, end to end

Detect. The laptop watchdog believed the deadline had passed and was about to sweep a live session.

Cause. time.mktime parsed a UTC string as local time (IST, −5:30), so the watchdog was five and a half hours wrong. A wrong watchdog is worse than no watchdog: it either kills a healthy run or never rescues a dead one.

Fix. calendar.timegm everywhere, and unit tests for the two time functions.

The tenancy is part of the architecture

Detect. The third concurrent two-OCPU VM failed with "resource creation limit reached".

Cause. The free trial caps E5 cores; two VMs were running, and the third launch was refused even though the quota page disagreed.

Fix. Serialise brand and copy, and let the retry path heal the doomed launches. Probe limits before designing parallelism; "parallel" is a budget, not a property of the code.

Storage policy is code

Detect. Bundle upload returned 400.

Cause. The bucket's MIME allowlist did not include application/gzip.

Fix. Extend the allowlist and version it with the rest of the infrastructure. A bucket policy is a deployment artifact.

The three that mattered most

  1. PWD (#5). Silent by construction. Nothing failed until the artifacts were counted, and a zero-artifact job looked like a model that had nothing to say.
  2. UTC (#8). A watchdog that is 5.5 hours wrong is an active hazard, not a safety net. It took a manual inspection of the deadline math to find it.
  3. The operator's own kill (#16). terminate-all urja-e5ebdb was run as a test against the live session. It killed the lead and the researcher. The only outage in the whole run was caused by the human, not the machine. Destructive tools need --dry-run by default and must print the plan before acting.

A PASS that should have failed

The lead's publish rule was exactly one line of policy:

pythonlead/lead.py · verdict()
a = artifact_content(s, "result.json")
verdict = str(json.loads(a["content"]).get("verdict", "UNKNOWN")).upper()
if verdict == "PASS":
    self.publish(s)

The QA prompt defined PASS narrowly: zero horizontal overflow at 360 and 390, no console errors, all images loading, exactly one h1. The QA agent did that job correctly and then, because it was a good agent, also reported nine production-readiness issues. The two most severe were in the same file that carried the verdict:

"No usable contact channel: email is [studio email to be supplied], WhatsApp [number to be supplied]… Only the WedMeGood profile link works." — result.json, severity high

and

"The form never sends anything… but reports 'Enquiry sent'… Enquiries are silently discarded." — result.json, severity high

The lead published. The gate was green because the gate was narrow, and the policy read only the field that the gate defined. The page then went to the live host with bracketed placeholders visible, and a human looking at it would have found the problem in seconds.

A late manual polish job fixed it: remove the dead channels, keep the concept disclaimer, make the form honest ("This is a concept preview"), fix the hero margins, carry the date field through, and republish as index-v2.html. The final copy is 53,479 bytes and hashes to 502586a6…. The lesson is not "the agent failed". The lesson is that the gate and the verdict must be the same size. If content matters, content is a gate; if the gate ignores copy, the verdict cannot speak for the page.

One word, two promises

"Published" meant two different things in this run, and the architecture never reconciled them.

Publish is two different thingsThe rendered site lived on the lead VM and died with it; the Storage archive is text/plain and cannot render. Both hold the same bytes.→ RENDERED HOST/site/ on the lead VMTTL 290 min · dies with the VMthe demo URL→ STORAGE ARCHIVEindex.html · 53,479 Bserved as text/plainthe durable copysame SHA-256502586a6…the host outlived its TTL by handone word, two promises
fig. 6. Same bytes, two lifetimes. The rendered demo died with the lead VM; the archive cannot render.

The rendered site lived at http://129.225.105.185/ on the lead VM, with a 240-minute TTL. The durable copy lived in Storage, where Supabase serves HTML as text/plain with nosniff. When the VM's TTL fired, the demo and the dashboard disappeared in the same second. The archive survived and still cannot be viewed as a page. Both statements are true, and neither earns the word "published" on its own.

The fix is boring and out of scope for the run: a static host or an Edge Function, a real domain, TLS, and a deploy step that is separate from the session. The artifact was correct; the delivery noun was not.

The only outage was mine

At 18:24 I ran a terminate test against the live session. The command matched the session prefix, which is exactly what a sweep should do, and killed the lead and the researcher. Recovery took a reset of the job rows and a relaunch; no work was lost because nothing had been produced yet. But the run's only outage was self-inflicted, and the handoff records it in the operator's own voice rather than dressing it as a machine fault.

The rule that came out of it is now non-negotiable: destructive commands are dry-run by default, print their target list, and require an explicit confirmation. A tool that can delete a fleet should be harder to use than a tool that reads it.

If we did it again

  1. Spend the first forty minutes on a vertical slice. Bus RPC, one worker, one lead transition, with the real cloud-init and the real tenancy, before any phase prompts. The first two hours of this run were spent discovering integration edges that a slice would have found in twenty minutes.
  2. Never size parallelism before reading the limits. Serial by default; parallel by evidence. The tenancy is part of the architecture.
  3. Make time UTC-only and test it. Two functions, two unit tests, no exceptions.
  4. Treat content as a gate. Placeholders, invented facts, and missing contact channels fail QA, not just overflow and console errors.
  5. Separate "rendered" from "published". A demo host with a TTL is a demo. A durable URL with a certificate is a publication.
  6. Dry-run destructive commands. Print the plan; require a second word.
  7. Put the repo in git before the next run. This run has no diffs, no commits, no rollback. That is the one place where the rest of the design's discipline did not apply.

Honest gaps

  • No durable hosting. Storage serves HTML as text/plain; the demo host is gone. A real deployment is unbuilt.
  • The dashboard is not durable. It dies with the lead VM; the session does not.
  • TTL self-termination is intermittent. It fired for the lead VM and the smoke worker, but the static host outlived its 240-minute TTL and had to be terminated by hand. Treat TTL as a backstop and sweep by name prefix.
  • No git history. Artifacts are captured; diffs are not. A future run should commit the engine and the site, and tag the session.
  • One unused OCI Function (ephem-agent-launcher) remains deployed. It costs nothing and does nothing.

What it means

The impressive part of this run is not that a swarm wrote a website. It is that the website survived two dead agents, six lead restarts, a tenancy limit, and an operator who killed the session with a test. The work survived because it never belonged to a worker.

The swarm is small and cheap: nine agent rows, seven jobs, two hours, sixty cents, free models. The asset is the session: six tables, seventeen functions, a queue with leases, and an evidence chain long enough to reconstruct every decision.

That is the trade urja makes. Agents are short-lived and replaceable. The record is not.

appendix · the full failure table, 18 rows
#failurecausefix / rule
01Launch rejected: metadata 86,752 > 32,000 bytesLead bundle base64'd into cloud-initBundle via Storage + --bundle-url
02ERROR: syntax error at ":" on session insertpsql -c does not interpolate :'var'SQL on stdin
03Smoke session had no agent/jobINSERT 0 1 tag parsed as the idParse one line, always
04Worker rc=127, opencode/oci missingsudo resets PATHAbsolute paths + PATH prepend
05Agent wrote files to /, zero artifactssubprocess(cwd=) does not set PWDSet PWD + absolute-path header in every task
06Lead restarted every 10 s, then HOME: unboundSELinux blocked append to /var/log; no HOME in systemdjournald + Environment=HOME=/root
07No researcher after a lead restartPatch returned early for phase == "boot"Test every state transition, including restart
08Watchdog thought the deadline had passedmktime parsed UTC as ISTcalendar.timegm; UTC end to end
09terminate-all terminated nothingLooped over pretty-printed JSONParse one id per line; dry-run first
10Lead could not SSH its workersSecurity list allowed only the laptop IPFleet control path, key-only, inside the compartment
11Third VM refused: resource limitFree tenancy E5 core capSerialise; probe limits before parallelism
12Bundle upload 400Bucket MIME allowlist lacked gzipVersion bucket policy with the infrastructure
13Launch thread lost its state fileThread killed mid-launchResolve by display name, not transient file state
14Watchdog relaunched a booting leadNo grace window, no "already running" check15-min grace + OCI RUNNING check
15Two tests broke running scriptsEdited a bash script while it was executingNever edit a script that is running
16Live lead and researcher killedterminate-all run as a testDry-run by default; explicit confirm
17QA passed a page full of placeholdersVerdict gate covered layout onlyContent is a gate: placeholders fail
18Static host outlived its TTLSelf-termination intermittentTTL is a backstop; sweep by prefix and confirm

Rows 1–16 were fixed during the run; 17 needed a manual polish job; 18 remained true at wind-down. The event log keeps the timestamps for every one of them.

appendix · reproduce it
bashurja/tools
# apply the bus (idempotent)
psql "$DSN" -f bus/schema.sql

# prove the worker path on one real VM (≈6 min)
tools/urja-smoke.sh

# start a session; prints the dashboard URL with its token
tools/urja-up.sh --hours 5

# watch from the terminal
tools/bus.py state <human_token>

# inject one extra job into a live session
URJA_INPUTS=/tmp/polish python3 tools/urja-job.py polisher \
  "Final polish" /tmp/polish-task.md

# stop everything
tools/urja-down.sh

The smoke test is the important one. It exercises the token, VM boot, claim, opencode, artifact collection, report, and self-termination without touching a real session.