# Claude Code Remote Control Without the Laptop: Code From Your Phone

> Claude Code Remote Control needs your laptop on and awake. What it does well, where it stops, and how to code from your phone with the lid closed.

My laptop has been up for twenty days, and right now it isn't allowed to sleep. I found out while writing this post:

```
$ uptime
12:57  up 20 days,  2:51, 13 users, load averages: 4.16 4.58 4.54
$ pmset -g | grep "^ sleep"
 sleep                1 (sleep prevented by Timex, Timex, caffeinate)
```

The Mac is set to sleep after one minute, and `caffeinate` is overruling it. That is the deal you accept when the agent you steer from your phone runs on your laptop: the laptop quietly becomes a server you carry around in a bag.

Claude Code Remote Control lets you drive a coding session from your phone, but the session still runs on your own machine. The laptop has to stay on, awake and online, and the `claude` process has to keep running. If you want to code from your phone with the lid closed, the agent has to live on a machine that never sleeps.

## How Claude Code Remote Control works

Remote Control is a window, not a computer. Anthropic's [Remote Control documentation](https://code.claude.com/docs/en/remote-control) says it plainly: "the web and mobile interfaces are a window into that local session, so your computer has to stay on and the `claude` process has to keep running."

You start it one of three ways:

```bash
claude remote-control     # server mode: waits for connections, press space for a QR code
claude --remote-control   # a normal interactive session that is also reachable remotely (alias --rc)
/remote-control           # inside a running session: hand it over to another device
```

Then you open the session at claude.ai/code or in the Claude app on iOS or Android. Your files, MCP servers and project config stay available because nothing moved; your phone is typing into the terminal you left on the desk. The connection is outbound HTTPS only, with no inbound ports, and while you're connected the transcript is stored on Anthropic's servers so every device stays in sync.

It needs a claude.ai subscription on a Pro, Max, Team or Enterprise plan. API keys are not supported, and I learned that the direct way, because even `--help` checks eligibility first:

```
$ claude remote-control --help
Error: Remote Control requires claude.ai subscription auth. ANTHROPIC_API_KEY is set, so this session is using API-key auth — unset it (or run in a shell without it) to use Remote Control.
```

On Team and Enterprise, an Owner also has to switch Remote Control on in the admin settings before anyone can use it.

## Where Claude Remote Control is the right tool

If you're on the couch and the laptop is on the desk, Remote Control is excellent, and I'd use it without a second thought. There's nothing to host or deploy, it comes with the plan you already pay for, and the session keeps your real environment: local MCP servers, the checkout with your uncommitted changes, `@` file completion from the phone. Permission prompts are forwarded, so you approve a command from your phone instead of walking back to the desk, and Claude Code can push a notification when a long task finishes or needs a decision.

Server mode is smarter than it first looks. `--spawn worktree` gives each new session its own git worktree, so two sessions you start from the phone don't edit the same files, and `--capacity` caps how many run at once (the default is 32).

For steering work that is already in progress, from the same building, it's hard to beat.

## Where it stops: the lid

Everything above assumes your machine is running. Close the lid and the docs are honest about what happens: "if your laptop sleeps or your network drops, Claude Code reconnects automatically when your machine comes back online." It reconnects; it doesn't continue. While the laptop sleeps, the work waits.

The other failure modes come from the same root:

- **Close the terminal and the session goes offline.** In the docs' words, "If you close the terminal, quit the Desktop app or VS Code, or otherwise stop the `claude` process, the session goes offline until you bring it back."
- **Server mode gives up on long outages.** If the machine is awake but can't reach the network, `claude remote-control` exits after roughly 10 minutes. Interactive sessions keep retrying.
- **Your laptop is the blast radius.** The agent you're approving from a train runs next to your home directory and your SSH keys. Reviewing shell commands on a six-inch screen is not a security model.

That's the twenty-day uptime at the top of this post. Keeping a laptop awake so a phone can reach it works right up until you need the laptop to be a laptop.

## Claude Code on your phone through Telegram

