Build log · December 4, 2026

trigger.community on Trigger.dev: rebuilding AgentCamp

AgentCamp gives every visitor a real Linux machine in a browser tab: a desktop, a terminal, and a dozen coding agents already installed. Behind that tab is a surprising amount of choreography. A machine has to be claimed from a pool, restored from an image, bootstrapped, kept alive while someone is using it, paused when they wander off, archived if they asked us to keep it, and ended when its time is up.

Colin Lowenberg Agent: Claude Code (Opus 5.5) Trigger.dev SDK 4.9.1 December 4, 2026
The trigger.community desktop at trigger.community, with the Welcome window open
trigger.community: AgentCamp on Trigger.dev. Every visitor gets a real Linux machine in a browser tab, with coding agents installed, and can watch the runs that boot, keep and end it.

For the Trigger.dev team

  1. Name the common case when creating an API key. Nine presets, and none says "triggers tasks and mints browser read tokens". On a new project, the root-key banner and the Development environment added two more wrong turns.
  2. Say what queue time to expect. A boot run waited 6.6 s before a 5.7 s job, and warm starts are only documented for chat.agent.
  3. Let a task prove which run it is. Run and task ID claims in the OIDC token would let an app trust a callback without reading the run back.

All feedback from this project · Feedback across all five projects

We built all of that by hand, as route handlers and a cron job on Vercel, calling our sandbox provider's SDK directly. It works. It also fails in ways we find out about too late. So we're forking AgentCamp and rebuilding its backend on Trigger.dev, at trigger.community.

What went wrong with doing it by hand

Three things from the last week, none of them exotic.

A cleanup job failed for hours and nobody knew. Every five minutes a function sweeps our workspaces and pauses or ends idle machines. When an API key it depended on stopped working, every run logged one line — list: sandbox: unauthorized — and returned success. We found it by accident while checking something else.

Two of our three machine pools were dead, and visitors just saw "starting…". The claim path tries each workspace in turn and logs a warning when one refuses. With two refusing and the third full, a new visitor's tab sat on "sandbox starting" indefinitely. The information was all there, in warnings, in a log stream nobody was reading.

State that lives in a function's memory doesn't survive serverless. Our desktop coordination endpoint kept its sessions in a module-level map. On one long-lived server that is fine. On Vercel, the next request can land on a different instance, which has never heard of you. A friend testing the site saw the same endpoint answer 200, then 404, then 200.

The pattern is the same each time. We wrote long-running, multi-step, stateful work as short-lived stateless functions, and then wrote the durability ourselves: retries, timeouts, a background tail after the response, a sweep to catch whatever fell through. Each piece is small. Together they are a workflow engine that we maintain and that has no dashboard.

What changes

In the fork, a machine's life is a set of Trigger.dev tasks instead of a route and a cron.

Every one of this week's incidents would have been a failed run with a name, a stack trace and a notification.

What isn't changing

To be clear about the scope, because "switching" overstates it:

What moves is the part in between: everything that decides when a machine should exist and what should be happening on it.

What we don't know yet

We've barely measured this, and we'd rather say so than promise it.

A fresh visitor reached a live terminal in about 10 to 16 seconds before the change. The first live check of the new path measured 12 seconds, page to running machine. One earlier boot run, though, waited 6.6 seconds in Trigger.dev's queue before it started. If that wait turns out to be normal rather than a cold start, the first step moves back into the request and the run takes over after it. A few more boots will tell.

We also haven't priced it. Every machine becomes several runs, and at volume that is a real number we need to see before the claim path ships.

Why a showcase

Because trigger.community is meant to show Trigger.dev running a real, busy, slightly odd application: every visible feature shows the run behind it, live, as it happens. The code itself stays private. If the latency number comes back bad, we'll write that up too.


How we're building it: the log so far

AgentCamp is built by one person talking to a coding agent (Claude Code). Below is every prompt from the Trigger.dev part of that conversation, word for word and in order, with what happened after each one. The parts that went wrong are left in, because that's where the product feedback is.

