Table of Contents
- What does AI coding agent remote access actually mean?
- What are the two deployment models for remote AI coding agents?
- How do you set up the free DIY stack with tmux, Tailscale, and SSH?
- How do you connect VS Code or a dev tunnel to the remote machine?
- Can you control an AI coding agent from your phone?
- Which AI coding agent remote access approach wins on cost, setup time, and security?
- Is it safe to leave an AI coding agent running unattended, and how do you lock it down?
- How do you get notified and approve tool calls remotely?
- Why do self-managed setups break, and when should you pay for a hosted platform?
- How did we compare these options?
- How do you get started with Agent 37?
- What do people also ask?
- How do I keep an AI coding agent running after I close my laptop or lose connection?
- How do I approve tool calls or respond to prompts when I'm not at the terminal?
- How do I connect VS Code's agent sessions to a remote machine via SSH or dev tunnel?
- Which approach is cheapest for always-on AI coding agents: VPS, home machine, or managed platform?
- What's the difference between a remote AI coding agent, a cloud coding agent, and a self-hosted bridge?
Do not index

AI coding agent remote access means keeping an agent like Claude Code, Codex, OpenClaw, or Hermes running on a machine that is not your laptop and steering it from anywhere. For founders, operators, and anyone who does not want to maintain a server, the simplest option is a managed platform: Agent 37 hosts OpenClaw and Hermes agents from $3.99/month with a browser terminal, visual file browser, and live Linux desktop, so you never open a port or babysit a tmux session. Agent 37 is a hosted environment for OpenClaw and Hermes, not a VPN or SSH bridge back to Claude Code running on your own desktop. If you are a developer who enjoys infrastructure, the free tmux plus Tailscale plus SSH stack below still works well.
Key takeaways
- Two deployment models exist: run the agent on a VPS or home machine you administer and reach it over SSH, or use a managed container that exposes browser tools. Every other option is a variation on one of these.
- The free DIY stack is tmux + Tailscale + Mosh or SSH. tmux keeps the agent process alive on the server when you disconnect, and Tailscale gives you a private network so no port is exposed to the public internet.
- Phone control comes in three flavors: first-party features like Claude Code Remote Control, chat bridges over Telegram or Discord, and QR-pair relays that mirror a terminal to a mobile browser.
- Agent 37 starts at $3.99/month with bring-your-own API keys. Each agent runs in an isolated container, keys go directly to Anthropic or OpenAI, and you manage the agent through a full TTY terminal, file browser, and noVNC desktop in the browser.
- Unattended agents need hardening: a limited Linux user, Tailscale ACLs, scoped secrets, and an audit log of what the agent did overnight.
What does AI coding agent remote access actually mean?
AI coding agent remote access is the ability to start, monitor, and steer an AI coding agent such as Claude Code, Codex, OpenClaw, or Hermes from a device other than the machine it runs on. The agent lives on a server, VM, or managed container, and you reach it through SSH, a web terminal, a phone bridge, or a hosted dashboard.
The term covers two needs that people often conflate. The first is persistence: you want the agent to keep working after you close the lid, lose Wi-Fi, or board a flight. The second is control: you want to read progress, answer a question, or approve a tool call from a phone or a second computer.
Terminal-based agents such as Claude Code, OpenAI Codex CLI, and the Pi coding agent were built for a local shell, so persistence and control both have to be added on. Agent frameworks like OpenClaw and Hermes were built as long-running services with messaging channels, so they fit remote hosting more naturally. We cover both groups below.
What are the two deployment models for remote AI coding agents?
There are two deployment models. In the self-hosted model, the agent runs on a VPS or home machine you administer, and you reach it over SSH or a VPN. In the managed model, a platform runs the agent in its own container and exposes browser tools. A self-hosted bridge sits between them: your machine, someone else's relay.
The self-hosted model gives you full control and a bill that depends on what you run. A VPS from any cloud provider works, as does a Mac mini or an old laptop at home. You own uptime, patches, backups, and the security of the box. If you are weighing a home machine, our guide to running OpenClaw on a Mac mini for 24/7 duty walks through the real hardware and power costs.
The managed model trades control for convenience. A platform such as Agent 37 runs each agent in its own isolated container, applies runtime updates and security patches automatically, and exposes a terminal, file browser, and live desktop in the browser. You bring your own API keys, which go directly to Anthropic or OpenAI; the platform never touches them.
A self-hosted bridge is the hybrid. Tools like remote-pi or a custom Telegram bot run on your machine and relay messages through a third-party service. You still own the server, but the control surface lives somewhere else. For a deeper look at the SSH versus browser trade-off for one specific agent, see our comparison of Claude Code remote access options.
How do you set up the free DIY stack with tmux, Tailscale, and SSH?
The cheapest reliable setup is tmux for session persistence, Tailscale for a private network, and Mosh or SSH for the connection. Install all three on the remote machine, start the agent inside a named tmux session, and reattach from any device on your tailnet. The agent keeps working even when your laptop sleeps or your connection drops.
Here is the full setup on an Ubuntu VPS. It takes about a dozen commands and opens no public ports.
# On the remote machine
sudo apt update && sudo apt install -y tmux mosh
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
# Start the agent inside a named, persistent session
tmux new -s agent
claude # or codex, pi, or your agent of choice
# Detach with Ctrl-b then d; the agent keeps runningFrom your laptop or phone, join the same tailnet, then connect and reattach:
mosh youruser@your-machine-name
tmux attach -t agentMosh matters more than it looks. Unlike plain SSH, Mosh survives IP changes and sleep cycles, so switching from Wi-Fi to cellular does not kill the connection. tmux handles the other half: because the agent runs inside the tmux server process, closing your client does nothing to the agent. The tmux wiki documents session and window commands if you want several agents in separate windows.
Tailscale is free for personal use; confirm the current plan limits on tailscale.com before relying on it for a team. The important property is that your machine never listens on a public IP, which removes the entire class of brute-force SSH attacks.
How do you connect VS Code or a dev tunnel to the remote machine?
If you prefer an editor, the VS Code Remote - SSH extension opens a full workspace on the remote box over your tailnet, and agent sessions started there run on the server, not your laptop. Dev Containers add a reproducible environment on top. Dev tunnels do the same job without a VPN by relaying through Microsoft's service, which is convenient but means your traffic transits a third party.

