SSH for AI coding agents

Run Claude Code from your phone

An AI coding agent is a terminal program that runs for a long time and expects nobody to hang up on it. That is exactly what phone SSH has always been worst at. Termphin is a native Android SSH client built around the problem: the shell lives on the server, survives the connection dropping, and is still there when you unlock your phone.

The problem with agents over phone SSH

Start Claude Code, Codex or any agent on a server, watch it plan a refactor across forty files, then walk into a lift. The TCP connection dies. Your client reconnects and gives you a clean prompt - and the agent is gone, half way through, with no idea what it had done.

The usual advice is to run tmux first. That works, and everybody forgets, and the one time you forget is the run that mattered. Android makes it worse: the system freezes background processes to save battery, and a frozen process drops every socket it is holding.

How Termphin handles it

Two mechanisms, and they cover different failures.

  • A foreground service, for when you leave the app. While a session is connected, Termphin runs an Android foreground service with wake and WiFi locks, so the process is not frozen and the sockets stay up. Lock the screen, answer a message, come back - the run continued.
  • An agent on the server, for when the network dies. Termphin uploads a small Rust helper over SSH and runs it under your account. Your shell is its child, so when the connection actually drops - tunnel, dead battery, switching from WiFi to mobile - the shell keeps running on the server. Reopen the app and you reattach to the same session, scrollback and all.

The agent is open source and lives in a public repository, so you can read what runs on your machine. A server reboot still kills the shell, and Termphin will put you back in a fresh one in the same directory rather than pretending otherwise.

Handing files to an agent from a phone

The other thing that breaks the loop is context. You want to give the agent a screenshot of the broken layout, a log file, a design reference - and on a phone there is no drag and drop into a terminal.

Termphin uploads straight over SFTP: pick a file from the phone, it lands on the server, and the remote path is pasted into your prompt ready to hand to the agent. Same path, no typing, no clipboard gymnastics. The SFTP browser also has a text editor and image preview, so you can read what the agent wrote without leaving the app.

Which agents this works with

All of them. Termphin is a real terminal over a real SSH connection, so anything that runs in a terminal on a laptop runs the same way here - Claude Code, Codex, Gemini CLI, aider, opencode, or a plain make that takes twenty minutes.

There is no integration, no API key in the app and no plugin to keep up to date. The agent runs on your server, under your account, with your credentials, exactly as it does when you SSH in from a desktop. Termphin never sees the session.

What makes it usable rather than just possible

  • A key toolbar with Ctrl, Esc, Tab, arrows and function keys - the characters a terminal needs and a phone keyboard hides. Editable, so you keep the ones you use.
  • Snippets for the commands that start a run, with their output kept so you can go back and read it.
  • Multiple tabs, so the agent runs in one session while you tail logs in another.
  • Selection that works with a thumb, on a renderer built for touch rather than ported from a desktop.
  • Fourteen colour schemes, light and dark, because reading diffs on a phone in bright sun is its own problem.
  • A PIN or biometric lock on an app that holds the keys to everything you run.

What it does not do

It does not run the model on your phone, does not proxy anything through us, and has no opinion about which agent you use. It is an SSH client. The intelligence is on your server, and the connection to it is our only job.

Stop losing agent runs to tunnels

A native Android SSH client, free, no account. The shell stays on the server, and so does your agent run.

Get Termphin

Frequently asked questions

Does the agent keep running when I lock my phone?
Yes. A foreground service holds the process and its sockets open while a session is connected, and if the network drops entirely, the server-side agent keeps your shell alive until you reattach.
Do I need tmux or screen?
No. The server agent does the same job automatically, for every session, without you remembering to start it. If you prefer tmux you can still use it.
Does Termphin send my prompts or code anywhere?
No. Your phone connects straight to your server over SSH. Nothing is relayed or proxied, so terminal contents, prompts and code never pass through us. See the privacy policy.
Does it work with Codex, Gemini CLI or aider?
Yes. Anything that runs in a terminal works, because that is all this is - there is no per-agent integration to support.
What happens if the server reboots?
The shell dies with it, as it would with tmux. Termphin reattaches you into a fresh session in the same directory and tells you the previous state is gone, rather than silently pretending nothing happened.
Do I need to install anything on the server?
Termphin uploads the agent binary itself over SSH the first time you use a persistent session, into your own account. It is open source, and plain SSH without it works too if you would rather not.