1. A theme

create a theme for https://trigger.dev/

deploy it to https://trigger.community/ (sent mid-task)

The agent read trigger.dev's site and built a trigger theme: charcoal ground, lime accent, indigo for code, Geist and Geist Mono, 4px corners. It also added a trigger.community brand that wears the theme, then deployed. Two mistakes along the way, both ours:

A visual check afterwards found the wallpaper reads green more than green-and-indigo, plus a stray yellow icon tile. Both are still open.

2. Two plans

put together a plan to build trigger.dev as an app / agent on agentcamp

put together an alternative plan to fork agentcamp and rebuild it using trigger.dev (sent mid-task)

The two plans:

One mistake: the first draft of the rebuild plan quoted a test count the agent had never actually measured. It was caught on review and removed.

the goal is a Trigger.dev showcase

That settled the main open question in the plan. If the point is a showcase, what matters is what a visitor can see Trigger.dev doing: live boot progress, a Runs window, durable chat. So those moved to the front, and the reaper and image builds, which nobody sees, moved to the back.

3. This post

let's write a blog post about why we are switching from vercel/luxor to trigger.

The first draft of this post. It deliberately says "switching" overstates it: the machines stay on Luxor and the front end stays on Vercel.

4. The welcome screen, three times

While checking trigger.community, the welcome wizard's last step turned out to read badly:

"Both are optional, and both are in the menus later." this sounds confusing

The agent rewrote it as "Skip anything here: you can set permissions or install the app from the menus any time." Then, while that change was waiting:

i can't tell these are buttons, and the hover is a little strange

In the Trigger theme, the secondary buttons had the same fill as the rows they sat on, so they read as plain words. The description tooltip opened above the row, covered the section's own heading, and was an inverted white slab in an otherwise dark theme. The fix was a lighter fill with a visible edge, and a tooltip that opens below the row after a 0.4 s pause, in the page's own colours. A separate agent checked it in a browser before anything shipped.

"Skip anything here: you can set permissions or install the app from the menus any time." wtf?? that's crazy, telling them to "Skip anything here" sounds like you are telling them to skip it

Fair. The second version was worse than the first. The line is now: "Turn on what you want now. You can change any of it later from the menus."

Commit and deploy

Shipped.

5. The rebuild, in three hours

do the rebuild but do it super fast. come up with a plan to do it all in the next 3 hours.

5–7 weeks doesn't fit in 3 hours, so the plan was cut around three decisions:

Inside the three hours: a boot-machine run with live progress in the page, the machine's lifetime as a delayed run, the reaper as a schedule that starts one run per machine, and a Runs window on the desktop. Out of the three hours: chat.agent, human-in-the-loop approval, the desktop bus, and the golden image build.

Two bugs in the agent's first pass, both caught on rereading before anything ran:

6. Setting up the account

This is the part that's most useful to Trigger.dev, so it's quoted exactly.

trigger is complicated... what do i select when creating the api key?

The "New API key" dialog offers nine access presets in three groups: No restrictions; Trigger only and Task operator; and Observer, Operator, Webhooks only, Waitpoints only, Deploy only and Variables only. A permissions table sits beside them. A first-time user building the most common setup (a backend that starts tasks and lets the browser watch them) can't tell which preset that is. Task operator looks closest. But it wasn't clear from the dialog whether a restricted key can mint the public read tokens a browser needs for useRealtimeRun, and finding out mid-build would have cost time. So the agent recommended No restrictions for now, to narrow later.

The page was also on the Development environment. The key was going into Vercel production, so it needed the Production one. The environment shows as a small pink word next to the dialog's title.

do i replace the root key?

The Production API keys page of a brand-new project opens with a yellow banner: "Root keys are being phased out. Replace yours with API keys you can limit and revoke one at a time." It has a "Replace root key…" button, and the project's only existing key is badged "Legacy". On day one, that reads as something you must do before anything else. It isn't: nothing used the root key yet. The answer was to leave it alone and click "Create API key".

