← Blog

Control Claude Code Session from Phone: Full Remote Workflow

10 Min. Lesezeit

Key takeaways

  • Run Claude Code on an always-on host inside a named tmux session so your phone is just one optional screen attached to a session that never dies.
  • Re-attach with tmux attach to keep full agent context; use claude --continue only as a fallback because a hard restart loses in-flight edits and pending approvals.
  • Phones are good for binary decisions like approving prompts, short steering messages, and killing runaway runs; diff review and merge requests belong on a desktop.
  • Set guardrails before going mobile: restrictive permission modes, git worktrees per agent, branch protection, and per-session token and retry caps.
  • One phone handles one session well; tracking a fleet of parallel agents is a state-coordination problem for an orchestrator like Aerunit.

<!-- Meta description: Control a Claude Code session from your phone: hand off running sessions with tmux, approve prompts remotely, and reconnect after drops without restarting the agent. -->

Control Claude Code Session from Phone: The Complete Remote Workflow

You can control a Claude Code session from your phone by handing the running session to a cloud-hosted daemon, approving permission prompts through mobile notifications, steering with short prompts, and reconnecting after drops without restarting the agent. This guide walks through that full loop, including what still needs your laptop.

How do you control a Claude Code session from your phone?

The setup has three parts: a host that never sleeps, a safe path to it, and a client that fits a phone screen. Claude Code runs on the host; your phone only sends input and reads output. The session keeps running whether you are watching or not.

Prerequisites: a persistent host, not your laptop lid

Run the agent on a always-on machine: a home server, a VPS, or a CI-style box. If the host sleeps, the session dies and you are re-explaining the task from a queue at a bus stop. Check the Claude Code CLI documentation for the flags that matter here: --continue and --resume reattach to a prior session, and permission modes decide what the agent may do without asking you.

Three ways to reach the session: SSH, tmux, and a web/mobile client

SSH plus tmux is the baseline: the daemon keeps the session alive, you reattach from any device, and nothing extra runs. A web or mobile client adds readable diffs and tap-to-approve on top. Once the session is under control, the output that matters lands in reviewing agent pull requests as merge requests you can triage later.

How do you hand off a running session without restarting the agent?

The handoff works because the agent never runs in your terminal tab. It runs inside tmux or a daemon, and your laptop is just one of many screens attached to it.

Wrapping the session in tmux before you leave

Start every Claude Code session inside tmux new -s agent-auth. If you have already launched one bare, you cannot retroactively attach it, so build the habit: tmux new -s auth-service, then claude inside. Name the socket per repo when you run parallel agents, or you will guess which session is which from your phone.

Resuming with --continue vs re-attaching a live process

Re-attaching a live process is the goal: tmux attach -t agent-auth from an SSH client on your phone, and the agent keeps its full context, its in-flight edits, and its pending approval prompt. claude --continue is the fallback, not the plan. It reloads the transcript but kills any work mid-flight: a half-applied diff, a test run, a question the agent asked that now has no listener.

What the agent loses on a hard restart

A hard restart costs you the in-flight state, not the history. The transcript survives, but the uncommitted changes sit in the worktree unexplained, the retry loop resets, and the agent re-derives its plan from a summary of itself. That re-derivation is where drift starts, and it is why the queue of pending approvals matters: answer them before the session dies, or review what it produced afterward in the merge request review flow instead of trying to resurrect the run.

What can you approve or steer remotely, and what still needs your laptop?

Most of the work while you're away from the desk is binary: approve or deny a permission prompt, pick between two options, confirm a retry. That fits a phone. Anything requiring you to read code line by line does not.

Works fine from a phoneDefer to a full screen
Approving bash commands, file writes, permission grantsReading a large diff before merging
Short steering prompts ("stop", "use the existing helper", "run the tests first")Multi-file edits or refactors
Checking session status across your fleetMerge request review in GitLab or an IDE
Answering an agent's clarifying questionReviewing acceptance criteria against real output

Approval prompts you can safely tap through on mobile

