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
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
- 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.
- 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.
- 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.
- Claiming and booting a machine is a run. Create, wait until it's up, bootstrap: each
step retried on its own and visible. The page subscribes to the run, so "starting… booting…
live" is the run's real state rather than a poll.
- Capacity is a queue. Each workspace gets a concurrency limit, instead of us counting
machines on every claim and hoping two claims don't race.
- Lifetime is a scheduled run, not something a sweep notices: "end this machine at T",
moved or cancelled when the visitor keeps it.
- Cleanup fans out, one small task per machine, so one failure is one red run with an
alert rather than a line in a log.
- Chat and agent jobs become durable sessions that survive a reload or a deploy, and the
desktop's shared channel moves off function memory entirely.
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:
- The machines stay where they are. Visitors need a full VM with a terminal, and that
still comes from Luxor Agent Cloud. Trigger.dev orchestrates those machines; it doesn't
replace them.
- The app is still a Next.js app. The desktop, the windows and the themes carry over
untouched, and the front end still deploys the way it does today.
- AgentCamp itself keeps running as it is while the fork is built.
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:
- The new CSS block was spliced one line too early, inside the previous theme's
@media
block. The braces no longer balanced, every theme after it was nested inside it, and a CSS
test hung instead of failing. Fixed by adding the missing brace.
- The brand had no app icons. Running the icon script fixed that, but it also regenerated four
other brands' icons that nobody had asked to change, so those had to be put back by hand.
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:
- The app plan: a Trigger window on the desktop that signs the visitor in with the real
trigger.dev CLI on their machine, runs init and dev, and pre-loads the coding agents
with Trigger.dev's skills and MCP server. About a week.
- The rebuild plan: replace the hand-rolled backend (claim, bootstrap, reaper, lifetime,
desktop bus, chat) with tasks, schedules, queues and Realtime, and keep the UI and the
Luxor machines. 5–7 weeks to parity.
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:
- No fork yet. trigger.community is already one brand of the same app, so the Trigger.dev
path runs only on that brand. Every other domain keeps today's code.
- Tasks orchestrate; the app does the work. This reversed the first plan. Running the
bootstrap inside a task would have meant copying every house secret (the sandbox keys,
the model relay's signing key, search keys) into Trigger.dev's environment variables as
well as Vercel's. Instead, each step of a run calls back into the app, and the app does
the work with the keys it already holds. The app trusts a callback only after reading the
run back from Trigger.dev with its secret key and checking three things: the run is
executing right now, it is a task allowed that step, and it was started for that visitor.
The only new secret is the Trigger.dev key itself.
- The old path stays underneath. If a run can't be started, the machine boots the way it
always has.
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:
- The first version bound every step of a boot run to the machine's id. A boot run is
started before the machine exists, though, and a run's payload can't change afterwards.
The boot run is now bound to the visitor, and the app separately checks that the machine
carries that visitor's tag.
- A crafted step name of
__proto__ would have crashed the check (an in test on a plain
object). It now uses Object.hasOwn.
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:
- the first commit picked up another session's half-finished window, which would have broken
the build
- the second put the new Runs entry outside the list it belonged to, in the committed copy
only
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 task now calls back only to the brand's own domain, and the callback answers only on
trigger.community.
- An expired visit cookie can no longer get a read token for a run.
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:
- Page to running machine: 12 seconds, inside the 10–16 seconds the old path takes.
- The Runs window (⌘K, "Runs") showed the boot as a real run, "Boot your machine",
DONE, with its timings. (It also linked to the task's source; the link was removed, since
the repository is private.)
- Inside an earlier run: 6.6 s waiting in Trigger.dev's queue, 170 ms for the machine to
come up, 5.5 s to install the apps.
- The read-token route answered 401 before the visit had a cookie and 200 after, as it
should.
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:
reap runs every 5 minutes. It asks the app which machines need something and starts
one reap-machine run per machine. It never touches a machine itself.
- Each
reap-machine run has the app check its machine again and then pause, archive or end
it. The rules are the same ones the old cron used, now shared by both.
- Every new anonymous visit on trigger.community also gets a delayed
reap-machine run, set
for when the visit's time runs out. The visitor can see it waiting in their Runs window.
When it fires it checks again, so a machine kept in the meantime is left alone.
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
- The SDK ships its own docs and agent skills inside the npm package (
docs/ and
skills/ under @trigger.dev/sdk). The agent read the installed version's API from those
instead of guessing from memory, which is exactly right for agent-built code. Writing a
task, delaying a run, tagging it and following it from React took one read of
trigger-authoring-tasks and trigger-realtime-and-frontend.
- The concepts mapped one-to-one onto what we had built by hand: a delayed run for a
machine's lifetime, tags for "this visitor's runs", metadata for a progress label.
Where we got stuck or slowed down
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.
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.
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.
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.
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".
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.
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.
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.
"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.
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.