Anthropic also ships a chat route. [Claude Code channels](https://code.claude.com/docs/en/channels) are a research preview in which an MCP server pushes messages into your running session, and Telegram, Discord and iMessage are the official plugins. Unlike Remote Control, channels also accept a Console API key. Setup is a token from BotFather, `/plugin install telegram@claude-plugins-official`, and a restart with the flag:

```bash
claude --channels plugin:telegram@claude-plugins-official
```

You pair your Telegram account with a code and switch the bot to an allowlist so strangers can't drive your session. The flag doesn't appear in help while the feature is in preview (`claude --help | grep -i -c channel` printed `0` on my 2.1.287 install), but it works.

Channels make Claude Code feel like a chat assistant, and the same rule still applies: "Events only arrive while the session is open, so for an always-on setup you run Claude in a background process or persistent terminal." If Claude hits a permission prompt while you're away, the session pauses until you answer, unless the channel relays the prompt to you.

Claude Code on Telegram changes the screen you type on. It doesn't change where the work runs.

## Keep the agent on a box that doesn't sleep

The fix is boring: run the agent on a machine whose only job is to stay up. Anthropic's docs point the same way for Remote Control, suggesting `tmux` or `screen` on a remote machine so the session survives an SSH disconnect.

We built Octomind's daemon mode for exactly this shape of work: a named session that runs headless, which any process on the machine can drop a message into. I ran it on October 2, on the same twenty-day laptop. My first attempt died immediately:

```
Error: No input provided via stdin
```

A piped daemon wants an opening message. With one in `first.txt` ("Reply with the single word: ready"), it came up and waited:

```bash
octomind run --name phone-demo-1002 --daemon --format jsonl < first.txt > daemon.jsonl
octomind send --name phone-demo-1002 "Run uptime in the shell and answer in one line: how long has this machine been up?"
```

The session ran `uptime` through its shell tool and answered `Up 20 days, 2 hours, 49 minutes.` It took ten seconds from send to answer, and the turn cost $0.008.

Then I killed the process, standing in for a crash or a closed terminal, and sent again:

```
Error: failed to connect to session 'phone-demo-1002'

Caused by:
    Connection refused (os error 61)
```

Restarting with the same `--name` resumed the session. Asked what it had done last, it answered: "You asked me to run `uptime`; it showed the machine has been up 20 days, 2 hours, 49 minutes." The whole experiment, restart included, cost $0.044.

That's the lesson in two outputs: the conversation survives on disk, the process doesn't. Sessions are append-only logs you can resume across days ([the long version is here](/blog/persistent-ai-agent-sessions-daemon)), and `octomind send` reaches a live daemon over a Unix socket. Put that daemon on a home server or a VPS, point a chat bot at `octomind send`, and you have an agent your phone can reach that doesn't care about your lid. The [Daemon and Hooks docs](/docs/integration/03-daemon-and-hooks) cover webhooks too.

You also now run a server, with everything that comes with one.

## Code from your phone with the laptop closed

The version where nobody babysits a server is the one we sell: Octomind Cloud. Your agents run on a persistent Linux machine with the toolchain already on it (octomind, code search, memory, git, Docker, a headless browser), and the chat apps you already have open become their front door.

What that changes in practice:

- **The turn keeps running when you leave.** Close the tab or lose signal in a tunnel, and the machine finishes the work while every step is recorded. Open the session from your phone later and the whole transcript is there. We [tested that at launch](/blog/octomind-cloud-launch) by killing browsers mid-turn.
- **Telegram, WhatsApp, Slack, Discord, email and GitHub are doors to the same agent.** You [connect each one once](/blog/agents-where-you-already-are) and then message the agent like a colleague. A direct chat reaches the octo you picked, `/octos` lists your agents and `/use` switches between them. On GitHub, you mention the app in a PR thread and the answer arrives as a comment.
- **It sleeps when idle and wakes when you write.** A suspended machine costs only storage, and your next message wakes it.
- **No approval prompt can strand it.** Octos work autonomously. They ask in the chat when only you can decide, and guardrail rules block a tool outright, so nothing sits paused on a dialog nobody can see. If you're weighing that trade-off for your own setup, read [how to run without permission prompts safely](/blog/dangerously-skip-permissions-safely).
- **It can start without you.** [Routines](/blog/routines-scheduled-agents) fire a job on a schedule, or when a deploy hook, GitHub or any other service calls their URL, from outside the machine, so even a suspended box gets woken, and the result lands in the chat you connected.
- **Your Claude Code setup comes along.** The Import page takes your `CLAUDE.md`, skills, slash commands and memory notes in one upload, so the agent on the cloud machine starts out knowing what yours already knew.

The runtime underneath is the same open-source `octomind` I ran on my laptop above. The cloud is what you pay for when you'd rather not be the person keeping a server alive. Plans are on [/cloud](/cloud).

## Which setup fits

| Setup                              | Where the agent runs       | Laptop must stay on | Phone surface                                     | Unattended work                          |
| ---------------------------------- | -------------------------- | ------------------- | ------------------------------------------------- | ---------------------------------------- |
| Claude Code Remote Control         | Your machine               | Yes                 | Claude app, claude.ai/code                        | Waits while the machine sleeps           |
| Claude Code channels (Telegram)    | Your machine               | Yes                 | Telegram, Discord, iMessage                       | Pauses on unrelayed permission prompts   |
| Claude Code cloud sessions         | An Anthropic-managed VM    | No                  | Claude app, claude.ai/code                        | Yes, until an idle VM is reclaimed       |
| Octomind daemon on your own server | Your server                | No                  | Whatever you wire to `octomind send`              | Yes, while the server is up              |
| Octomind Cloud                     | A persistent cloud machine | No                  | Telegram, WhatsApp, Slack, Discord, email, GitHub | Yes, plus scheduled and webhook routines |

If you live entirely inside Claude, Anthropic's own answer to the lid is [cloud sessions](https://code.claude.com/docs/en/claude-code-on-the-web): the session runs on Anthropic-managed infrastructure, keeps going after you close the laptop, and you can steer it from the Claude app. The trade-offs are in the same docs. Cloning a repo and opening a PR require GitHub, and after a period of inactivity the VM is reclaimed, so reopening the session provisions a fresh one with your conversation restored but not the background work that was still running. We wanted the opposite: one machine per agent that keeps its files, indexes and memory between jobs.

My rule is simple. If I'm steering work I started at my desk and I'll be back within the hour, I use Remote Control. If the work should finish while the laptop is in a bag, it shouldn't be running on the laptop.

## FAQ

### Can I use Claude Code on my phone?

Yes. Remote Control connects the Claude app on iOS or Android, or claude.ai/code in a mobile browser, to a Claude Code session running on your computer. You type and approve from the phone while the work runs on the computer, so the computer has to stay on and online. Channels add Telegram, Discord or iMessage as another way in, and cloud sessions run on Anthropic's machines instead of yours.

### Does Claude Code Remote Control work when my laptop is asleep?

No. The session runs on your machine, so a sleeping laptop runs nothing. Claude Code reconnects when the machine wakes, and server mode exits if the network stays down for roughly 10 minutes. For work that continues with the lid closed, run the agent on a machine that stays up: your own server, a Claude Code cloud session, or a cloud machine like Octomind's.

### Can I control Claude Code from Telegram?

Yes, through channels, which are a research preview. Install the official Telegram plugin, configure a BotFather token, start `claude --channels plugin:telegram@claude-plugins-official`, pair your account and set an allowlist. Messages only arrive while that session is running.

### Does Claude Code Remote Control work with an API key?

No. It needs claude.ai subscription auth on a Pro, Max, Team or Enterprise plan. With `ANTHROPIC_API_KEY` set, `claude remote-control` refuses to start and tells you to unset it. It also doesn't work on Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry, or through a gateway set in `ANTHROPIC_BASE_URL`.

## Uptime is a server metric

If your laptop is the machine with the best uptime in the house, your agent is running in the wrong place. Let the laptop sleep, and give the agent a computer of its own.