Permission prompts are designed for a yes/no decision. Before leaving your desk, set the guardrails so the prompts that reach your phone are the ones you can judge in five seconds: deny anything touching .env or migrations, approve test runs and doc updates. If a prompt needs context you don't have, deny it and handle it later. A denied step costs a retry; a wrong approval costs a broken repo.

Steering prompts: short, imperative messages that work on a phone keyboard

The messages that work are short and imperative: "stop", "commit and stop", "skip that, use Postgres". Long explanations typed on glass get mangled. If the agent has been running detached in a tmux session, it keeps its state while you're away, and you can re-attach from any machine to see where it stands (see tmux's documentation on sessions and re-attachment). Split the thinking from the doing: give direction from the phone, let the agent do the walking.

What to defer: diff reading, IntelliJ or GitLab merge request review

Diff review, multi-file edits, and merge request review in GitLab or an IDE need screen space and a keyboard. The pattern that works: steer and approve from the phone, then review the resulting merge request properly at your desk, alongside the rest of your agentic AI coding tools.

What happens when your phone loses connection mid-run?

Nothing bad, as long as the session runs under tmux. tmux keeps the agent alive on the server when your phone drops, so a tunnel failure or dead battery costs you visibility, not work. Reconnect, re-attach to the same tmux session, and the terminal is exactly where you left it.

Re-attaching and reading the transcript since you dropped

Run tmux attach -t <session>, then page up through the scrollback to see what happened offline. For a longer gap, read the session transcript or the git log: git log --oneline and git diff HEAD~N tell you which commits and edits the agent made while you were gone. Cross-check the task's acceptance criteria before you respond to any pending approval prompt.

Correcting a wrong turn with a rollback prompt

If the agent spent your offline window on the wrong thing, stop it with Esc, then give a short corrective prompt: name the mistake, point at the right file or failing test, and tell it to git revert or discard the bad commits before continuing. Keep the rollback instruction separate from the new direction so the agent does not conflate the two. This is the same split between thinking and doing that keeps agents from wandering in a big codebase.

When to kill the run instead of steering it back

Kill the session when the agent is stuck in a retry loop, burning your token budget on a wrong architecture, or editing files another parallel agent owns. Re-attach, Ctrl+C twice, and restart from a clean prompt with tighter acceptance criteria. Losing one run is cheaper than untangling three hours of confident wrongness. For fleet-level state tracking across sessions, that is what Aerunit handles.

Which safety guardrails should you set before going mobile?

An unattended agent can only do the damage your pre-flight setup allows. Five minutes of guardrails beats an hour of cleanup from a phone keyboard.

Permission modes and allowlists

Drop the session into a restrictive permission mode and allowlist only the tools the task needs: file edits and tests, not network access or destructive shell commands. Set approval prompts to fail closed, so anything not on the list waits for you instead of guessing.

Git worktrees and branch protection as blast-radius limits

Run each agent in its own git worktree on a dedicated branch, so a wandering session cannot clobber another agent's work or your main checkout. Pair that with branch protection on shared branches: GitLab lets you require review and approvals before anything merges to a protected branch, which you can configure in its protected branches settings. The same discipline carries into review later, which we cover in reviewing agent pull requests.

Token budget caps and retry limits

Cap spend per session and cap retries per task. The Ticksly team runs up to thirty Claude Code and Codex sessions and pays roughly $8 per merge request at API prices (their writeup on dev.to), so an agent stuck in a retry loop multiplies fast. A hard budget turns a runaway session into a stopped one.

How does mobile control fit into reviewing the agent's merge requests later?

Phone control is for unblocking and steering. Review happens at the merge request, on a screen where you can read a diff properly.

Push to a branch, open a merge request, review on the desktop

Before you leave the desk, make sure every agent works on its own branch, ideally from its own git worktree. When you steer from your phone, you are nudging an agent toward a mergeable state, not approving the final result. The agent pushes, the merge request opens, and the real verdict waits until you are back.

Merge request review best practices for agent-authored code

