You can run Claude Code, Codex CLI, OpenCode, and Gemini CLI on your phone right now. Install Cosyra for iOS or Cosyra for Android, add your API keys, and you get a full Ubuntu container with all four agents pre-installed. No SSH setup, no always-on laptop, no browser tabs that time out. We built this because we kept wanting to check on agent work from the couch or approve a Claude Code permission request while walking the dog, and the existing options were either fragile SSH chains or monitor-only dashboards.
This guide covers why phone-based AI coding works, how each agent runs on mobile, three approaches you can take, and step-by-step setup on Cosyra. Free trial, 10 hours, no credit card.
Why AI coding agents change the phone equation
The standard objection to coding on a phone is the keyboard. Fair point, if you're the one typing every semicolon. But AI coding agents flipped the ratio. With Claude Code or Codex CLI, you describe what you want in plain language and the agent writes the code, runs the tests, and proposes a diff. Your job is to direct, review, and approve. That interaction model, short prompts in, long outputs out, works on a phone because you're reading more than you're typing.
We think the phone keyboard is fine for agent-driven coding. Most developers who disagree haven't tried it with a properly set up agent that handles the boilerplate. When you're on the train reviewing a PR, or between meetings approving a Codex refactor, the phone is not a compromise. It's the fastest path between "I have five minutes" and "that shipped."
The practical scenarios where this matters:
- Monitoring long-running agent tasks. Claude Code working through a large refactor takes 10-20 minutes. You don't need to stare at a laptop for that. Check in from your phone, approve the permission it's waiting on, and get back to your coffee.
- Quick fixes and reviews. A bug report comes in while you're away from your desk. Open the terminal, point Claude Code at the issue, review the fix, push. Done before you get home.
- Learning and experimentation. You read about a new library on the bus. Spin up a scratch project, ask the agent to scaffold it, poke around. The container persists, pick it up later on any device.
The four agents: what each one does
Cosyra pre-installs four AI coding agents. All of them use BYOK (bring your own key), you connect your own Anthropic, OpenAI, or Google API key and pay the provider directly at their standard rates. Cosyra itself charges for compute, not AI tokens.
| Agent | Provider | Best for | API key needed | Docs |
|---|---|---|---|---|
| Claude Code | Anthropic | Deep codebase understanding, multi-file refactors, PR review | Anthropic API key | Official docs |
| Codex CLI | OpenAI | Quick edits, code generation, sandboxed execution | OpenAI API key | GitHub repo |
| OpenCode | Any (75+ providers) | Open-source flexibility, works with any LLM provider | Varies by provider | GitHub repo |
| Gemini CLI | 1M token context, large codebase navigation, Google ecosystem | Google AI API key | GitHub repo |
You don't have to pick one. All four are installed in the same container. Start a task with Claude Code, try a different approach with Codex, use OpenCode with a local model for private code. The container state is shared , they all see the same files, same git history, same environment variables.
Three approaches to AI agents on your phone
Before we walk through the Cosyra setup, here's how the landscape breaks down. Each approach has real trade-offs.
1. SSH from phone to a desktop or VPS
The classic approach: run the agent on a "real" machine and SSH in from Blink Shell (iOS) or Termux (Android). Add Tailscale for networking and tmux for session persistence.
- Upside: Full control, use your existing dev machine, free if you already have the hardware.
- Downside: Requires an always-on machine. If your MacBook sleeps or your VPS reboots, the session dies. Setup takes 15-30 minutes per machine. You're debugging networking instead of writing code.
This is the approach described in most existing guides, SSH + Tailscale + tmux + Blink. It works if you have a reliable server. We used it ourselves for months before building Cosyra.
2. Browser-based cloud IDEs on mobile
GitHub Codespaces and code-server run VS Code in a mobile browser. You get a full editor, terminal, and extensions.
- Upside: VS Code ecosystem, extensions, GitHub-native integration.
- Downside: Browser UIs on mobile are painful, tiny targets, constant mis-taps, Safari's address bar eating screen space. Codespaces free tier gives 120 hours/month (as of 2026-04-15) but the browser experience on a phone is optimized for desktop screens, not 6-inch touch displays.
3. Native cloud terminal with agents pre-installed
This is what we built with Cosyra. A native iOS and Android app that connects to a persistent Ubuntu container in the cloud. Claude Code, Codex CLI, OpenCode, and Gemini CLI are pre-installed. The terminal UI is designed for touch, with larger tap targets, swipe gestures, and a toolbar row for common keys.
- Upside: Zero setup for agents, native mobile experience, container persists across sessions (30 GB storage, session hibernation).
- Downside: Paid service ($29.99/month after free trial). Requires internet, no offline mode. You're running on our infrastructure, not your own.
Try it free. 10 hours of compute, no credit card required. App Store / Google Play / Pricing details
Setting up each agent on Cosyra
The setup takes about two minutes per agent. Here's what it looks like.
Step 1: Install and start a container
Download Cosyra from the App Store or Google Play. Create an account (email or Sign in with Apple/Google). The app provisions your Ubuntu container on first launch. In our testing, that took about 15 seconds.
Step 2: Add your API keys
Each agent needs its own API key. In the Cosyra terminal, set them as environment variables. They persist across sessions.
$ # Claude Code (Anthropic)
$ echo 'export ANTHROPIC_API_KEY="sk-ant-..."' >> ~/.bashrc
$ # Codex CLI (OpenAI)
$ echo 'export OPENAI_API_KEY="sk-..."' >> ~/.bashrc
$ # Gemini CLI (Google)
$ echo 'export GEMINI_API_KEY="AIza..."' >> ~/.bashrc
$ source ~/.bashrc
For OpenCode, configure your provider in its config file, it supports 75+ LLM providers including local models. See the OpenCode docs for provider setup.
Step 3: Clone a repo and start coding
$ git clone https://github.com/your-org/your-project.git
Cloning into 'your-project'...
Receiving objects: 100% (2847/2847), done.
$ cd your-project
$ claude
Claude Code v1.0.33
Type your prompt, or type "/" for commands.
> Review the open PR #42 and suggest improvements
That's it. The container has git, node, python, go, rust, and common dev tools pre-installed. Your files persist on 30 GB of storage. If the app goes to background, session hibernation keeps your work intact.
Switching between agents
All four agents are regular CLI tools. Switch between them like you would on a laptop:
$ # Start with Claude Code for a deep refactor
$ claude
> Refactor the auth module to use JWTs instead of sessions
$ # Try Codex for a quick fix
$ codex 'fix the broken test in auth.test.ts'
$ # Use Gemini CLI to navigate a large codebase
$ gemini
> Where is the rate limiter middleware defined?
A real workflow: reviewing a PR from the train
Here's a scenario we run through regularly. It's 8:40 AM, you're on the train to the office, and a teammate tagged you on a PR that needs review before standup at 9.
- Open Cosyra on your phone. Your container is still running from yesterday.
-
cdinto the project.git fetch && git checkout pr-branch. -
Run
claudeand ask: "Review the diff between main and this branch. Focus on security issues and missing tests." - Claude Code reads every changed file, checks the test coverage, and gives you a structured review with specific line references.
- You read the review on your phone, approve the PR with a comment referencing Claude's findings, and push a small fix Claude suggested.
- You walk into standup at 9 having already reviewed and improved the PR. Total phone time: 6 minutes.
The agent did the heavy reading. You made the decisions. That's why the phone works, it's a command interface for an agent that does the actual typing.
Tips for phone-based agent work
- Use agent-first workflows. Don't try to write code character by character. Describe what you want in a sentence, let the agent generate, review the output. This is faster on a phone than manual editing on a laptop for many tasks.
- External keyboard is optional. For sessions longer than 20 minutes, a Bluetooth keyboard helps. For quick reviews and approvals, the phone keyboard is enough. We've shipped production fixes from the waiting room at the dentist with just a thumb.
- Use tmux inside the container if you want multiple terminal
panes. Cosyra's container includes tmux pre-installed.
tmux new -s workgives you split panes, one for the agent, one for watching test output. - Commit and push from the container. The container has full git support. Connect your GitHub account via the Cosyra app (see Docs) and push directly.
- Session hibernation saves your state. Close the app, come back hours later, and your terminal session, running processes, and files are exactly where you left them. No reconnecting, no tmux reattach.
How this compares to other mobile coding options
| Feature | Cosyra | SSH + Blink/Termux | Codespaces (mobile browser) | Termux (local) |
|---|---|---|---|---|
| AI agents pre-installed | 4 agents ready | Manual install on server | Manual install | Limited (ARM, no Claude Code) |
| Setup time | ~2 min | 15-30 min per machine | 5-10 min | 10-20 min |
| Requires own server | No | Yes | No (GitHub hosts) | No (runs locally) |
| Native mobile app | iOS + Android | Blink (iOS) / Termux (Android) | Browser only | Android only |
| Persistent storage | 30 GB | Depends on server | 32 GB (free tier) | Device storage |
| Offline capable | No | No (SSH needs network) | No | Yes |
| x86_64 Linux | Yes (Ubuntu) | Depends on server | Yes | No (ARM userland) |
| Price | $29.99/mo after trial | Free + server cost | Free 120 hrs/mo | Free |
Each option wins somewhere. Termux is unbeatable on price and offline capability. Codespaces is free and integrates with GitHub. SSH gives you maximum control. Cosyra's edge is that the agents work out of the box on a phone, no server maintenance, no browser compromises, no ARM compatibility issues. For a deeper look at Claude Code specifically, see our guide on how to run Claude Code on your phone.
Frequently asked questions
What is the best way to use Claude Code from my phone?
The most direct way is a cloud terminal like Cosyra that runs Claude Code in a persistent Ubuntu container accessible from the iOS or Android app. Alternatives include SSH into a desktop via Tailscale + tmux, or Claude's built-in Remote Control feature for monitoring and approvals only. Each approach has trade-offs , see the three approaches section above.
How do I use Codex CLI remotely from my mobile device?
Codex CLI needs a Linux or macOS environment. On a phone, you either SSH
into a machine running Codex or use a cloud container with Codex
pre-installed. Cosyra includes Codex CLI, add your OpenAI API key and run
codex. Community alternatives like CC Pocket exist but
require self-hosting.
[source: OpenAI Developer Community]
Can you actually code on an iPhone?
Yes, and with AI agents it's more practical than you'd expect. The agent writes code; you review and approve. Short prompts work fine with the iPhone keyboard. For manual code editing, an external keyboard helps. Apps like PlayJs and Swift Playgrounds handle simple projects. For full-stack development with AI agents, you need a cloud terminal.
How do I approve Claude Code permission requests from my phone?
Claude Code's Remote Control shows permission prompts in a mobile browser, but requires a running desktop session. With Cosyra, Claude Code runs directly in your mobile terminal, permissions appear inline and you approve with a tap. No desktop required. Community tools like claude-remote-approver also exist for push-notification approval.
[source: GitHub, claude-code issues]
How can I run a Linux terminal on my Android phone?
Three options: Termux (free, local ARM Linux), Android's built-in Linux Terminal (Debian VM on supported devices), or a cloud terminal like Cosyra (full x86_64 Ubuntu with AI tools). Termux is the most popular for local use. Cosyra is the fastest path if you need AI coding agents and don't want to deal with ARM compatibility.
Do I need an external keyboard to code on my phone?
Not for agent-driven workflows. When Claude Code or Codex CLI does the typing, you're sending short prompts and approving changes, the phone keyboard handles that fine. For sessions over 20 minutes or manual code editing, a Bluetooth keyboard makes a real difference. We've shipped production fixes from a waiting room with just a thumb keyboard.
tl;dr
AI coding agents (Claude Code, Codex CLI, OpenCode, Gemini CLI) work well on phones because the agent types and you direct. Cosyra gives you a persistent Ubuntu container with all four pre-installed, install the app, add your API keys, start coding.
App Store / Google Play, Free trial, 10 hours, no credit card.
Get started now. Download Cosyra and run your first AI agent from your phone in two minutes.