blog

How to Remotely Monitor Your Claude Code Sessions From Your Phone

Learn how to set up remote access to your Claude Code terminal sessions using Tailscale, tmux, and Termius. Check on long-running AI tasks from your phone—completely free.

The Problem

I run Claude Code on my MacBook Pro, but sometimes tasks take a while—refactoring a large codebase, running comprehensive tests, or exploring complex architectures. When I need to step away, I want to check progress without being tethered to my desk.

The Solution: Tailscale + tmux + Termius

After exploring several options, this combination proved the most robust:

  • tmux - Terminal multiplexer that keeps sessions alive
  • Tailscale - Mesh VPN that gives your devices stable IPs
  • Termius - SSH client for iOS/Android

Why This Stack?

I considered several approaches:

  • tmux alone - Simple but requires port forwarding and dynamic IP hassles
  • VS Code Remote - Familiar IDE but poor phone usability
  • Mosh + tmux - Handles flaky connections but extra setup
  • Tailscale + tmux - Stable IP anywhere, free tier, easy setup (my choice!)

Step-by-Step Setup

1. Install tmux (Mac)

brew install tmux

2. Install Tailscale

On Mac:

brew install --cask tailscale

Or download from the Mac App Store. On your iPhone/Android, search "Tailscale" in your app store and sign in with the same account.

Key Settings:

  • Enable "Allow incoming connections"
  • Enable "Launch Tailscale at login"

3. Enable SSH on Your Mac

  1. Open System SettingsGeneralSharing
  2. Turn on Remote Login
  3. Note your username (run whoami in terminal)

4. Install Termius on Your Phone

Download from the App Store. Set up a new host with your Tailscale IP, port 22, your Mac username, and password.

Prevent Your Mac From Sleeping

Critical for remote access! Configure these settings:

In System Settings:

  • Battery → Options → Wake for network access → On
  • Battery → Prevent automatic sleeping when display is off → On (when plugged in)

Via Terminal:

# Auto-restart after power failure
sudo pmset -a autorestart 1
# Disable sleep while plugged in (optional)
sudo pmset -c sleep 0

Daily Workflow

Before Leaving Your Desk

# Start a named tmux session
tmux new -s claude
# Run Claude Code inside it
claude

From Your Phone

  1. Open Termius
  2. Connect to your Mac via Tailscale IP
  3. Reattach to your session: tmux attach -t claude

When You're Done Checking

Detach (keeps Claude Code running): Ctrl+B, then D

tmux Cheat Sheet

Session Management

  • tmux new -s name - Create named session
  • tmux attach -t name - Attach to session
  • tmux ls - List sessions
  • tmux kill-session -t name - Kill session

Inside tmux (prefix is Ctrl+B)

  • Ctrl+B, D - Detach from session
  • Ctrl+B, [ - Enter scroll mode (use arrows, Q to exit)
  • Ctrl+B, C - Create new window
  • Ctrl+B, N - Next window
  • Ctrl+B, % - Split pane vertically
  • Ctrl+B, " - Split pane horizontally
  • Ctrl+B, Z - Toggle pane zoom

Enable Mouse/Trackpad Scrolling

Add to ~/.tmux.conf:

set -g mouse on

Reload config: tmux source-file ~/.tmux.conf

Pro Tips

Multi-Device Viewing

Both your Mac and phone can view the same session simultaneously with tmux attach -t claude. Note: The session dimensions resize to the smallest attached terminal.

Tailscale MagicDNS

Instead of remembering IPs, you can use hostnames like ssh tihomir@mbp. Enable MagicDNS in Tailscale settings.

Session Persistence

tmux keeps your session alive even if your SSH connection drops. All output from Claude Code remains in the scrollback buffer—nothing is lost.

Useful Resources

Cost

Total: $0 for this entire setup.

  • tmux - Free, open source
  • Tailscale - Free tier (100 devices, 3 users)
  • Termius - Free tier available

Conclusion

This setup takes about 10-15 minutes to configure and gives you reliable remote access to your Claude Code sessions from anywhere. The combination of Tailscale's stable networking and tmux's session persistence means you'll never lose track of a long-running AI task again.

Written with assistance from Claude Code—which I monitored remotely while writing this post.

Tihomir Opacic

03.02.2026.

Let's Discuss!

We're looking forward to understanding your needs and exploring how we can help you achieve your goals.

Tihomir Opacic

founder and CEO

Orange Hill