the consensus is that running agents around the clock is expensive, so people don't. they give an agent a task, sit and watch it, and close the laptop when they're done.
i think that's backwards. the machine is the cheapest thing in this entire setup & almost nobody prices it out.
the number people get wrong
a small linux box, running constantly, is somewhere between $5 and $25 a month depending on where you put it & how much ram you give it. that's the whole cost of the compute.
now go look at what you spent on tokens last week.
for most people running agents on real work, the model bill is the larger number by a wide margin & it isn't close. one long session can cost more than the machine costs for the month.
so the thing people optimise is the fixed, small, predictable number. and the variable, large, unpredictable one just runs.
why it feels expensive when it isn't
because "always on" sounds like "always billing" & on most providers it is. you rent a box, it runs whether you're using it or not, and you pay for every idle hour at the same rate as every working hour.
that's the part worth fixing, and it's a solved problem. a machine that suspends when nothing is happening & resumes when you come back costs you for the working hours and pennies for the rest.
mine resumes in about a second. that number matters more than it sounds, because a resume that takes thirty seconds is one you start avoiding, and a setup you avoid isn't a setup.
the diy version, in full
you do not need to buy anything to do this. here's the whole thing.
1) get a vps. any provider. what you want is a real vm with a disk that persists across reboots, and no idle reaper. what you do NOT want is a container platform that reclaims your box when nobody types for twenty minutes, because that's exactly what an unattended agent looks like from the outside.
2) ram is your constraint, not cpu. agents spend most of their wall clock waiting on api calls. but a headless browser or a test suite will take 2gb without asking.
3) run the agent under tmux:
sudo apt install tmux
tmux new -s agent
start your agent here
ctrl-b then d to detach
now close your laptop. tmux attach -t agent when you're back, and the scrollback is still there including everything it printed while you were gone.
this is the part people skip & it's the part that matters. if the agent is a child of your ssh session, a dropped connection is a kill signal. under tmux it isn't.
4) preinstall what it's going to reach for. postgres, playwright with its system deps actually resolved, ffmpeg, pandoc, ripgrep. half a bad agent session is the agent discovering the machine is empty & installing its way out, on your tokens.
5) keys in the environment, never in the prompt. a key pasted into a prompt ends up in the scrollback, in whatever the agent writes to disk, and in the session transcript on disk. put it in .bashrc & let the cli read it.
one gotcha that cost me a day: playwright caches browsers under $HOME. if you mount a volume over $HOME, the build passes, the browser is genuinely there at build time, and every chromium.launch() fails for the user. set PLAYWRIGHT_BROWSERS_PATH=/opt/ms-playwright before you install.
what the diy version actually costs
not money. time.
you now own a server. patching, backups, the security of the thing, and the afternoon you spend on playwright's system dependencies before you write a line of your own code. that afternoon is the real price & nobody quotes it.
i ran it that way for a long time and it was fine. i stopped because i was spending maintenance time on infrastructure that had nothing to do with what i was building.
what i ended up building
HolyCode Cloud is that setup, on a machine i maintain instead of you.
$19/mo gets 1 vcpu, 2gb ram and 12gb disk. that's enough for one agent doing real work. the ladder goes to $199 for 8 vcpu and 16gb, and every feature is on every tier — you're paying for horsepower, not to unlock things.
six agent clis are already on PATH: claude code, codex, gemini, opencode, cursor, pi. so is postgres, playwright with its deps resolved, ffmpeg, pandoc, gh, ripgrep, tmux. the disk persists. the process survives you disconnecting.
you bring your own anthropic or openai key & they bill you directly. i don't mark up tokens and i don't want to be in that business. the machine costs what the machine costs.
it suspends when you're not using it & wakes in about a second, so always-on isn't always-billing.
the honest edges
leave a box idle for several days and the wake is closer to a minute than a second, while the host pulls the image again. nothing is lost, you just wait.
a hard crash gives you a fresh shell. files and the volume survive.
scrollback doesn't. i can restart the machine in seconds and still can't hand you back what was on the screen.
there's no free tier. every account is a real vm that costs me money from the first minute, so instead there's a 7-day refund: no form, no call, you email me.
and everything in the diy section above works without me. if you enjoy owning the box, own the box.
the thing i'd actually like to know: for those of you running agents on real work, what's your split? machine cost against model cost, roughly. i suspect most people have never put the two numbers next to each other.
Top comments (0)