Blog · October 28, 2026 · 9 min read · by Vilva Athiban P B

claude remote-control Server Mode: Run Claude Code as a Session Server

People searching for a “claude code server” usually mean one of two things: a Claude Code process that keeps running on a machine so they can drive it from somewhere else, or a way to start several sessions on that machine without opening several terminals. Both are the same feature. claude remote-control, with no other flags, starts Claude Code in server mode: a process that sits in your terminal, registers with Anthropic, and serves sessions to claude.ai/code and the Claude mobile app until you stop it. This post is about that mode specifically, as the Remote Control documentation describes it in late October 2026: how it differs from running /remote-control inside a normal session, the spawn modes, how to bring sessions back after you stop the server, and the knobs for permissions, Chrome and debugging.

If you have not used Remote Control at all yet, start with our Remote Control guide; this post assumes you know what the session list at claude.ai/code is.

Three ways to start Remote Control, and why server mode is different

The CLI gives you three invocations. claude --remote-control (or --rc) starts a normal interactive session that is also reachable from your phone; you can keep typing in the terminal while it is connected. /remote-control (or /rc) does the same from inside a session you already have open, carrying the conversation history with it. And claude remote-control, the subcommand, is the server.

# interactive session, also reachable remotely
claude --remote-control "My Project"

# from inside a running session
/remote-control My Project

# server mode: no local prompt, serves sessions to your devices
claude remote-control --name "My Project"

The docs draw the line plainly: unlike the server, an interactive session lets you type messages locally. The server has no local prompt. It prints a session URL, shows a QR code when you press the spacebar, and then displays connection status and tool activity while remote devices work. Outside server mode, each Claude Code process supports one remote session at a time; the server is the way to run multiple concurrent sessions from a single process. The first time you run it, it explains what it does and asks Enable Remote Control? (y/n); decline and it exits and asks again next time. In a directory you have not trusted yet, it also asks Trust <directory>? [y/N] before starting, and if its input is not a terminal it cannot ask and exits with a workspace-not-trusted error.

Spawn modes: same-dir, worktree, session

The flag that decides what kind of server you get is --spawn. It has three values.

ModeWhat the server doesWatch out for
same-dirEvery session shares the current working directory. Default when no mode has been saved for the folder.Two sessions editing the same files can conflict with each other.
worktreeEach on-demand session gets its own git worktree, so parallel tasks are isolated.Needs a git repository or a WorktreeCreate hook.
sessionSingle-session mode: serves exactly one session and rejects further connections.Set at startup only; cannot be combined with --capacity.

While the server runs in same-dir or worktree mode, pressing w in its terminal switches to the other one, and the mode you switch to becomes the saved default for that project. That is why a later start may print Spawn mode: worktree (saved for this folder; press w to change): the server is honouring a choice you made earlier, either by answering its Spawn mode for this project: question (1 for same-dir, 2 for worktree) or by pressing w during a previous run. --spawn <mode> overrides it for one run. The default ceiling is 32 concurrent sessions; change it with --capacity <N>.

# isolated parallel sessions, each in its own worktree, up to 8 at once
claude remote-control --spawn worktree --capacity 8

# one session only, nothing else may connect
claude remote-control --spawn session

By default the server also pre-creates one session in the current directory so you have somewhere to type immediately; in worktree mode that first session stays in the directory while on-demand ones get worktrees. --no-create-session-in-dir starts with none, with a consequence that matters later: the server then archives its sessions when you stop it, so there is nothing to resume.

Permissions, Chrome, naming and debugging

--permission-mode <mode> sets the starting permission mode for every session the server creates, for example acceptEdits; manual is accepted as an alias for default, and an unrecognised mode stops the server at startup and lists the valid ones. This is the setting people reach for when the point of the server is to hand tasks to it from a phone and not be asked about every file edit; our post on turning auto mode off again covers the other direction.

--chrome and --no-chrome (v2.1.273 or later) decide whether the sessions the server creates can use Chrome on your machine while you work from another device. Without either flag, the pre-created session and any session you start yourself from claude.ai/code or the app begin with Chrome off, even if you enabled Chrome by default elsewhere; a session the server starts for one of your project threads follows that setting instead, except in bypassPermissions mode.

