An AI coding agent that works over SSH on a remote dev box
Run a coding agent on a remote dev box over your own SSH with codeaf chat --host devbox: no daemon or open port, and reachable from a laptop or phone.
CodeAF, the open-source terminal coding agent by AgentField, runs its conversation on your remote dev box while the screen stays on your laptop: codeaf chat --host devbox connects the two halves over your own ssh, with no daemon, no port to open and no config file of CodeAF's own. The deciding condition is simple: if ssh devbox already works from where you sit and CodeAF is installed on the box, you are done.
At a glance
CodeAF --host | Agent inside plain ssh and tmux | Editor remote extension | |
|---|---|---|---|
| Where the agent runs | On the dev box | On the dev box | On the remote host (VS Code Server) |
| Where the screen is drawn | Your laptop | The dev box, sent over ssh | Your local editor |
| Typing | Never waits on the network; only Enter makes a round trip | Each keystroke travels over the link | Local editor |
| Survives a closed lid | Yes, the turn keeps running on the box | Yes, inside tmux | Not documented |
| Phone | Any mobile terminal over ssh | Any mobile terminal over ssh | Not documented |
| Setup on the box | CodeAF and a model key | The agent, tmux and a login | VS Code Server, installed by the extension |
Step 1: make sure the two prerequisites hold
Remote machines needs only two things: ssh devbox already works, and CodeAF is installed on devbox on the path a non-login ssh command sees. Install it there with the same line you use locally:
curl -fsSL https://agentfield.ai/get/codeaf | bashCheck from your laptop with ssh devbox codeaf version. The box needs its own model key, so run codeaf connect on it once (troubleshooting). If you see must be installed on <host> under that name, CodeAF is missing or not on that non-login path.
Step 2: start the conversation on the box
codeaf chat --host devboxThe conversation starts on devbox while you type and read on your laptop. CodeAF runs your own ssh, so your ~/.ssh/config, host aliases, keys, jump hosts and agent all apply. Pick the project with a path, as in --host devbox:code/app, or a user, as in --host me@devbox.
What changes compared with plain ssh
Drawing the screen never waits on the network; only pressing Enter makes a round trip. The status line shows the link, such as devbox · 3ms. Paste a screenshot or attach a file and it travels to devbox with your message; click a path in a reply and a copy opens on your laptop in your own editor.
Close the lid mid-reply and the turn keeps running on devbox. The status line says reconnecting to devbox and the link redials by itself for up to 5 minutes. If it runs out of time, run the same codeaf chat --host ... again: the conversation is still there. After a redial the keyboard can stay with another window, shown as typing from another window now; press Enter to take it back.
Reach it from any network, and from your phone
Install Tailscale on the dev box and on your laptop or phone, and sign both into the same tailnet. The box is then reachable by its Tailscale name from anywhere, so the same --host devbox works at home, in the office or in a café. From your phone, ssh into devbox with any mobile terminal, run codeaf in the project, and you join the same live conversation, folded to fit the screen. There is no app to install (start at your desk, finish on your phone).
Why a dev box is where long work belongs
Closing the terminal stops nothing on any machine: the conversation and its tasks live in the folder's engine. Closing a laptop lid puts that laptop to sleep, though, and nothing runs while it sleeps (keeps working). Running the conversation on a box that stays awake is how a task or a nightly routine carries on while you travel. A long-running coding agent covers the rest. Keeping the code and the model key on one machine you control is also the first step in keeping code in your own infrastructure.
Things to try
- A big box behind a thin laptop:
codeaf chat --host gpubox:code/model, and tests run where the GPUs are. - A routine that runs while you sleep: keep
codeafopen in a tmux on the box and set a nightly routine there. - Check from the train: start at the desk, close the lid, then
ssh devboxandcodeaffrom your phone.
When something else fits better
Any terminal agent inside ssh and tmux works well and needs nothing new: Claude Code, for example, installs on Linux with curl -fsSL https://claude.ai/install.sh | bash and runs as claude in the project (Claude Code setup). Choose it if your link is fast and you already live in tmux. VS Code Remote - SSH opens a folder on any machine with an SSH server, installs VS Code Server there and runs most extensions on the host, so you keep a full editor with no source on your laptop (VS Code docs). Choose it if you want an IDE rather than a terminal. Codex has a desktop app that starts a remote Codex app server over SSH, using your ~/.ssh/config host alias (Codex remote connections). Choose it if you are on a ChatGPT plan and prefer a desktop window. If you are deciding on the terminal itself, see what a terminal coding agent is good for.
Questions people ask
Which AI coding assistant works over SSH on a remote dev box?
CodeAF does it with one command: codeaf chat --host devbox runs the conversation on the box and the screen on your laptop, over your own ssh. You need ssh devbox to work and CodeAF installed on the box with its own model key.
Do I have to open a port or run a daemon on the server?
No. CodeAF talks over your own ssh, so there is no daemon, no port to open and no config file of its own. Your ~/.ssh/config, keys and jump hosts apply as they are.
What happens if my connection drops?
The turn keeps running on the dev box. CodeAF shows reconnecting to devbox and redials for up to 5 minutes; after that, running the same codeaf chat --host ... again brings back the same conversation.
Can I use it from my phone?
Yes, with any mobile terminal. ssh into the dev box, run codeaf in the project, and you join the same live conversation, folded to the phone's width. There is no CodeAF phone app.
Can I reach a machine that has no ssh at all?
Not today through --host, which needs a working ssh to the machine. The commands reference lists codeaf chat --at <name> for a machine paired with a pairing code; the README says that path switches on when the hosted relay does, so plan on ssh for now.
Sources
- CodeAF docs: remote machines, troubleshooting, keeps working, desk to phone, commands, checked 2026-11-21.
- CodeAF README (dev branch), checked 2026-11-21.
- Claude Code setup, VS Code Remote - SSH, Codex remote connections, checked 2026-11-21.
Last updated 2026-11-21. Checked against CodeAF v0.8.3 docs and the Claude Code, VS Code and Codex documentation on that date.