I Ran 10 Claude Code Agents Overnight in Upstash Box
Read the Portuguese translation →
Author: Eric Tech · Watch on YouTube
Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.
Original language: English
Original video: I Ran 10 Claude Code Agents Overnight in Upstash Box · Channel: Eric Tech · 09:22 · Watch on YouTube
Topics: AI agents, Task and workflow automation, Claude Code, AI infrastructure and hardware, AI safety
Summary
Section titled “Summary”The video demonstrates using Upstash Box to run ten Claude Code agents in isolated cloud containers against a real app backlog while the creator’s laptop is closed. A locally written orchestrator creates boxes, and a snapshot of an installed environment helps avoid repeating setup for every agent. In the morning, six agents produced clean branches, while others hit budget limits or failed to commit; the logs also revealed agents struggling with pre-existing test failures. The creator concludes that unattended work is possible, but merging still needs supervision, and highlights costs, resumability, and security precautions.
Key points
Section titled “Key points”- Upstash Box runs an AI agent inside an isolated cloud container with its own files, Git, and shell.
- An orchestrator reads backlog items and creates a separate box and Claude Code agent for each task.
- A single-agent trial fixed a login rate-limiting bug, added a test, and committed the change to a branch.
- The creator cloned and installed the project in one box, then used a snapshot to create the other nine.
- Six of ten agents returned clean branches with fixes or improvements; three hit a $3-per-agent spending cap, and one made a change but did not commit it.
- Pre-existing failing tests confused some agents, leading them to revert their own work and waste their budgets.
- Paused boxes preserve the repository, dependencies, changes, and checked-out branch, and can be resumed later.
- The boxes cost about a cent in the demonstrated run, while Anthropic token usage was the larger expense.
- The creator advises protecting secrets with attach headers and restricting network access before running agents unattended.
- The main benefit is decoupling queued work from an open laptop, but the results and merges still require review.
Chapters
Section titled “Chapters”| Start | Chapter | Summary |
|---|---|---|
| 00:00 | Why run agents in cloud boxes? | The creator introduces Upstash Box and the plan to send ten agents through a real app backlog overnight. |
| 02:07 | Building and testing the orchestrator | Claude Code writes an orchestrator from the documentation, and a single agent successfully fixes a rate-limiting bug. |
| 03:40 | Ten agents work overnight | The creator launches agents from a shared snapshot, leaves them running overnight, and reviews their results in the morning. |
| 05:13 | Failures, resumability, and costs | The video examines budget and commit failures, demonstrates pausing and resuming a box, and discusses the run’s costs. |
| 07:49 | Security caveats and who benefits | The creator explains runtime and security limitations, recommends safeguards, and reflects on when overnight agents are useful. |
Quotes
Section titled “Quotes”My laptop fans are not spinning. — 04:12
You can leave the work unwatched. You cannot leave the merge unwatched. — 06:16
Upsbox bills you for active CPU, not wall clock time. — 07:17
You can lock that down with a network policy and only allow the domains you need. — 08:21
Your work stops being tied to your machine staying open and becomes something you queue up and check on. — 08:52
Concepts and entities
Section titled “Concepts and entities”Upstash Box, Claude Code, Upstash, Anthropic, Docker, npm, snapshot, attach headers, política de rede
Full transcript (original language)
Section titled “Full transcript (original language)”00:00 If you’re using cloud code right now, you’re running one agent on your laptop, one terminal, one repo, one task at a time, [music] and the second you close the lid, everything stops, which is fine for one bug, but when you have a real backlog sitting there, that one session is the bottleneck. So, in this video, we’re going to fix that with Upstbox. Upstbox lets you give your AI agents a computer. So, instead of borrowing your machine, the [music] agent gets its own machine in the cloud with its own files, its own git, and its own shell. And what we’re building with it is basically a
00:31 software factory. I’ve got a real SAS app here with a backlog of things genuinely broken in it. And we’re handing that backlog to 10 cloud code agents. [music] Each one in its own box running overnight while my laptop is closed. So let’s head over to the Upstashbox docs first because this works a little differently from the sandbox tools you’ve probably seen. Every Upstash box is a secure isolated cloud container with an AI agent built in. And that last part is what matters. With most sandbox tools, the agent runs on your side and the sandbox is just somewhere to execute code. Here, the
01:02 agent lives inside the box. You give it a prompt and it runs its own commands, edits its own files, runs its own tests right where the code is. So here you can see a box gets a runtime, git, and a real shell. And down here is the life cycle running, paused, and snapshots. We’re going to use all three. All right. So this is the app. Login, a database, users, a dashboard. build fast the way most of us build things now. So it has a very familiar list of problems and that’s this file right here. This is backlog.md just plain English. Item one,
01:35 the login endpoint has no rate limiting. Item two, the dashboard loads every row, no pageionation. Item three, the mobile nav doesn’t close after you tap a link. Item four, an N plus1 query on the users list and it goes down to 10. Now one rule that matters once you go parallel, each item should touch a different part of the app. These are 10 agents in 10 boxes and they can’t see each other. So if two of them edit the same file, you get two branches that fight when you merge. Okay, so now we need something that reads that file and spawns the boxes. And I’m not writing that by hand.
02:07 I’m going to have Claude code write it using Upstash’s own docs as the source. So here’s Claude code running locally. And I give it the docs link and tell it what I want. Read the Upstash box quickart. Then write an orchestrator that reads backlog.mmd and for each item creates a box with the cloud code agent. clones my repo in and hands that agent the item as its task. And here’s the first pass. And look at this. It’s wrong. It’s guessing at method names that don’t exist. So, we run it and get this error. Very normal when you point an agent at a brand new SDK. So, the fix is to be specific. Pull the actual quick
02:38 start page and follow the API on it. And now the second pass. So, here it’s installing the SDK, reading backlog.md splitting it into items. And this is the important part. Box.create. And inside it, we set the runtime and we set the agent to claude code. That block is what puts a clawed code agent inside the container. And quick note on keys, mine are in av file that I’m keeping off screen. Please do the same. Now, before we go to 10, let’s run one because you always want to see one work first. So,
03:08 this is just item one, the rate limiting bug. Here’s the box being created, and we get a box ID back. Now, watch. That’s the agent streaming straight out of the container. Cloning the repo, running npm install, opening the O route, reading the middleware. None of that is on my machine. And a couple of minutes later, there it is. Rate limiting on the login route. A test for it. Test passing. Committed to a branch. That whole loop happened inside a container in the cloud. Okay, so now the fun part. Let’s take that same thing and go wide. Not
03:40 one cloud code session on your laptop, but 10 agents working on your repos at the same time, each in its own box. So, we’re mapping over the 10 backlog items, creating a box for each one, and running them all at once. One thing worth doing first, cloning and running npm install takes a couple of minutes, and you don’t want to pay for that 10 times. So, I set up one box, clone and install, snapshot it, then create the other nine from that snapshot. And here we go. 10 boxes split across panes so you can see them all at once. And this is the part I want you to
04:12 notice. My laptop fans are not spinning. 10 claw code agents at full speed and my machine is doing nothing. Now, here’s where it gets genuinely useful because the agents live in the boxes and not on my laptop. I don’t have to sit here and watch this. So, it’s 11 p.m. All 10 agents are working and I’m closing my laptop and going to sleep. And that’s not a trick. The boxes keep running. There’s no session on my machine to lose. Okay, so it’s the morning after. Let’s see what we got. Six of the 10 came back clean and pushed a branch.
04:43 Pageionation on the dashboard, error and empty states, the readme, PDF export, password reset token expiry, and the daily digest time zone bug. Six branches sitting there waiting on me, and two of those are worth pointing at. Before it spawned anything, the orchestrator ran the test suite once and printed a baseline. And this repo already had two failing tests on main. The digest one and the password reset one. In the morning, both of those are green, fixed by two different agents in two different boxes that never talked to each other.
05:13 Now, the failures, and they’re more interesting than the wins. Three agents hit their spending cap and died mid task. I’d set a $3 limit per agent, so 10 agents is $30 worst case. And rate limiting, the N plus1 query, and the seed script all burned through it. And when you read the logs, it’s the same failure every time. The agent makes its change, runs npm test, sees those two pre-existing failures, decides they might be its fault, reverts its own work, reruns, gets confused, tries again. It spent $3 arguing with itself
05:45 about tests it was never asked to touch. Then the mobile nav won. It made the fix. It said, “I will now commit the change.” And then no commit. So there’s a box sitting there with the right change in the working tree and an empty branch. And then there’s this one, and this is the one you need to see. PDF export. It decided to use a package called fast PDF, added it to package.json, ran install, and npm couldn’t find it. But then it caught itself, swapped in JSPDF, and shipped a working export, which is the whole thing
06:16 in one branch. It hallucinated, it recovered, and the only reason I know any of that happened is that I read the log. So, six clean, one that goes to the commit, three that spent themselves to death. And that’s the real answer to can I leave this unwatched. You can leave the work unwatched. You cannot leave the merge unwatched. Now, those three that ran out of budget, I don’t want to throw them away. And I don’t want to pay for them to sit there spinning either. So, this is pause. Freeze a box anytime and continue days or even weeks later with
06:46 perfect resumability. So, I’ll pause this one. And over in the console, you can see the status flip from running to paused. And now watch this. I resume it, list the folder, open the file I was working on. The repos there, node modules is there. The half-finish changes are there. And the branch is still checked out. Nothing was rebuilt. So you can start something on a Monday, freeze it, and pick that exact environment back up whenever. Okay, let’s talk about money because I know that’s the question. Upsbox bills you
07:17 for active CPU, not wall clock time. So when a box is paused, you’re not paying for compute, just a small amount for storage, which matters here because agents spend a lot of their life idle. So here’s the bill, 10 boxes, and it was only about a cent. But that’s just the boxes. You’re paying Anthropic separately for the tokens those agents burned. And that was the bigger number. So the infrastructure for running 10 agents overnight is cheap. The model usage is what you actually watch. All right, three things that will bite you because I’d rather you hear them from me. First, you can’t bring your own
07:49 Docker file yet. You pick from the runtimes they give you, Node, Python, Go, and so on. So, if your app needs some weird system package, you install it in a setup step or do what I did, install it once and snapshot it. Custom runtimes are on the road map. Second, and this is the important one, environment variables inside a box are visible to everything in that box, including the agent. So if you drop a GitHub token in there, the agent can read it. And if you pass it inside a shell command, that command can end up in logs. The docs cover this. There’s a
08:21 feature called attach headers where you map the secret to a domain and upst it on the way out. So it never touches the container. Use that. And third, by default, a box can reach the whole internet, which also means an agent that goes off the rails can reach anything. You can lock that down with a network policy and only allow the domains you need. And I do that before running anything unattended. So who is this actually for? If you’re running one agent at a time and you’re happy with that, you don’t need this. Cloud code on your laptop is fine. This starts to make
08:52 sense the moment the bottleneck is you. A backlog that never moves, a few projects at once, or you just want work happening while you’re asleep. And the thing that actually surprised me here wasn’t the 10 agents, it was closing my laptop. Your work stops being tied to your machine staying open and becomes something you queue up and check on. It’s not magic. You saw the failures. Three of them spent their whole budget going in circles. But six real fixes waiting on branches in the morning for a couple of dollars. That’s a good trade. So, if you want to try this yourself,
09:22 you can get started at upstash.com/box or just click the link in the description below. And that’s about it for this video. If you found this helpful, please make sure to like this video and consider subscribing. and let me know in the comments what you’d put in your own backlog file. And with that being said, I’ll see you in the next one.