← Back
JUNE 21, 2026

How I run my coding agents from anywhere, on any device

I do most of my real work through coding agents now. Claude Code, Codex, opencode, different models for different jobs. For a long time I ran all of it inside VS Code on my laptop, and at first that felt great.

Then I started hitting walls. Four of them.

  1. Bandwidth. I travel a lot, often on a roaming SIM. A few minutes of an agent working in VS Code, or in the Claude web app, would quietly eat hundreds of megabytes. Stretch that over a working day and you are into gigabytes. Paying by the megabyte on someone else's network, that adds up fast, and it is just not smart.
  2. The always-on tax. My agents never wanted to stop, so my laptop never could either. A good run goes for an hour or more. I did not want to close the lid and kill it halfway, so the machine had to stay open, awake, and plugged in, all the time. My main computer had quietly turned into a server that I also happened to carry around.
  3. Too many machines. I work from a lot of different screens. There is a Mac mini in front of the treadmill at my home gym. There is an iPad I like to use at home when I have not brought the work laptop. And there is my phone, for the quick change I want to make while I am out. The trouble was that my real work, the running agents and the open files, lived on whatever laptop I had used last. Walk over to a different screen and none of it was there.
  4. No real mobile. The official Claude and Codex phone apps look fine in a demo. I could never actually work in them. No auto mode, no way past the permission prompts, no terminal, and no real view of what the agent was doing. I would kick something off and have no idea if it was stuck, waiting on me, or already done.

The setup that solved all of them at once

In the end I got every one of those birds with a single stone. There is now a Mac mini at home that stays on all the time and runs my agents. Everything else I own, the laptop, my phone, the iPad, the treadmill Mac, an old spare, is just a window into it.

Three things make it work: mosh, tmux, and Tailscale. mosh is a terminal that shrugs off a dropped connection, a sleep, or a jump from wifi to cellular, and carries on where it was. tmux keeps the real session alive on the mini, so nothing is tied to the device in my hand. Tailscale is the private network that links all of my devices to the mini directly, with no ports opened to the public internet.

Because the mini does the real work over my home broadband, the only thing crossing the roaming link is the text on the screen. A day that used to cost gigabytes now costs tens of megabytes. The agents keep running whether my laptop is open or shut or in my bag. And I can pick them up from anything: the Mac at the treadmill, the iPad on the couch, my phone in a queue somewhere, even by voice when I dictate into the terminal.

There is a flip side I did not see coming. The mini runs on my home internet, a symmetric gigabit line, so every download, install, and build happens at full gigabit speed no matter how slow the connection in my hand is. I have sat on awful mobile data and pulled huge repos and run heavy jobs as if I were wired in at home, because in every way that mattered I was. The work rides my fast pipe, not the sad one on my phone. That is something I simply could not do before, with everything running locally on a laptop over roaming data.

On the laptop I lean on one more tool to keep the data down: TripMode. It is a small Mac app that lets you allow only the apps you choose onto a metered connection. On the road I lock it to just the terminal and Chrome. Everything else, all the background sync and chatter that normally leaks data without you noticing, stays blocked, and my usage drops to almost nothing.

My laptop stopped being the computer. It became a window into the one that is always on.

What I actually built

The mini behaves like a server, not a laptop. It never sleeps, the screen never locks, and if the power blips it boots straight back and logs itself in, so the agents return without me touching a thing. That last part matters more than it sounds. The whole point is that I never need to be in the room.

mosh and tmux handle the connection. One short command drops me back into the exact session I left, same tabs, same agents, mid task. Detaching costs nothing. I can shut the laptop while an agent is writing code, open my phone twenty minutes later, and watch it carry on from the same line.

The session even survives a reboot. tmux snapshots its layout every few minutes, so after a power cut or an update the mini rebuilds my tabs exactly as they were, working directories and all. One tab for whatever project I am deepest in, one for a file browser, one for reviewing changes, one for a system monitor. They all come back on their own.

There is one small thing I love more than I expected: screenshots. I grab a screenshot on my laptop and it syncs to the mini on its own, so I can paste it straight into the agent even though I am on a text-only terminal. The same sync drops those screenshots into my Obsidian notes too. It sounds trivial until you are debugging something visual from your phone and it simply works.

