Claude Code Remote Control: Running Agents From Your Phone
Here’s how to Claude Code remote control: three practical setups that let you fire off long agent runs from your phone—and a clear-eyed look at what breaks when you’re not at your desk.

Here’s how to Claude Code remote control: three practical setups that let you fire off long agent runs from your phone—and a clear-eyed look at what breaks when you’re not at your desk. We’ll rank them, show the exact commands, and deal with the messy bits: dropped SSH sessions, permission prompts you can’t answer from a train, and where your API keys actually live.
How to Claude Code remote control: three approaches ranked by reliability
Every method keeps a host machine running; only the connection path changes.
Setup | Reliability | Secrets location | Mobile approval |
|---|---|---|---|
SSH + tmux (your hardware) | Highest | On your machine | Manual, clunky |
Hosted dev box (cloud VM) | Medium | On someone else’s disk | Manual, clunky |
Phone bridge ( | Moderate | On your machine | Web UI prompts, sometimes flaky |
SSH + tmux: the least-fail way to run Claude Code from your phone
Takeaway: For anyone who needs to start a multi‑hour agent task from a mobile device, SSHing into a local machine inside a tmux session is the most battle‑tested path. It keeps credentials on your own hardware, survives network drops, and gives you full control over the CLI—no middleman.
The workflow that actually works, borrowed from practical mobile‑encoding setups:
# on your desktop/laptop first
ssh -t myuser@hostname tmux new -s claude && claudeFrom your phone, attach to the existing session:
ssh -t myuser@hostname tmux attach -t claudeIf the cell signal wobbles, mosh keeps the session hanging on by a thread better than raw SSH. Pair it with a terminal app that respects clipboard and keyboard shortcuts (Blink on iOS, Termux on Android) and you can edit, scroll, and paste without wanting to throw the phone out the window.
What breaks? Permission prompts. Claude Code will ask “Run shell command? (y/n)” right in the tmux pane. On a phone, typing y and Enter is doable, but nerve‑wracking when the command might delete a directory. Some developers turn on auto‑approval in .clauderc—don’t. That’s how you wake up to a repo merge you never intended. Instead, leave approvals on and carve out a tiny moment of concentration. For teams shipping production AI features, our AI code audit can catch the aftermath of an over‑enthusiastic agent run before it reaches users.
The hosted dev box: Claude Code on a cloud machine
Takeaway: If you can’t leave your own hardware powered on, spinning up a cloud VM with Claude Code and tmux works—but your secrets now live on a provider’s disk. Only use this for throw‑away experiments or with strictly scoped, short‑lived credentials.
The setup is identical to the SSH + tmux flow, just with a remote IP. You’ll copy your SSH key, clone your repo, and start claude inside tmux. Services like Agent 37 offer hosted environments for AI agents, but they’re tailored to OpenClaw/Hermes, not a stock Claude Code session—so you’re still handling OS‑level security yourself.
Secrets risk: your ANTHROPIC_API_KEY, GitHub token, and any environment variables you source live on that instance. If the VM is compromised, an attacker can impersonate you. For client projects, we recommend a dedicated secrets manager and ephemeral tokens. When we build remote‑agent infrastructure for founders, our web development services include isolated run‑time environments that wipe clean after each session, so no long‑lived keys linger.
The phone bridge: /remote-control and Claude’s native session handoff
Takeaway: As of mid‑2025, Claude Code ships a built‑in remote‑control command that streams your session to the code.claude.com dashboard. It’s one command and no SSH setup, but the host still needs to stay alive, and the mobile browser experience can flake out under heavy output.
claude remote-controlThat command makes a card appear on your Claude Code web dashboard, labeled with your machine’s hostname. Tap it on your phone, and you can pick up the conversation mid‑stream. In theory, approval prompts appear in the web UI; in practice, developers report that the session sometimes hangs when switching networks, and the UI can lag on spotty mobile data. It’s the simplest entry point, but we rank it lowest for mission‑critical long runs.
One sharp edge: the web interface won’t reflect tmux-style multiplexing. If you were running multiple sessions, you can only attach to one. Keep that in mind if you like to monitor an agent in one pane while working in another.
What breaks: dropped sessions, permission prompts you cannot answer from a train, and secrets living on someone else’s machine
Every mobile‑to‑Claude‑Code path shares a few failure modes that plague developers:
- Dropped connections. Even with mosh or the web bridge, a sudden cell dead zone can disorient the agent. Tmux is your safety net; the process keeps running, but you might not know what happened until you re‑attach. Add a simple heartbeat log that writes
dateevery few minutes so you can tell whether the agent is still alive. - Permission prompts. In SSH + tmux, the prompt appears in the terminal and you answer it (or fat‑finger it). In the native remote‑control, a prompt might not show on the phone browser until you refresh—while Claude Code waits indefinitely. The moshi‑hook approach auto‑approves everything, but that strips away the human in the loop. For codebases where one bad
rm -rfmatters, accept the friction. - Secrets sprawl. SSH‑on‑your‑own‑metal keeps keys local. A cloud VM puts them at a provider’s mercy. The moment you type
export GITHUB_TOKEN=ghp_...on a DigitalOcean droplet, you’ve lost a degree of control. Our vibe‑coding cleanup service often spots secrets that agents accidentally splatter into config files—a separate battle worth fighting after a long remote run.
Keeping a human in the loop on destructive commands
Takeaway: You can’t automation‑wash sound judgment. The most reliable guardrail is to leave allow_tool_use settings at their default and train yourself to verify the screen, even if it’s only 6.1 inches.
A few practical tricks from the wild:
- Use a notification hook that fires on pre‑tool‑use approval. Write a small script that wraps
claudeand POSTs a message to a Slack or Telegram channel when a prompt is pending. You approve via your phone notification—no terminal typing required. - Configure
.claudercto require explicit confirmation only for high‑impact commands (dangerously_overwrite,shell) and allow safe reads. This reduces prompt fatigue without handing over the keys to the castle. - After the agent run finishes, treat its output like a PR from a junior dev. Run a diff, scan for hardcoded credentials, and verify tests before merging. That’s exactly the workflow we built when we started offering AI code audits for agent‑driven changes—catching what a phone‑based approval flow misses.
For longer projects where you’re shipping agent‑written code to production, the safety net isn’t a single CLI flag; it’s a pipeline. Our web infrastructure work includes review gates that require a signed commit from a human reviewer before any agent‑authored change reaches main. That’s how you scale Claude Code remote control from a curiosity into a tool your team can trust.
FAQ
Can I use Claude Code remote control without a desktop running?
No. Every method requires a host machine to stay powered on and connected. The built‑in remote‑control command and SSH‑based approaches both need a Mac or Linux host running; without it, the session dies.
How do I handle Claude Code permissions when I’m not at the keyboard?
You can type approvals directly in a tmux pane over SSH, but that’s awkward on a tiny keyboard. A safer middle ground is to let Claude Code prompt for destructive commands, and use a notification hook (like an HTTP call on pending approval) so you can respond on your phone before the operation runs.
Is SSH + tmux secure for accessing Claude Code from my phone?
Yes, when you use key‑based authentication, keep your private key off shared devices, and never forward your SSH agent into an untrusted environment. It’s measurably safer than running your entire development environment on a cloud VM, because your secrets stay on hardware you physically control.