When I planned my travel for this summer, I figured all those hours on planes and trains would give me time to work on my projects with Claude and Codex. There was one obvious problem. I was counting on airplane Wi-Fi.
So before I left, I set up both agents in the development LXC on my Proxmox server at home. The container had its own Tailscale address, my code was there, and it had the same internet connection it enjoys when I’m sitting at my desk.
A couple of weeks ago I was on a transatlantic flight and got to put that arrangement to use. Sure enough, the Wi-Fi was flaky. Claude and Codex had excellent internet. I was the one on the plane.
Consider what happens when you ask an agent to look into a failing test. It reads the code, runs the test, changes something, and runs the test again. How much of that traffic needs to go through the plane? Once my prompt reaches the container, the next thing I need from Wi-Fi is to see what the agent did. That’s a modest job for an internet connection. Typing is another story.
So why do I need Mosh if I already have SSH?
If you’ve ever hit backspace a second time because the first appeared to do nothing, you already know what I wanted to fix. With an ordinary SSH terminal the keystroke goes to the server and the updated screen comes back. By the time I see that my first backspace worked, I’ve deleted a perfectly good character with the second one.
This is where Mosh does something awesome: it doesn’t wait. It guesses what the remote shell is about to echo and shows me the edit right away, then quietly fixes things if the server disagrees. That helps even with something as simple as composing a prompt. If Wi-Fi goes away for a bit, the same Mosh session can bring the screen up to date once the connection returns, provided the client and server are still running. How Mosh works
On my Mac I opened Ghostty and ran Mosh against the container’s Tailscale address. That put me directly in the LXC where the agents were running. The Mosh client on my phone could reach the very same address, which turned out to be a good reason to keep tmux around.
Getting it running
On the Mac, sign in to your tailnet using the Tailscale app. If you use Homebrew, installing the terminal and the Mosh client takes two commands. Ghostty for macOS · Mosh installation
brew install --cask ghostty
brew install mosh
There’s one Proxmox detail worth checking before installing anything in the container. If yours is an unprivileged LXC, look for /dev/net/tun inside it. If it’s missing, go to the container’s Resources tab in Proxmox, choose Add → Device Passthrough and enter /dev/net/tun. Shut the container down and start it again so it picks up the device. Tailscale in LXC containers
For a Debian or Ubuntu LXC, run these commands as root inside the container. Follow the sign-in link from tailscale up and use the same tailnet as the Mac.
apt update
apt install curl mosh tmux openssh-server
systemctl enable --now ssh
curl -fsSL https://tailscale.com/install.sh | sh
tailscale up
tailscale ip -4
The last command gives you the address to use from Ghostty. Make sure your usual development user can log in to the container over SSH. Mosh uses that login to start mosh-server, then switches to UDP. If SSH works and Mosh just sits there, check whether your tailnet policy and firewall allow UDP 60000–61000 to the container as well as the SSH port (normally TCP 22). Mosh manual
With Node.js and npm set up for your development user, you can install both agents under that account.
npm install -g @anthropic-ai/claude-code @openai/codex
How do I pick up the same session on my phone?
Suppose I start Claude from my Mac, put the Mac away and log in from my phone. Same user, same container, same project directory. What do I get? A fresh shell prompt. Somewhere on that machine Claude may be waiting for me to approve a command, and here I am looking at a prompt where I could start another copy of Claude.
This is what I use good old tmux for. Start Claude in a tmux window and the container keeps that terminal open for me. Now the question from my phone is a much easier one to answer. Which session did I leave it in? Here dev-lxc is an example tailnet name for the container (the address from tailscale ip -4 works too).
# In Ghostty on the Mac
mosh dev@dev-lxc
# At the development container's prompt
tmux new-session -A -s agents
That little -A is worth keeping. The first time through, tmux creates a session called agents. Run the same command from your phone as the same user and it attaches you to the session you already have, including whatever Claude has on the screen. tmux manual
Open your project and run claude in the first window. Press Ctrl+B, release it, then press lowercase c to create another window for codex. I’d finish both sign-ins while still at home. There’s little to be learned from debugging three different logins over airplane Wi-Fi :)
Try it before you leave
You can test both parts of this setup without spending a token. From a shell in the container, outside your existing tmux session, run tmux new-session -s flight. Start this loop in the new window.
log=$(mktemp)
echo "$log"
for step in 1 2 3 4 5; do
printf '%s pid=%s step=%s\n' "$(date -u +%T)" "$$" "$step" >> "$log"
sleep 5
done
cat "$log"
Turn Wi-Fi off on the Mac for ten seconds, leave Ghostty open, then turn Wi-Fi back on. When Mosh catches up, look at the timestamps. Two entries five seconds apart while your Mac was offline tell you more about where the work happens than a screenful of agent output.
Now run the loop again. While it’s running, detach from tmux with Ctrl+B followed by lowercase d, then exit the remote shell. Connect to the LXC from your phone as the same user and reattach.
tmux attach -t flight
You should see the original loop’s output, right down to the same shell PID. If you get a “can’t find session” error, run tmux ls and check which user you logged in as before starting another session.
Of course, if I restart the container, the processes in it are gone. There’s one failure no amount of Mosh will fix. If Claude stops to ask for my approval right as I put the laptop away, it will sit there and politely wait as long as it takes. Not a single packet lost, and not a single line of code written either.
How did it work out?
I kept a coding session going for the whole 10-hour transatlantic flight. Not ten hours of Wi-Fi, mind you. The Wi-Fi came and went as it pleased, and so did the mobile coverage on the other flights and train rides where I used this setup. The session at home didn’t care either way. Every time I got a connection back, Claude and Codex were right where I’d left them.
I’m addicted to multi-agentic development, and apparently an ocean isn’t enough to fix that. If you’re a fellow addict, set this up before your next trip.