Can you control an AI coding agent from your phone?
You can control an AI coding agent from a phone three ways: a first-party feature such as Claude Code Remote Control, a chat bridge that forwards messages through Telegram or Discord, or a QR-pair relay that mirrors the terminal to a mobile web page. Each trades setup effort for capability, and only some let you approve tool calls remotely.
First-party features are the lowest friction when they exist. Anthropic's Claude Code Remote Control pairs a running session with the Claude app so you can read output and send instructions from a phone; it requires a paid Claude plan, and the session must stay alive on the host machine, so you still need tmux or a hosted box underneath. OpenAI's cloud-based Codex and GitHub's Copilot coding agent sidestep the problem by running tasks on their own infrastructure, at the cost of being tied to one vendor's runtime.
Chat bridges give the most flexibility. OpenClaw ships with messaging channels for Telegram, Discord, Slack, and WhatsApp, so the agent can post progress and accept new tasks from whatever app you already have open. Our walkthrough on setting messaging channels during OpenClaw setup shows the configuration step by step. A Telegram bridge is usually the fastest route to approval-style workflows because the agent can ask a yes-or-no question and wait for your reply.
QR-pair relays such as remote-pi or Agents Room mirror a terminal to a mobile web page after you scan a code. They are agent-agnostic and quick to try, but most are small open-source projects, so check who operates the relay and what it can see.
Which AI coding agent remote access approach wins on cost, setup time, and security?
Five approaches cover nearly every case: the DIY tmux and Tailscale stack, a web terminal such as VibeTunnel, a Telegram or Discord bridge, a first-party remote feature like Claude Code Remote Control, and a managed platform like Agent 37. DIY is cheapest in cash and most expensive in time; managed hosting from $3.99/month is the reverse.
Option | Best for | Pricing or format | Setup time | Standout limit |
Agent 37 managed hosting | Non-technical users and teams who want a browser terminal, file browser, live desktop, and task board without running a server | From $3.99/month, bring your own API keys | One-click deploy | Hosts OpenClaw and Hermes, not a Claude Code session on your own laptop |
DIY tmux + Tailscale + Mosh | Developers who already have a VPS or home box and want zero vendor lock-in | Free software; you pay for the machine | About a dozen commands | No approvals or notifications unless you build them |
Web terminal (VibeTunnel) | Reaching a local macOS terminal from any browser | Open source | Minutes, plus a tunnel or tailnet | Terminal mirroring only; your Mac must stay awake |
Chat bridge (Telegram or Discord) | Progress updates and yes-or-no approvals from a phone | Free bots; an agent host is still required | 20 to 30 minutes | Not a full terminal; complex interventions still need SSH |
First-party remote (Claude Code Remote Control, Codex cloud, Copilot coding agent) | Users committed to one vendor's agent | Included with the vendor's subscription; confirm current plans | Minutes | Locked to one agent; persistence is still your problem for Claude Code |
The table makes one pattern obvious. Every option except managed hosting assumes a machine that you keep alive. That is fine if you already run one, and expensive in attention if you do not. Our guide to Claude Code background agent setups covers the always-on side in more detail.
Is it safe to leave an AI coding agent running unattended, and how do you lock it down?
It is safe if you treat the agent like an untrusted service account. Run it as a limited Linux user, never expose its port publicly, restrict who can reach it with Tailscale ACLs or a VPN, scope API keys to the minimum needed, and keep a log of every command it ran so you can audit it later.
Unattended agents carry the same risk profile as any remote-access service, with one twist: the agent executes commands on its own. NIST's Guide to Enterprise Telework, Remote Access, and BYOD Security (SP 800-46 Rev. 2) recommends assuming remote devices and networks are hostile, and that assumption applies cleanly here. Concretely:
- Create a dedicated user with no sudo rights and run the agent as that user. The least-privilege control AC-6 in NIST SP 800-53 Rev. 5 is the reference if you need to justify it to a team.
- Never bind the agent's web UI or API to 0.0.0.0. Keep it on localhost or the tailnet and reach it through SSH or Tailscale.
- Write a Tailscale ACL that only lets your personal devices reach the agent host on port 22 and UDP 60000 to 61000 for Mosh. Tailscale's ACL documentation shows the policy format.
- Scope secrets. Give the agent a project-specific API key you can revoke, store it in a file readable only by the agent user, and never paste production database credentials into a prompt.
- Log everything. Run the agent inside
script -f ~/agent-$(date +%F).logor use your agent's built-in transcript so you can audit what happened overnight. Review the log before merging anything.
On a managed platform the first three items are handled for you. Agent 37 runs every agent in an isolated container, routes API keys directly to the provider, and applies security patches automatically, which is why we recommend it to users who do not want to maintain an ACL file. CISA's Zero Trust Maturity Model is a useful framework for deciding how far to take the remaining controls.
How do you get notified and approve tool calls remotely?
Approval prompts are the most common reason unattended agents stall. Three patterns work. Run the agent in a permission mode that auto-approves read-only actions and asks only for writes, then answer the prompt from a tmux reattach on your phone. Or wire a chat bridge so the agent asks in Telegram and waits. Or use a platform task board where outputs land for review. On Agent 37, the task board is where you assign work, review outputs, and schedule recurring jobs, so a reviewer never needs the terminal at all.