--name "My Project" sets the title shown in the session list. Without it, names are auto-generated as <hostname>-graceful-unicorn, and --remote-control-session-name-prefix (or the CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX variable) replaces the hostname part, which is useful when several machines serve sessions into the same account. For diagnosing a server that will not connect, -d / --debug (v2.1.282+, filter only in the --debug=api,hooks form), --debug-file <path> and --verbose are there; claude remote-control --help prints the full flag list (before v2.1.302 it returned a sign-in error instead when you were not logged in).

Two things do not work the way you might expect. --sandbox and --no-sandbox were removed in v2.1.300 and now make the server exit with an error; to sandbox the sessions it starts, turn sandboxing on in a settings file. And a global claude flag placed before remote-control is not carried into the sessions the server creates: harmless ones such as --verbose or --model are let through, but anything that would change what sessions can do, such as --settings, makes the server refuse to start and name the flag.

Stopping the server and bringing sessions back

Ctrl+C stops the server, and the sessions it was serving stop responding from your phone or browser. They are not archived, as long as you were not running a second server in the same directory and did not start with --no-create-session-in-dir. For about four hours afterwards, three commands in the same directory bring them back:

# bring back every session the server was serving
claude remote-control

# only the session the server started with; exits when it ends
claude remote-control --continue

# one specific session; the ID is the part of the claude.ai/code URL
# between /code/ and any ?
claude remote-control --session-id <id>

--continue and --session-id need v2.1.200 or later, cannot be combined with each other or with --spawn, --capacity or --create-session-in-dir, and on v2.1.228 or later they unarchive a session you archived in the meantime. If the directory has no record, --continue falls back to the newest one from the repository's other worktrees. After the four hours, run a plain claude remote-control to start fresh. Sessions you started with claude --remote-control or /remote-control are different: those come back with claude --continue or claude --resume, like any conversation.

A crash is handled without a restart: if a session served by the server crashes, send it a message from a connected device and Claude Code serves it again (v2.1.238+). A network outage is not. In server mode, if the machine is awake but cannot reach the network, the process gives up after roughly ten minutes and exits, and you run claude remote-control again; an interactive session, by contrast, keeps retrying for the whole outage. Once a session is connected, HTTP 403 refusals (typical after a VPN change) are retried for up to three minutes before Claude Code disconnects and names what refused.

Running it on a remote machine

The server is a local process; close the terminal and it is gone. On a box you reach over SSH, the docs' own advice is to start it inside tmux or screen so it survives the SSH session ending:

ssh dev-box
tmux new -s claude
cd ~/repo
claude remote-control --spawn worktree --name "dev-box repo"
# Ctrl+B D to detach; the server keeps serving