The config file also needs the project's ref (proj_…), which lives under Settings. The dashboard URL shows the project's slug instead, which looks like an id but isn't the one the config wants.

Then the key went into Vercel, typed into a prompt that doesn't echo it, so it never passed through the agent:

scripts/set-key.sh TRIGGER_SECRET_KEY

That worked. Its closing message said "run scripts/deploy.sh", and the next thing typed was:

run scripts/deploy.sh

zsh: command not found: run. That one is our script's wording, not Trigger.dev's: "run X" in a terminal reads as a command. The message should show the bare command instead.

7. Logging in and deploying the first task

While the agent wrote the boot task, the CLI login went through the terminal:

npx trigger.dev@latest login

npx first asks to install trigger.dev@4.9.1, then the CLI prints a link to approve in the browser. The token stays in the CLI on this laptop; the agent never sees it.

Logged in, ref sent

The ref never arrived in the chat, but the agent didn't need it: the logged-in CLI already knew the project, so the agent read the ref from there and put it in trigger.config.ts. The boot task deployed on the first try as version 20261204.1.

Committing was messier, and that was ours. Another agent session was editing some of the same files in this checkout at the same time. Staging only this session's lines from those files went wrong twice:

Both were caught by type-checking the committed tree before deploying.

An automated security review of the change raised two points, and both were fixed before anything went live:

The review also suggested a second shared secret between the task and the app. We left that out: nobody can start a run without our secret key, and the app reads every run back before trusting a call that names it.

8. The first live boot

A separate agent opened trigger.community in a fresh browser and watched:

Two things weren't right. The 6.6 seconds in the queue is new: before, the install started the moment the machine was created. We don't know yet whether that was a cold start or the normal wait; the 12-second visit wasn't timed separately. And the menubar's boot bar, which should show the run's live step ("starting", "installing"), never appeared for the checking agent. It may be hidden in this theme, or the boot may have been too quick for it. Neither is resolved yet.

9. The reaper and the end of a visit

Yes, build them

Two more tasks:

One switch, AGENTCAMP_TRIGGER_REAP=1, hands visitor reaping on every brand to Trigger.dev and takes it off the Vercel cron. Unset it and redeploy, and the cron takes over again.

Deploying the tasks printed that the reap schedule had a "60-minute default cron window". That sounded like a 5-minute schedule might run hourly, so the agent stopped to find out. It turns out each schedule gets a fixed offset inside its interval: this one fires a few minutes after each 5-minute mark, still every 5 minutes.

The first scheduled reap took 1.2 seconds and found two idle machines, the anonymous visits from the boot check. Each of the two reap-machine runs paused its machine in about 3.5 seconds, and Luxor lists both as paused. The CLI doesn't print a run's output, so the agent confirmed what each run did from its tags and from the machines themselves.

Still unverified: the end-of-visit run on a real visit (only visits after this deploy get one), and an archive or an end through the new path, as opposed to a pause. Also, the short machine tag (m_ plus the first 8 characters of the id) turned out not to be unique: Luxor ids start with a timestamp, so both machines got the same tag. It's only a label.

10. This section

let's update our blog post with a step-by-step including every prompt i've said to you, and document all the pitfalls and confusion and errors and mistakes, that way we can have good product feedback for the trigger.dev founders

update the blog with the latest from the conversation nested above

commit the blog post to this repo : https://github.com/opencolin/trigger-blog and publish it as a github page

check them against Trigger.dev's docs

"Them" were the feedback points we had hedged. The agent read the docs that ship inside the SDK, and the SDK's own source where the docs were silent. Two of our points were wrong (items 7 and 10 below), and two got sharper (6 and 8). The corrections are in place, not deleted, so you can see what we got wrong.

Where it stands: boots and reaping on trigger.community run on Trigger.dev, and the tasks are at version 20261204.2. Still to come: chat.agent, human-in-the-loop approval, and an answer on the queue wait.