Why do self-managed setups break, and when should you pay for a hosted platform?
Self-managed setups fail in predictable ways: idle SSH disconnects, approval prompts nobody sees, two agents fighting over one tmux session, and a VPS bill for a machine idling all month. Pay for a hosted platform when you need approvals and task review without a terminal, or when non-technical teammates must reach the agent.
The failures are mundane. Idle SSH connections drop after a cloud provider's NAT timeout, which is why Mosh exists. An agent hits a permission prompt at 2 a.m. and sits there until morning. Two people attach to the same tmux session and type over each other. A VPS runs all month for an agent that works four hours a week, and a home machine goes down during a power blip with nobody there to restart it.
Our decision rule is simple. Stay self-hosted if you are a single developer, you already pay for a machine, and you are comfortable debugging networking on a phone screen. Move to a hosted platform when any of these are true: a non-technical founder or client needs to reach the agent, you need outputs reviewed without a terminal, you want to resell the setup under your own brand, or the time you spend on uptime is worth more than the hosting bill.
Agent 37 covers all four cases, with white-label APIs and preloaded templates for agencies, 1000+ integrations via Composio, and dedicated support for teams. It also reached #1 Product of the Day on Product Hunt, which is a reasonable signal that the one-click deployment works for people who are not infrastructure engineers.
How did we compare these options?
We compared each approach on four things: published pricing from vendor plan pages, setup time measured in commands or clicks, the security surface each one exposes, and whether it supports remote approvals. For Agent 37 we used our own plan page; for tools like Tailscale and VS Code we used current documentation and ask readers to confirm pricing.
We did not run benchmarks. Setup times are counts of the commands or clicks each approach needs on a fresh Ubuntu machine, and security notes describe the default network exposure of each tool, not a formal audit.
How do you get started with Agent 37?
Create an account at Agent 37, pick OpenClaw or Hermes, and deploy with one click. Add your own Anthropic or OpenAI API key, which goes directly to the provider, then open the browser terminal, file browser, or live desktop from any device. Plans start at $3.99/month, so testing remote access costs less than a coffee.
Deploy your first hosted agent on Agent 37 and reach it from any browser today.
What do people also ask?
How do I keep an AI coding agent running after I close my laptop or lose connection?
Run the agent on a machine that stays on, not your laptop. On a VPS or home server, start it inside a named tmux session (tmux new -s agent) and detach; the process keeps running and you reattach later with tmux attach. On a managed platform like Agent 37, the agent runs in its own container that stays up whether or not your browser is open.
How do I approve tool calls or respond to prompts when I'm not at the terminal?
Use one of three patterns: reattach to the tmux session from your phone over Mosh and answer the prompt directly, connect the agent to a Telegram or Discord bridge so it asks you in chat and waits for a reply, or use a hosted task board where outputs land for review. On Agent 37 the task board lets you assign work, review outputs, and schedule recurring jobs without opening a terminal.
How do I connect VS Code's agent sessions to a remote machine via SSH or dev tunnel?
Install the Remote - SSH extension, add the remote host to your SSH config (or reach it over Tailscale), and open the folder remotely. Agent sessions you start in that window execute on the remote machine. Dev tunnels do the same without a VPN by relaying through Microsoft's service, which is simpler but routes traffic through a third party.
Which approach is cheapest for always-on AI coding agents: VPS, home machine, or managed platform?
A home machine you already own is cheapest in cash but costs electricity and your time when it goes down. A small VPS is the usual middle ground; check current provider pricing since it varies by region and size. A managed platform such as Agent 37 starts at $3.99/month with bring-your-own API keys and removes the maintenance work, which is often the cheapest option once you count your own hours.
What's the difference between a remote AI coding agent, a cloud coding agent, and a self-hosted bridge?
A remote AI coding agent runs on a server you control and you reach it over SSH or a VPN. A cloud coding agent, like Codex cloud or GitHub's Copilot coding agent, runs on the vendor's infrastructure and you only see results. A self-hosted bridge keeps the agent on your machine but relays messages through a third-party service such as Telegram or a QR-pair relay. Managed hosting like Agent 37 is a fourth option: your own agent, in an isolated container, with browser tools instead of SSH.