Networking is outbound only. The session registers with the Anthropic API over HTTPS and polls for work; no inbound port is opened, which is what makes this workable behind a home router or a corporate NAT. The trade-off is that, while connected, the transcript (your messages, Claude's responses and tool activity) is stored on Anthropic servers to keep devices in sync and allow reconnects; execution and filesystem access stay on the machine. Organisations with Zero Data Retention or the HIPAA configuration cannot enable Remote Control at all, and it needs a Pro, Max, Team or Enterprise login (API keys, Bedrock, Foundry, the Agent Platform and a custom ANTHROPIC_BASE_URL are out). On Team and Enterprise an Owner has to switch the Remote Control toggle on in the Claude Code admin settings first. If your shell sets CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC or DISABLE_GROWTHBOOK, Remote Control is unavailable until you unset them.

One more thing a headless box needs: notifications. The server shows tool activity in its own terminal, which nobody is looking at. Turn on mobile push in /config (Push when Claude decides, Push when actions required), and for the tmux case see notifications over tmux and SSH.

Server mode versus the alternatives

The docs line up the ways to work away from the terminal, and it helps to know which one you are asking for. Server mode runs on your machine and is for steering work from another device; a cloud session runs on Anthropic-managed infrastructure and needs no local setup, which is better for a repo you have not cloned or for many parallel tasks. Channels push events into a local CLI session from Telegram, Discord or your own server, for reacting to CI failures rather than typing prompts. Dispatch sends a task from the mobile app to the Desktop app with minimal setup. And if you only want to background one session in your own terminal, that is the claude --bg agent view, not Remote Control at all. Pick server mode when the sentence is “I want this machine to keep serving Claude sessions, several at once, that I drive from my phone or browser.”

A sensible first configuration

  • Run it in a git repository with --spawn worktree, so a second task started from your phone cannot trample the first.
  • Give it a --name; auto-generated names are fine for one machine and confusing for three.
  • Leave the permission mode at the default until you have seen what the sessions ask for, then consider --permission-mode acceptEdits rather than anything broader.
  • Add --chrome only if the tasks need the browser; otherwise sessions start with it off anyway.
  • On a remote box, wrap it in tmux, and plan for the ten-minute network give-up by checking the session list the next morning.
  • When you stop it, remember the four-hour window for --continue; after that it is a fresh server.

To end a session rather than the server, our guide to stopping a running Claude Code task covers stopping subagents from a connected device, which the server then stops on the machine.

Keep reading

Desk Exercises for Programmers: 15 Moves to Do While Your AI Agent Codes

7 min read

Exercise While Coding: Turn Claude Code Wait Time Into Micro-Workouts

7 min read

Claude Code Notch Notifications on Mac: See When Claude Is Done Without Watching the Terminal

7 min read

Claude Code Tips and Tricks: 12 Ways to Use Claude Code Effectively

8 min read

Claude Code Multiple Sessions: How to Run Agents in Parallel Without Losing Track

6 min read

A Claude Code Workflow That Doesn't Involve Watching the Terminal

5 min read

Claude Code Hooks: A Practical Guide to Automating Your Agent Workflow

7 min read

Claude Code Auto Mode: Fewer Permission Prompts Without Living Dangerously

7 min read

Claude Code Subagents: How to Delegate Work to Specialized Agents

7 min read

Claude Code Context Management: Treat the Context Window Like a Budget

6 min read

Per-Subagent Model Selection: Route the Grunt Work Down, Keep the Judgment Up Top

7 min read

Skills and Plugins: How to Teach Claude Code Your Way of Working

7 min read

Claude Code Background Tasks: Run Long Commands Without Blocking Your Session

6 min read

Codex CLI Notifications: How to Get a Ding When Codex Is Done or Needs Input

7 min read

Cursor Notification When Done: Every Way to Get Notified When Cursor Finishes

6 min read

Claude Code Notifications: How to Get Notified When Claude Code Finishes or Needs Your Input

6 min read

Want to Be Notified When Claude Responds? How Claude Notifications Work on Web, Desktop, and Mobile

5 min read

Claude Code Notification Scripts: Copy-Paste Recipes for Every Platform

6 min read

Get a Ding the Moment Codex Needs Your Response

6 min read

Get Notified the Moment Claude Code Is Waiting for Your Input

6 min read

“Notifications Are Turned Off for Claude” — Here Is the Fix

6 min read

Codex Sound When Done: Make Codex CLI Play a Sound When It Finishes

6 min read

terminal-notifier + Claude Code: Native macOS Alerts When Your Agent Finishes

6 min read

Gemini CLI Notifications: How to Get a Sound or Alert When Gemini Finishes

6 min read

Get Claude Code Notifications on Your Phone

6 min read

Claude Code Remote Control, Explained

7 min read

preferredNotifChannel: Claude Code's Built-In Notification Setting

6 min read

Claude Code Notifications in tmux and Over SSH

7 min read

Claude Code Effort Levels: Why Your Setting Keeps Getting Ignored

8 min read

Codex vs Claude Code Notifications: How Each One Tells You It Is Done

8 min read

Claude Code Notifications Not Working: A Diagnostic Checklist

10 min read

Claude Code Notifications Inside Your Editor's Terminal

7 min read

CLAUDE_CODE_DISABLE_BACKGROUND_TASKS Explained

7 min read

CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP Explained

8 min read

Cursor Alerts Explained: Every Alert Cursor Raises, and How to Control Them

7 min read

Claude Code Environment Variables: The Groups That Actually Matter

10 min read

Claude Code Notifications on WSL and Windows

9 min read

Claude Code Checkpoints and /rewind

8 min read

Claude Remote Control: How It Works, Turning It Off, and Auto Mode

7 min read

Claude Code /loop: Poll a Deploy, Babysit a PR, and Get Told When It's Done

8 min read

Setting Up NotchFit With OpenAI Codex CLI: Hooks, $notchfit-plan, and the Daily Flow

7 min read

Claude Mods Explained: What the New Plugin Layer Can Do, and How to Turn On 'You Should Know'

9 min read

NotchFit vs Mac Break Reminder Apps: A Clock or a Signal From Your Coding Agent?

8 min read

Claude Code Headless Mode: Running claude -p in Scripts and CI, and the Three Signals That It Finished

10 min read

Building a Movement Habit at a Desk: Use the Agent Run as the Cue, One Set as the Unit, and Streaks Carefully

8 min read

Claude Code MCP Servers Explained: Adding Servers, Choosing a Scope, Handling Secrets, and Why Long Tool Calls Go to the Background

10 min read

/notchfit:plan Explained: How Claude Code or Codex Writes a Weekly Workout Plan the Notch Can Actually Run

8 min read

Claude Code Spinner Verbs Explained: What “Pondering” and “Brewing” Mean, How to Change Them, and Why You Should Stop Watching the Spinner

7 min read

Why NotchFit's Done and Permission Alerts Wait Until Your Set Ends, When That Costs You, and How to Turn the Workout Off

7 min read

How to Resume a Claude Code Session: --continue vs --resume, Naming Sessions, the Session Picker, Branching, and What Comes Back

9 min read

NotchFit on a Mac Without a Notch: How Pill Mode Works on Mac mini, iMac, Mac Studio and a MacBook With the Lid Closed

6 min read

How to Run a Claude Code Session in the Background: /background, claude --bg, Agent View, and Getting Back to It

9 min read

What a Notch App Can See: NotchFit's Local-First Design, What the Claude Code and Codex Hooks Send, and What Stays on Your Mac

7 min read

Why Codex CLI Asks for Permission Every Time, and How to Tune the Sandbox and Approval Policy Without Going Full Access

8 min read

What to Do While Claude Code or Codex Works: A Simple Protocol for the Two-to-Twenty-Minute Gap in Every Agent Run

7 min read

Is It Possible to Get a Notification When Claude Code or Codex Hits a Reset? Yes for Claude Code: the quota_auto_resume Hooks, Explained

8 min read

What a MacBook Notch App Can Actually Do: The Five Kinds of Notch Utility, Their Trade-offs, and Where NotchFit Fits

7 min read

How to Make MCP Servers Not Take Up as Much Context in Claude Code: Tool Search, alwaysLoad, Scopes and Output Caps

8 min read

The notchfit Command Line: Drive Your Workout, Read Status as JSON, Validate Plans and Test the Notch Without Leaving the Terminal

7 min read

How to Audit MCP Tool Calls Made by Claude Code: A Five-Minute Hook Audit Log, OpenTelemetry Tool Events, and the Transcript for Investigations

9 min read

Exercise Snacks: What the Research Actually Says About One-Minute Vigorous Breaks, What It Does Not, and How NotchFit's Agent-Run Sets Compare

8 min read

How Long Until a Claude Code MCP Tool Call Times Out? The Four Timers (Startup, Two-Minute Backgrounding, Idle, Wall-Clock), Their Defaults, and Which One to Change

8 min read

Sitting Too Long as a Developer: The Posture Problems Coding Agents Made Worse, What the Research Says About Breaking Up Sitting, and How NotchFit Turns an Agent Run Into the Break

8 min read

Claude Code .mcp.json Explained: Where Project-Scoped MCP Servers Are Read From, What Happens in Subfolders and Monorepos, and Why a Committed Server Shows Pending Approval

8 min read

Standing Desk Exercises for Developers: Why Standing Still Is Not the Goal, Eight Movements That Fit a Thirty-Second Agent Run, and How NotchFit Cues Them From the Notch

8 min read

The claude mcp Command Reference: add Syntax by Transport, What --scope local, project and user Actually Mean, add-json and add-from-claude-desktop, list, get, remove, login and serve

9 min read

Your First Week With NotchFit: Install and Simulate, Run Real Tasks, Write a Smaller Plan Than You Want, Tune the Alerts, Survive the First Skipped Day, and Decide What Stays

8 min read

How to Stop a Running Claude Code Task: Esc vs Ctrl+C, Background Tasks, Subagents, and Disconnecting Remote Control

8 min read

Pomodoro vs Agent-Driven Breaks: Timing Movement to Claude Code and Codex Runs Instead of a Timer

7 min read

Claude Desktop MCP Configuration: claude_desktop_config.json, Logs, Extensions, and the Difference From Claude Code

9 min read

The 20-20-20 Rule for Developers: Eye Strain, the Evidence, and Agent Runs as the Cue

8 min read

Claude Agent SDK + MCP Servers: mcpServers, allowedTools, Status Checks and Auth

9 min read

Discreet Desk Exercises for an Open-Plan Office While Claude Code Runs

7 min read

Wrist and Forearm Stretches for Developers: A 60-Second Routine for Every Claude Code Run

7 min read