I will be straight with you, setting all of this up looked intimidating. mosh, tmux persistence, restore on boot, the launch agents that glue it together, none of it is hard exactly, but it is fiddly and easy to get subtly wrong. So I did the obvious thing and had Claude Code set the whole thing up for me. I told it what I wanted and it did the plumbing: the persistence, the tab layout, the boot-time restore, all of it.

It does not even have to be at home

Here is the part that surprised me. Because Tailscale makes the distance irrelevant, the always-on box does not have to be in your house. It could be a cheap Hetzner server, or a Mac sitting in another country. Tailscale joins it to your devices the same way no matter where it physically lives.

I did not plan any of this, by the way. I set it up as a temporary travel hack, because my mobile data abroad was slow and capped and I needed a way around it. Then I liked it so much that it just became how I work, at home and away.

And I have pushed it hard. I did two weeks of work over this setup while more than four thousand kilometres from home, and it behaved exactly as if I were on my own sofa. Same speed, same sessions, nothing to think about. So if you would rather run this on a server on the other side of the world than on a box in your hallway, you can, and you will not feel the difference.

Tailscale deserves its own shout out here. It is the most secure and least annoying way I have found to reach all of my machines. Nothing is exposed to the open internet, every device authenticates properly, and it just sits there working. I liked it enough that I put all of my devices and servers on it, and turned my home node into an exit node. That last bit means that when I travel I also get a private VPN back into my home network. One toggle and my traffic comes out of my house, on my own trusted connection, wherever I am. That alone would be worth it.

It pays off in smaller ways too. When the mini runs a dev server or a staging build, I can open it from my laptop or my phone anywhere in the world, just by visiting its Tailscale address. No tunnel, no deploy, no port opened to the internet. A localhost on the mini behaves like a localhost on whatever I am holding, so I review work in progress from a train the same way I would at my desk. I even told my agent to always hand me the Tailscale link for anything it spins up, so the preview is one tap away wherever I am, even on mobile while walking around.

The apps that make it pleasant

A couple of pieces of software take this from merely working to genuinely nice.

On my phone and iPad I use Moshi. It is an iOS app built for exactly this, mosh and tmux done properly on mobile. You pair it by scanning a QR code, sessions reconnect cleanly every time, and it can even surface what the agent is doing through notifications and a Live Activity, so I get a nudge on my watch when a run needs me. It is the first time working from my phone has felt real instead of a compromise.

On the Mac I use iTerm2 rather than the built-in Terminal, and the reasons are specific. iTerm2 lets me Command-click a link to open it, even inside the agent's own text interface, which the stock Terminal flatly cannot do. I can hold Option and drag to select and copy text out cleanly. And it lets me bind a key to send a raw sequence, which is what powers the one-press screenshot paste. Add the themes and the rest of the customisation and it is no contest for this kind of work.

Beyond those two, almost anything works. Any machine with a terminal can be a window into the mini, with nothing special installed on it. A cheap Linux laptop, an old spare you had in a drawer, a borrowed computer in a hotel lobby, they all behave the same way. That is the quiet luxury of this. The capable, expensive machine, the one with all the RAM and compute, stays at home or at the office, and everything you actually carry can be cheap and replaceable.

It quietly made me a better developer

There is a side effect I did not expect. Living in a terminal like this, over mosh and tmux and Tailscale, pushed me to understand the tools properly instead of hiding behind a friendly GUI. I got comfortable with the shell, with how remote machines really talk to each other, with how a proper network like Tailscale is put together. None of that was the goal, but all of it stuck.

You set the thing up once, and somewhere in the process you stop being someone who just uses a code editor and start being someone who is comfortable on a real machine over a real network. I did not expect a bandwidth problem to make me better at my job, but it did.

If you want the same rig

I have written the whole thing up as a playbook you can hand straight to your own coding agent: the remote agent rig playbook. It covers the always-on host, the mosh and tmux and Tailscale setup, the persistence and the boot restore, the screenshot trick, the exit-node VPN, and the handful of gotchas that cost me real time so they will not cost you any.

If you are doing serious work through agents and still tied to a single open laptop, you really do not have to be.

One note if you want to try this yourself. I did not build the setup by hand, I had Claude Code do it. It is exactly the kind of fiddly, many-small-pieces job an agent is good at. Point a capable one at the playbook and let it handle the plumbing.