Notes for the Trigger.dev team

Most of this was smooth. What helped, and what didn't:

What worked well

Where we got stuck or slowed down

  1. API key presets don't name the common case. "A backend that triggers tasks and hands the browser a read token" is most apps. A preset with that name, or a line under Task operator saying whether it can mint public access tokens, would have settled it in one click.

  2. The environment is easy to miss. We were on Development and needed Production. The environment is a small coloured word in the dialog's title. Making it a choice inside the dialog, or a confirmation when creating a key on Development, would help.

  3. The root-key phase-out banner on a brand-new project. It asks for a migration before there's anything to migrate. On a project with no usage, the empty state's "Create API key" could stand alone.

  4. Slug vs ref. The URL shows the slug; the config wants the ref. Showing the ref somewhere obvious, or accepting the slug in trigger.config.ts, would remove a lookup.

  5. Two credentials, explained in two places. The CLI login deploys tasks; the secret key triggers them at runtime. That's right, but a newcomer meets both within a minute and wonders which one is "the key".

  6. Callbacks from a run to your own app. Our tasks hold no secrets and call the app back. To trust those calls we read each run back with runs.retrieve and check its status, task and payload. That works, but it costs a round trip per step. We later checked the docs: OIDC (auth.getOIDCToken({ audience }), SDK 4.8.3+) gives a task a short-lived signed token that our app could verify against Trigger.dev's public keys, with no round trip. But the token's subject names the organization, project and environment only. In the docs' words, the subject "identifies every task in that environment, not an individual task". So it proves "a run in our Production" but not "a live run of boot-machine for this visitor", and we'd still need the read-back to bind a call to one machine. Run ID and task ID claims in the token would let an app trust a callback on its own. Until then, a short "calling your own app back from a task" page would help: OIDC for the environment, runs.retrieve for the run.

  7. Stopping retries early inside retry.onThrow. We wanted a step to retry on a 5xx and stop at once on a 403, and wrote that we couldn't find a way. We were wrong twice over. retry.fetch does exactly this: byStatus: { "500-599": { strategy: "backoff", … } } retries only the statuses you list and hands any other response straight back. And retry.onThrow stops at once if the block throws AbortTaskRunError: the SDK's source checks for it and rethrows without another attempt. Since a refusal should end our run anyway, our "refused" flag was unnecessary. The only feedback left is that the docs don't say this. The retrying page covers AbortTaskRunError for a whole task but not inside retry.onThrow, and that one sentence is what we went looking for.

  8. Queue time in front of a short task. Our boot run waited 6.6 s in the queue before a 5.7 s job. For anything a visitor is watching, that wait is most of the time. We don't know yet whether it was a cold start. The docs do name the cold start ("dequeue, process boot, …") and offer two fixes, Preload and Head Start, but only for chat.agent. (Head Start is roughly what we did by hand: the app creates the machine itself and the run picks up from there.) Nothing similar covers ordinary tasks. Saying what queue time to expect, and whether warm starts or a preload apply to any task, would have answered it.

  9. "60-minute default cron window." On a 5-minute schedule, this deploy message made us stop and check whether the schedule would run hourly. It doesn't; the window is a fixed offset. Wording like "runs at a fixed offset within each interval" would avoid the scare.

  10. Run output from the CLI. To check what a run returned, we went by its tags and the machine itself. We missed that the CLI has runs list (with --tag, --task and --status) and runs get <id>, which would have found the runs faster. But runs get prints status, version, tags, timings, duration, cost and error, not the run's output or metadata. Neither does the MCP server's get_run_details say so (it promises logs and status). An --output flag would let an agent check its own work without opening the dashboard.

Our own mistakes, for completeness: the CSS splice, the icon script touching other brands, an invented number in a plan, two rewrites of one sentence, a callback check bound to an id that didn't exist yet, a terminal message that read like a command, and two bad commits from staging part of a file another session was editing. None of those were Trigger.dev's doing.