Read the diff against the acceptance criteria you set, not against the agent's summary of what it did. Check for duplicated logic across parallel agents, since two sessions on adjacent repos can solve the same problem twice. Verify retries did not leave dead code behind. Small merge requests merge faster, so keep task distribution granular enough that each MR is reviewable in minutes.

Reviewing from IntelliJ when you are back

Open the merge request branch in IntelliJ, run the tests locally, and step through the changed files with full navigation rather than a phone-sized diff. Desktop review is where you catch the confident-but-wrong work that phone steering kept alive just long enough to finish.

When is phone-based control useful versus waiting until you're back at your desk?

Phone control pays off for decisions measured in seconds: approving a permission prompt, unblocking an agent that has been waiting for an answer, or killing a run that is burning your token budget on the wrong thing. If an action takes one sentence or one tap, do it from your phone.

Good mobile tasks: approvals, unblocks, kill switches

Approvals, short steering prompts ("stop, the config lives in the other repo"), and stopping runaway sessions are ideal mobile work. The Ticksly team runs up to thirty Claude Code and Codex sessions with three humans providing direction, so most of their day is exactly these small interventions, as described in the dev.to writeup linked above.

Bad mobile tasks: design decisions, large diff review

Architecture calls and reviewing large diffs belong at your desk, on a full keyboard, with the repo checked out. Reading a 400-line diff on a phone produces rubber-stamp approvals, which is how an agent's wrong assumption ships. If the fix spans several branches, wait until you can inspect each one with git worktree (Git documentation) rather than judging it from a two-inch screen.

How do you scale this beyond one session on one phone?

The coordination gap: one phone, many agents

Phone control solves one session. A team running thirty Claude Code and Codex sessions across multiple repos has a different problem: which agent is waiting, which one drifted, and which one has been fixing the wrong thing for three hours. That is state tracking and task distribution, not remote approval.

Where an orchestrator like Aerunit fits

Aerunit is a daemon-level orchestrator for exactly this: a dashboard over your parallel agents, per-agent state, task distribution across repos, and guardrails that keep each run inside its acceptance criteria. It sits alongside Cursor Cloud Agents and Linear rather than replacing them. The honest test, applied to Aerunit like any tool: does it cut the token budget burned on duplicate or conflicting work, and can one person see a whole fleet's status at a glance?

FAQ

Can I run Claude Code entirely from my phone without a computer?

No, but you can stop needing your laptop in the loop. The agent runs on an always-on host such as a home server or VPS, and your phone just sends input and reads output over SSH or a mobile client. The laptop becomes one optional screen among many, not the machine keeping the session alive.

Does the Claude Code session keep running if my phone disconnects?

Yes, as long as the session runs inside tmux or a daemon on the host. A tunnel failure or dead battery costs you visibility, not work. Reconnect, re-attach to the same tmux session, and the terminal is exactly where you left it, including any pending approval prompt waiting for your answer.

Is it safe to approve permission prompts from a phone on public Wi-Fi?

The safety comes from pre-flight guardrails, not the network. Set a restrictive permission mode, allowlist only the tools the task needs, and make approval prompts fail closed so anything unlisted waits for you. Use a secure path to the host, and deny any prompt that needs context you cannot judge in a few seconds.

How much does it cost to run Claude Code sessions that wait for mobile approvals?

The Ticksly team runs up to thirty Claude Code and Codex sessions and pays roughly $8 per merge request at API prices, so idle waiting is cheap but retry loops multiply fast. Cap spend per session and cap retries per task so a runaway session stops itself instead of burning your budget while you are away.

Can I control multiple Claude Code agents from one phone?

One phone handles one session well; a fleet is a different problem. Name tmux sockets per repo so you know which session is which, and use the phone for approvals, unblocks, and kill switches across agents. Tracking which of thirty sessions drifted or is waiting is state coordination, which is where an orchestrator like Aerunit fits.

Aerunit

Halte die Agenten beschäftigt. Du übernimmst das Denken.

Die Registrierung ist offen — erstelle ein Konto und starte mit nutzungsbasierten Credits. Keine Abos, und Teams teilen sich ohne Aufpreis einen Credit-Pool.

Konto erstellen