Skip to content

How to Run Claude Code on Your Phone

By Cosyra Editorial Team

Published Last updated 8 min read

You can run Claude Code on your phone right now, iPhone or Android. The fastest path: install Cosyra for iOS or Cosyra for Android, add your Anthropic API key, and type claude in the terminal. You get a persistent Ubuntu container with Claude Code pre-installed, no SSH tunnel to maintain, no laptop that needs to stay awake. 1 hour free on signup, no credit card.

Quick decision — pick the approach you came for:

  • Cloud terminal (Cosyra) — you want a persistent Ubuntu container with Claude Code already installed and nothing to keep awake. Setup in ~2 minutes ↓
  • SSH from your phone — you already run an always-on desktop or VPS and are comfortable with tmux. How it works ↓
  • Claude Code Remote Control — a desktop session is already running and you only need to monitor and approve. How it works ↓
  • Claude Code on the Web — your work is GitHub-native and you pay for a Claude Pro, Max, or Team plan. How it works ↓

Not sure which fits? The side-by-side comparison ↓ breaks down cost, persistence, and what breaks for each.

This guide covers four ways to get Claude Code running on your phone, walks through setup step by step, and shows real workflows we use daily from a phone. If you already know you want the full picture of all four AI agents on mobile, start there, this page goes deep on Claude Code specifically. If you'd rather run OpenAI's agent, the Codex CLI on your phone guide walks through the same setup for Codex. The matching guides for Gemini CLI on your phone (free 60 rpm / 1000 rpd tier on Gemini 2.5 Pro) and OpenCode on your phone (open source, BYOK across providers) follow the same shape. If you have an iPad with a Magic Keyboard, the form factor changes the workflow enough that we wrote a separate Claude Code on iPad walkthrough covering Split View, Stage Manager, and dictation. For Android-specific setup (Termux's npm path, the Android 12+ phantom-process-killer fix, and foldable / DeX workflows on Pixel and Galaxy), see Claude Code on Android. And if the way you actually drive Claude Code is describing the change in plain English and letting it edit your repo, that's the workflow we walk through in vibe coding on your phone.

Why does Claude Code work on a phone?

Claude Code works on a phone because you direct the agent in short prompts instead of typing code character by character. The input is a sentence, the output is a diff you review and approve with a tap. That short-in, long-out ratio is what makes a glass keyboard viable for real engineering work, from CI fixes to multi-file refactors.

Claude Code is a terminal-based agent. You type a prompt, it reads your codebase, writes code across multiple files, runs tests, and proposes changes for you to accept or reject. The interaction model is short input, long output, you send a sentence, Claude Code sends back a diff. That ratio is what makes a phone screen workable. You're not typing if (err != nil) { return fmt.Errorf(...) } on a glass keyboard. You're typing "fix the nil pointer crash in the auth handler" and reviewing what the agent produces.

We think Claude Code on a phone is not a compromise, it's a better interface for certain tasks than a laptop. When you're on the train and a CI pipeline fails, pulling out a laptop means finding a seat, opening the lid, waiting for it to wake, SSHing in. On the phone, the container is already running. Tap, type the prompt, approve the fix, push. We've shipped production hotfixes from the back of an Uber this way.

What are the ways to run Claude Code on your phone?

There are four ways to run Claude Code on your phone as of 2026-04-17: SSH into a machine running Claude Code, Anthropic's Remote Control for an existing desktop session, Claude Code on the Web plus the Claude iOS app, or a cloud terminal like Cosyra with Claude Code pre-installed. Each approach solves a different constraint, so the right pick depends on whether you already own an always-on machine and which subscription you pay for.

1. SSH into a machine running Claude Code

The classic: run Claude Code on a desktop or VPS, SSH in from Blink Shell (iOS) or Termux (Android). Add Tailscale for zero-config networking and tmux to keep the session alive when you switch apps.

2. Claude Code Remote Control

Anthropic's built-in feature: run /rc inside a Claude Code session on your desktop, scan the QR code with your phone, and you get a mobile browser interface to the running session. You can read output and approve permission requests.

If you're weighing Anthropic's Remote Control instead, we cover the tradeoffs in depth in Cosyra vs Claude Code Remote Control, the short version is that Remote Control is great when your laptop is always on, and Cosyra is the answer when it isn't.

3. Claude Code on the Web (plus the Claude iOS app)

Anthropic shipped a cloud surface of their own. Claude Code on the Web runs tasks on Anthropic-managed VMs at claude.ai/code, and the Claude iOS app lets you monitor and steer those sessions from a phone. You connect a GitHub repo, kick off a task (claude --remote "…"), and the VM clones, runs, and pushes a branch. Per Anthropic's own docs: 4 vCPU, 16 GB RAM, 30 GB disk, Ubuntu 24.04, and you can pull a session back into a local terminal with claude --teleport.

Honest framing: if you already pay for Claude Pro and live inside GitHub, this is a very real option, and we'd tell you to try it. Where it falls short for us is the "I want a persistent Ubuntu container that also has Codex CLI, OpenCode, and Gemini CLI installed, reachable from an Android app too" story, which is why we kept building Cosyra.

4. Cloud terminal with Claude Code pre-installed

This is what we built with Cosyra. A native mobile app that connects to a persistent Ubuntu container in the cloud with Claude Code already set up. No SSH, no desktop dependency, no browser tabs that time out.

Workflow diagram: phone connects to Cosyra cloud container running Claude Code, which calls the Anthropic API with your key and pushes to GitHub
How Claude Code runs on your phone via Cosyra: your phone connects to a cloud container, Claude Code calls the Anthropic API with your key. Diagram created 2026-04-16.

How do you set up Claude Code on iPhone or Android?

You set up Claude Code on a phone in about two minutes with Cosyra: install the app, sign in, paste an Anthropic API key into the container, and type claude. No Node install, no SSH tunnel, no desktop dependency. The three steps below walk through exactly what we run on a fresh install, with the actual terminal output we saw when we tested this on 2026-04-17.

This walkthrough uses Cosyra. Total time: about 2 minutes.

Step 1: Install and create a container

Download Cosyra from the App Store or Google Play. Sign up with email or Sign in with Apple/Google. The app provisions a fresh Ubuntu container on first launch. In our testing, that took about 15 seconds.

Step 2: Add your Anthropic API key

Claude Code needs an Anthropic API key. Get one from console.anthropic.com if you don't have one yet. Then set it in your container:

cosyra, adding your Anthropic API key

$ # Set the key (persists across sessions)

$ echo 'export ANTHROPIC_API_KEY="sk-ant-your-key-here"' >> ~/.bashrc

$ source ~/.bashrc

 

$ # Verify it works

$ claude --version

Claude Code (latest)

Your API key is stored in the container's .bashrc. Cosyra encrypts keys on-device before transmitting them to the container over an encrypted connection. You pay Anthropic directly at their standard token rates, Cosyra never touches your API billing.

Step 3: Clone a repo and start Claude Code

cosyra, running Claude Code on a project

$ git clone https://github.com/your-org/your-project.git

Cloning into 'your-project'...

Receiving objects: 100% (1847/1847), done.

$ cd your-project

$ claude

Claude Code (latest)

Type your prompt, or type "/" for commands.

 

> Find the bug causing the 500 error on /api/users and fix it

Claude Code indexes the codebase, identifies the issue, proposes a fix across the relevant files, and asks for your approval. You review the diff on your phone screen and accept or reject each change.

Try it free. 1 hour on signup, no credit card. Extend with a 10-hour, 7-day trial when you want more. App Store / Google Play / Pricing details

What do real Claude Code sessions from a phone look like?

Real Claude Code sessions from a phone look like short prompts, reviewed diffs, and git pushes from wherever you happen to be. Between meetings, waiting in a parking lot, or on the morning commute, the container stays running and you tap in to direct the agent. Below are three sessions we ran in the last month, captured verbatim, so you can see what fits into four to twenty minutes of phone time.

Abstract descriptions of "mobile coding" are useless without showing what the actual sessions look like. Here are three workflows we run regularly from a phone.

Fix a failing CI build between meetings

Slack notification: CI is red on main. You're between meetings with 8 minutes. Open Cosyra, pull latest, and point Claude Code at it:

cosyra, fixing CI from phone

$ git pull origin main

Already up to date.

$ claude

 

> The CI build is failing. Run the test suite, find what broke,

fix it, and show me the diff before committing.

Claude Code runs the tests, traces the failure to a missing null check in src/api/handlers.ts, proposes a two-line fix, and waits for your approval. You read the diff, approve, and Claude Code commits and pushes. Total time on phone: 4 minutes.

Start a feature while waiting for your kid's soccer practice to end

You've been thinking about adding rate limiting to the API. You have 20 minutes in a parking lot. Open the container, describe what you want:

cosyra, starting a feature from phone

$ claude

 

> Add rate limiting middleware to the Express API.

Use a sliding window counter with Redis.

100 requests per minute per API key.

Return 429 with a Retry-After header.

Add tests.

Claude Code creates the middleware file, wires it into the Express app, writes tests, and runs them. You review each step. The container persists, so you can pick it up later on your laptop if you want, or keep going from the phone.

Review a PR on the morning commute

A teammate opened a PR overnight. You're on the subway with 12 minutes until your stop.

cosyra, reviewing a PR from phone

$ git fetch origin

$ git checkout origin/feature/new-auth

$ claude

 

> Review the diff between main and this branch.

Focus on security issues, missing error handling,

and test coverage gaps.

Claude Code reads every changed file, checks test coverage, and produces a structured review with specific line references. You post the review as a PR comment directly from the terminal using gh pr review --comment. Done before your stop.

What are the best tips for Claude Code on a phone?

The best tips for Claude Code on a phone are: wrap long tasks in tmux, write one detailed prompt instead of five vague ones, and use /compact when the context window gets heavy. Those three habits cut phone session friction more than any app setting. The full list below is the exact checklist we follow before starting any multi-step refactor from our own phones.

How does Cosyra compare to other remote Claude Code options?

Cosyra compares favorably for persistence and device coverage, while Remote Control wins on price if you already have a desktop session, Claude Code on the Web wins if your life is on GitHub and you pay for Claude Pro, and SSH wins if you already run your own always-on box. The table below shows how the approaches line up on ten attributes as of 2026-04-17, so you can pick based on the trade-off that actually matters to you.

Feature Cosyra SSH + Blink/Termux Remote Control Claude Code on the Web
Full terminal access Yes Yes Monitor + approve only Web UI + Claude iOS app
Start new Claude Code work Yes Yes No (existing session only) Yes (claude --remote)
Requires desktop/server No Yes (always-on) Yes (active session) No (Anthropic-managed VM)
Native mobile app iOS + Android Blink (iOS) / Termux (Android) Mobile browser Claude iOS app (iOS only)
Agents available Claude Code, Codex CLI, OpenCode, Gemini CLI Whatever you install Claude Code only Claude Code only
Persistent storage 30 GB Depends on server Desktop filesystem 30 GB ephemeral (session-scoped)
Session survives app close Yes (hibernation) Yes (tmux) Yes (desktop keeps running) Yes (idle timeout reclaims env)
Non-GitHub repos Yes (clone anywhere) Yes Yes (desktop does the clone) Bundle-only, no push-back
Setup time ~2 min 15-30 min ~1 min (if desktop running) ~3 min (GitHub App connect)
Price $29.99/mo after trial Free + server cost Free Bundled with Claude Pro/Max/Team

Remote Control wins on price and simplicity if you already have a desktop session running. SSH wins on flexibility if you have reliable infrastructure. Claude Code on the Web wins if you already pay for Claude Pro/Max and your life is on GitHub. Cosyra wins when you want a persistent Ubuntu container with multiple agents pre-installed, reachable from both iOS and Android apps, without depending on another machine or a specific Anthropic plan tier.

Frequently asked questions

What is the best way to use Claude Code from my phone?

Four real options as of 2026-04-17. A cloud terminal like Cosyra gives you the most complete experience, full terminal access with Claude Code, Codex CLI, OpenCode, and Gemini CLI all pre-installed and no desktop dependency. Anthropic's own Claude Code on the Web runs tasks on managed VMs at claude.ai/code and is monitorable from the Claude iOS app, good if you already have a Claude Pro/Max/Team plan and live in GitHub. If you have an always-on machine, SSH + Tailscale + tmux works. For quick approvals on an existing session, Claude Code's Remote Control (/rc) is the lightest option.

How do you AI code from your phone?

Install a mobile cloud terminal, add your API key, and run the AI agent in a real Linux terminal. The phone keyboard is fine because the agent writes the code, you send short prompts and review diffs. The shift from "typing code" to "directing an agent" is what makes phone screens viable for real development work.

Does Claude Code work on Android?

Claude Code is a Node.js CLI, so technically yes, with friction. On Termux you can pkg install nodejs git then npm install -g @anthropic-ai/claude-code and add a shell alias because the npm package no longer ships a global CLI entry point (see the community claude-code-termux repo for the exact steps). The official native installer does not work on Termux because of Android ABI issues, and on Android 12+ the OS phantom process killer can terminate long Claude sessions with signal 9. For a zero-setup path, a cloud terminal like Cosyra runs Claude Code in a real x86_64 Ubuntu container reached from the Android app. We walk through the full trade-off in Cosyra vs Termux.

Do I need to keep my laptop running to use Claude Code remotely?

With SSH or Remote Control, yes, the Claude Code process runs on your machine. If it sleeps or disconnects, the session dies (unless you used tmux). With Claude Code on the Web or a cloud terminal like Cosyra, Claude Code runs on cloud infrastructure and your laptop can be off entirely. The difference between those two: the Web tier's VMs idle out and get reclaimed, Cosyra hibernates your container and resumes it where you left off.

Can I approve Claude Code permission requests from my phone?

Yes, two ways. Claude Code's Remote Control shows permission prompts in a mobile browser tied to a desktop session. With Cosyra, prompts appear inline in the mobile terminal, no desktop needed. Community tools like claude-remote-approver add push notification approval for SSH setups.

Is Claude Code free to use on mobile?

Claude Code itself is free to install, you pay Anthropic per token via your API key at their standard rates, or bundled if you pay for a Claude Pro/Max/Team plan. The environment to run it has separate costs: Cosyra signups get 1 hour of free compute with no credit card, then a 10-hour, 7-day trial when you want more, then $29.99/month or $300/year. SSH is free if you have hardware, Remote Control is free but requires a desktop session, and Claude Code on the Web is included with Claude Pro/Max/Team (research preview as of 2026-04-17).

tl;dr

Claude Code runs on x86_64 Linux, not directly on phones. Four ways to bridge that gap as of 2026-04-17: SSH into your own machine, Claude Code Remote Control for monitoring an existing desktop session, Anthropic's Claude Code on the Web + Claude iOS app (research preview, GitHub-native, Pro/Max/Team plan), or a cloud terminal like Cosyra for full access with multiple agents pre-installed and no desktop dependency on iOS and Android.

App Store / Google Play. Sign up — 1 hour free, no credit card. Extend with a 10-hour, 7-day trial when you want more.

Run Claude Code from your phone in 2 minutes. Install Cosyra, add your Anthropic API key, type claude.

See pricing