So recently I started to realize that whenever I ran a full Rust build/test suite or anything heavy, my laptop froze to death, and then the OOM killer closed whatever I cared about most. Ig my 8 GB of RAM just isn't enough anymore for heavy builds plus Chromium, Zed and multiple Claude sessions all running at the same time, which is my basic daily workflow btw :( As I write this, free -h says 1.9 GiB is available. With nothing heavy running.
Meanwhile I have hermes. It's an Oracle ARM box with 2 cores and 12 GB of RAM. I mostly use it as my dev playground (running and learning things like SigNoz, k8s etc.), and most of the day it does basically nothing. It's so idle that I run a small ballast process on it so Oracle doesn't reclaim it for inactivity. Felt kinda dumb tbh: one machine dying, the other pretending to be busy.
So I made the laptop borrow it.
That's hopbox. You put it in front of the heavy command, and it copies your repo to the remote, runs the command there, streams the output back while it runs, and exits with whatever the command exited with. The last line tells you what happened:
hopbox: exit=0 source=remote host=hermes dur=41.8s exit= is your command's real exit code, so a script, a CI step or a coding agent can treat a remote run exactly like a local one. It's out now: 1.0.0 is on crates.io and the AUR, and the code is on GitHub.
For eg. one of the things I've thrown at it is martin's test suite. 5802 tests, all green, 650 seconds on a cold first build on aarch64. Then I ran it again with nothing changed, and the whole hopbox run took 1.6 seconds, sync included. That second number is the one that convinced me rsync was fine and I didn't need anything clever.
why not just ssh in
Tbh, when I first asked Claude for a solution, that's what it suggested, and that's what I did for weeks: rsync the repo over, ssh in, run the thing, squint at the output. It works, and if you only do it twice a week, keep doing it.
Getting Claude to do the same thing took one line in my global CLAUDE.md. That part was easy. What broke it was the way I actually work now.
On a normal day I have two or three Claude sessions open, each started with claude --worktree, and they spawn subagents that often get worktrees of their own. So at any moment there can be four or five checkouts of the same repo sitting under .claude/worktrees/, and every one of them wants to run cargo test at some point.
With my one-liner, they all synced into the same folder on hermes. One agent's rsync would land in the middle of another agent's test run, and that agent would come back with a failure in code it never touched. Easy fix, I thought: one remote folder per worktree. Except every new worktree is a fresh checkout, so now each one starts with a cold Rust build. Three cold builds at once ate hermes exactly the way one ate my laptop, and took my Hermes agent down with it.
Then there's cleanup. A background command dies when the foreground subagent that started it finishes, and when I stop a stuck task from /tasks, Claude kills the local ssh. The build on hermes doesn't notice. It just keeps running, holding a few GB of RAM, for nobody.
And the obvious way to keep the output short, ssh hermes 'cd app && cargo test 2>&1 | tail -40', exits with tail's status. Which is 0. Red tests, green result, and an agent that happily moves on.
Every one of these has a known fix: separate folders, a lock, cgroup caps, pipefail, a trap that stops the remote job. Stack them all into one script, make it work for every project and every agent, and congrats, you've written a tool.
But yeah, like they say:
So I built the tool. Well, first I looked around. rr does rsync-and-run well, and it keeps a separate remote copy for each git worktree, an idea I stole. Offload keeps a warm daemon on the remote and routes test commands through a hook, which is fast. But both were missing things I cared about, which brings me to the rules.
Another way would be to use Herdr, treat my VPS as the main machine and run Claude Code there, so it can do whatever it wants. But my laptop is my main workstation. My project notes, skills, password manager and all the little workflows I've built live there, and I can't keep all of that in sync with a VPS that Oracle can reclaim any day they want. (I really need to build a homelab soon.)
the rules, and why each one exists
So I sat down for a grill me session and wrote four rules before writing any code, and they killed a bunch of features I really wanted.
nothing to install on the remote
If ssh box works, hopbox works. It needs rsync, bash and flock over there, which most Linux boxes already have, and that's it. A daemon would be faster, sure. It would also be one more thing to install, update and debug on every box, and I wanted to point this at any machine I can ssh into, including ones I don't own.
borrow, don't take over
hermes has a day job. It runs my Hermes agent in a 5 GB container, plus that ballast and some heavy part-time jobs. A runaway cargo build that eats all 12 GB takes everything down with it. So every job runs inside its own systemd scope with a memory cap (mine is 6G) and a lower CPU weight. During the martin build, hermes never dropped below 8.2 GiB available.
fail loudly
If hermes is down, hopbox stops and tells you why. It never quietly runs the job on your laptop instead. Offload falls back to local by default, and that's exactly what I didn't want: the whole point is that my laptop can't run the job.
money needs a human yes
hopbox can also rent a GPU box on vast.ai for you. It shows the price and waits for you to type yes, and every rental gets a deadline that the box enforces on itself, so a forgotten instance can't keep billing you while you sleep. Your agent can do this part too: it runs hopbox up, shows you the price, and waits for your yes before anything gets rented.
built for my claude code
This is the part I use the most. I built hopbox so my CC can run tests and builds freely while I keep working, without anyone waiting or worrying about the OOM killer.
The repo ships a skill that teaches the agent when to offload and how to read the result. Install it once:
npx skills add Itz-Agasta/hopbox --skill hopbox -g # or as a Claude Code plugin: claude plugin marketplace add Itz-Agasta/hopbox claude plugin install hopbox@hopbox Then three things change.
Long jobs go to the background. For a release build or a big test suite, Claude starts it with --bg and keeps working on other stuff, then collects the result when it's ready:
id=$(hopbox run --bg -- cargo build --release) # ... Claude keeps working ... hopbox wait "$id" # exits with the build's exit code The job keeps running on hermes even if I close the terminal or my laptop goes to sleep.
Subagents can build at the same time. Each git worktree gets its own copy on the remote, and every job runs in its own systemd scope with its own memory cap. So when I spawn a few subagents in separate worktrees, each one can run its own tests on hermes concurrently, isolated from the others. If one build blows up, the OOM kill hits that job only, and the other sessions (and my laptop) keep going. Two runs from the same worktree take turns instead of stepping on each other's files.
The output fits in context. hopbox run --tail 60 shows only the last 60 lines and points at the full log on disk, so Claude spends its context on the failure and never has to scroll past 5000 lines of passing tests. The status line has source=, so it can tell a real test failure (source=remote) from hopbox being unable to reach the box (source=hopbox). In the second case it tells me instead of quietly running the job on my laptop.
Yeah, I think this is where agents feel the RAM limit hardest: one agent is fine, but three agents each running cargo test on an 8 GB laptop is a slideshow. Moving the heavy part to a box that's sitting idle anyway fixed that for me.
try it
cargo install hopbox # or: paru -S hopbox-bin Then tell it about a host in ~/.config/hopbox/config.toml. The ssh value goes straight to ssh, so your ~/.ssh/config, keys, jump hosts and Tailscale all just work:
default_host = "hermes" [hosts.hermes] ssh = "hermes" memory_max = "6G" hopbox doctor hermes # checks ssh, rsync, the memory cap and PATH on the remote hopbox run -- cargo test Right now it runs from Linux and macOS laptops against Linux remotes. The code, docs are at github.com/Itz-Agasta/hopbox. If you point it at something and it breaks, open an issue and tell me how, and if it saves your laptop too, a star helps.
My laptop finally gets to just be a laptop, and Claude can test in the bg without me worrying about OOM errors.
Thanks for reading :)



