Agentic Coding On-the-Go
The Claude iOS app gives you the ability to use Claude Code on the go. It works fine, but it doesn't run on my computer which makes it significantly less useful. I want to start working at my desk, leave the house, and pick up the exact same conversation from my phone while waiting in line somewhere. Turns out this is very doable with three tools: tmux, Tailscale, and Termius.
The setup takes ~30 minutes. When you're done, you'll be able to seamlessly transition from coding at home to coding on-the-go via remote connection to your primary Mac workstation.
1. tmux (Persistent Terminal Sessions)
tmux is a terminal multiplexer—it keeps your shell sessions alive even when you disconnect. This is the foundation of the whole setup.
1brew install tmux
The core commands you need:
1# Create a new named session2tmux new -s coding34# Start Claude Code inside the session5claude67# Detach from session (keeps it running)8# Press: Ctrl+B, then D910# List all sessions11tmux ls1213# Reattach to a session14tmux attach -t coding1516# Kill a session when done17tmux kill-session -t coding
I use descriptive session names for different projects: tmux new -s website-redesign or tmux new -s api-refactor. Simple but effective.
Making tmux Survive Reboots
With the right plugins, tmux sessions persist across Mac restarts. This is very nice so that you don't have to stress about restarts, crashes, laptop running out of battery, etc.. when you open tmux again, everything will be restored.
Install TPM (tmux plugin manager):
1git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
Create ~/.tmux.conf:
1# List of TPM plugins2set -g @plugin 'tmux-plugins/tpm'3set -g @plugin 'tmux-plugins/tmux-resurrect'4set -g @plugin 'tmux-plugins/tmux-continuum'56# Continuum: autosave + autorestore7set -g @continuum-restore 'on'8set -g @continuum-save-interval '5'910# Initialize TPM (keep this at the bottom of plugin section)11run '~/.tmux/plugins/tpm/tpm'1213# Enable mouse support for intuitive scrolling on iPhone via Termius!14set -g mouse on
Then start tmux and press Ctrl+B, Shift+I to install plugins. Sessions now auto-save every 5 minutes and auto-restore on reboot.
2. Tailscale (Access Your Mac From Anywhere)
Tailscale creates a mesh VPN between your devices. Once set up, your iPhone can SSH into your home Mac from anywhere—coffee shop, airport, hotel—as if you were on the same LAN. No port forwarding, no dynamic DNS nonsense.
Setup:
- Download from tailscale.com/download
- Sign in (Google, GitHub, etc.)
- Your Mac gets a Tailscale IP (100.x.x.x range)
Enable SSH on your Mac:
- Open System Settings
- Go to General → Sharing
- Turn on Remote Login
Find your Tailscale IP:
1tailscale ip -42# Example output: 100.101.102.103
Tailscale also provides Magic DNS—you can SSH to your-mac-hostname instead of the IP.
After you've installed Tailscale on your Mac and setup an account, go install Tailscale on your iPhone and iPad too and sign in. All devices on the same account see each other, as long as they're connected to Tailscale.
One thing to note: your Mac needs to stay awake for this to work. I use Sleep Control Centre to prevent it from sleeping when I'm away.
3. Termius (SSH From Your Phone)
Termius is a great SSH client for iOS.
- iPhone/iPad: App Store
Create a new host with your Tailscale IP (or Magic DNS name), your Mac username, and SSH key auth. Use SSH keys, not passwords—generate with ssh-keygen, copy with ssh-copy-id. If you don't know how to do this, send this entire blog post to an AI chatbot and ask them to walk you through it ;)
The Workflow
At home:
1tmux new -s myproject2cd ~/projects/my-awesome-app3claude45# Work with Claude...67# Need to leave? Detach:8# Ctrl+B, then D910# Close terminal. Leave house.
On-the-go (from iPhone):
1# Open Termius → tap "Home Mac" → you're in23tmux attach -t myproject45# You're back. Claude remembers everything.
That's it. The session is exactly where you left it.
Misc Tips
Multiple sessions: Run tmux new -s website, tmux new -s api, etc. List with tmux ls, attach with tmux attach -t name.
Mac sleeping? I use Sleep Control Centre to keep it awake.