DEV Community

chovy
chovy

Posted on Originally published at dev.profullstack.com

Your coding agents, on your phone

Nobody watches Claude Code work any more. You start four agents, walk off, and come back when one of them is stuck. The moment that actually needs you is a permission prompt, and it shows up while you are on the couch or in a meeting.

moshcode 0.112.0 puts the herd on your phone. On the box running your agents:

moshcode herd phone on
Enter fullscreen mode Exit fullscreen mode

Then open https://app.moshcode.sh/m on your phone, add it to the home screen and turn on notifications. That is the whole setup.

No SSH, no Tailscale

The usual way to do this is an SSH client on the phone and a VPN to reach the box. We went the other way. herd phone on installs a small relay as a user service, and the relay dials out to app.moshcode.sh. Nothing listens on your machine, so there is no port to open and no key to copy to the phone. You sign in with the passkey you already have.

What you get

Every session on every paired machine, with blocked ones at the top. Tap one and you get Allow, Deny and "Allow all this session". Those send the keys the engine's own dialog wants: 1, 2 or Esc for Claude Code, and y, a or Esc for Codex.

There is a live view of the pane's screen, streamed only while you are looking at it, a key bar for Esc, Tab, arrows and Ctrl-C, and a box to type a reply or a new prompt.

When an agent blocks or finishes, your phone buzzes. On Android the notification itself has Allow and Deny, so you can answer without opening anything. iPhone does not show those buttons yet, so the tap opens the approval instead.

The bug we found on the way

A phone tap is late by nature. You see the prompt, you unlock, you tap, and by then someone may have answered at the keyboard. So the relay re-reads the screen before it types anything, and refuses a tap that no longer matches.

The first version checked that the dialog was somewhere in the bottom 25 lines of the screen. Testing it against a live tmux session showed the problem: an answered dialog stays on screen until the engine redraws, and a second Allow typed 1 into whatever came next. Now the dialog's menu has to be the last thing on the screen, and anything below it means the question is over. There is a test for that exact screen.

Approvals from the notification use a one-time token, so a double tap, or the same notification on two devices, answers once.

Try it

moshcode upgrade self
moshcode herd phone on
Enter fullscreen mode Exit fullscreen mode

New to moshcode: curl -fsSL https://moshcoding.com/install.sh | sh. The design is in PRD 0020 in the repo. Next up is a chat view of each session that shows the edits and commands, sealed end to end, so the relay only ever sees ciphertext.

Drafted with AI assistance and edited by me.

Top comments (0)