Travel Setup
My MacBook lives in my bag with the lid closed and the CPU still running. From my phone, I attach to long-running Zellij sessions over a private mesh and drive Claude Code from the train. Here's how it's wired.
Mac as a server
Apple normally puts the Mac to sleep when the lid closes. To keep it running in my bag I use a LaunchAgent that runs caffeinate -dimsu permanently. The -s stops AC-power system sleep and -u simulates user activity, so the closed lid is ignored.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key><string>com.user.caffeinate</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/caffeinate</string>
<string>-dimsu</string>
</array>
<key>RunAtLoad</key><true/>
<key>KeepAlive</key><true/>
</dict>
</plist>One-time power config so the system never sleeps on AC (display still can):
sudo pmset -c sleep 0 # never system-sleep on AC
sudo pmset -c disksleep 10
sudo pmset -c displaysleep 10
sudo pmset -c powernap 0Private mesh (Tailscale)
The phone and Mac sit on the same Tailscale tailnet. No port forwarding, no public exposure. Every device has a stable private IP that follows it across networks. Cafe Wi-Fi, train cellular, airport hotspot: the IP doesn't change.
# the Mac's tailnet IP is stable across networks
$ tailscale ip -4
100.x.y.zZellij sessions (work, claw-bot, …)
Zellij is the primary multiplexer. I keep named sessions running permanently. work for whatever I'm shipping, claw-botfor the agent orchestrator. Detaching doesn't kill the session; closing the lid doesn't kill the Mac. So the sessions just outlive any single working location.
# start a named session on the Mac (e.g. "claw-bot" or "work")
$ zellij --session claw-bot
# detach with Ctrl-o d, session stays alive
# from the phone over Mosh, re-attach with:
$ zellij attach claw-botOne quirk worth knowing: Zellij needs at least one attached client to keep panes alive. I keep a single Warp window on the Mac running zellij attach workas the "anchor" client. The phone attaches as a second client to the same session via Mosh.
Phone → Mac (Termius + Mosh)
Termius on the phone connects over Mosh, not plain SSH. Mosh is roaming-friendly: the connection survives Wi-Fi → cellular handoffs, screen locks, and bad networks. tmux/Zellij sessions on the Mac persist, so I just re-attach.
# Termius host config (iOS/Android)
Alias: Mac (Tailscale)
Hostname: 100.x.y.z
Username: mafex
SSH key: Ed25519 (generated in Termius keychain)
Use Mosh: ON
Mosh server path: /opt/homebrew/bin/mosh-server # absolute path mattersThe mosh-serverpath has to be absolute. Termius launches a non-login shell on the Mac, and non-login shells don't have /opt/homebrew/bin on PATH, so a relative mosh-server silently fails to launch.
Or just message clawbot
For most things I don't even open Termius. I built clawbot, a personal orchestrator that lives on Telegram and runs locally on the Mac. It can read Linear tickets, drive Claude Code in a per-ticket tmux session, or run a two-agent plan-review loop where Claude plans and Codex critiques. The Mac stays in my bag. I'm just texting it from the train.
The whole stack (clamshell config, Tailscale, Mosh, the clawbot skills, and the Zellij ping-pong layout) is documented end-to-end in my dotfiles. Ask me for the doc if you want to reproduce it.
Daily flow
- Plug Mac into AC, open Warp, run
zellij attach work. - Close lid. Put it in my bag.
- On the phone: Tailscale on, Termius → Mac → Mosh →
zellij attach claw-bot. - Or skip the terminal entirely and message clawbot in Telegram:
pingpong STUDIO-237.