moth

Coding agents on your Mac, in your pocket

Your agents keep working. The lamp says when they need you.

moth runs Claude Code, Codex and Pi on a Mac, and lets you watch and steer them from the Mac and the iPhone: the conversation, the agent’s own terminal, its questions and the changes it made.

A personal project, built for fun and used every day. It isn’t available to download.

The sidebar lights what waits on you and says what the rest are doing; the toolbar belongs to the session in front. moth speaks Traditional Chinese. The agents speak whatever you do.
01

What it does

  • One lamp for what needs you

    An approval or a question from any agent lights its row, and only that. The iPhone gets a notification you can answer from; a risky command waits for you to open the app and pass Face ID.

  • The conversation, or the agent’s own screen

    Read a session as a conversation, with each finished turn’s work folded behind one line, or switch to the agent’s own TUI and type into it, keys and all. Same session, two ways to look.

  • Agents outlive the app

    One small process holds every terminal. Quit the app, update it, restart the server: the agents keep running, and the session is there when you come back.

  • Small enough to forget

    The host idles at 4.8 MB with no wakeups a minute. Nothing in it ticks while nothing happens; every timer has to give a reason.

  • What changed, turn by turn

    A panel of the diffs: this turn’s, or the whole session’s, with the count on the toolbar before you open it.

  • Only where you are

    The host listens on this Mac and on your Tailscale address, never on every interface, and every request carries a token. It fails closed: it would rather not start than start open. Nothing is fetched at runtime.

02

In your pocket

The iPhone app is the same moth, laid out for a thumb: by day cream paper, by night the night sky, and the one lamp either way.

moth on the iPhone by day: a notification of an approval at the top, and below it the lit row of the session waiting, then the rest of the sessions
What waits on you, lit, and a notification the moment it starts waiting.
moth on the iPhone by night: a session with an approval card at the bottom, offering to deny, approve, or say what to do instead
Approve, deny, or tell it what to do instead.
The Dynamic Island expanded: one waiting, the session's title, the command it wants to run, and how many are running
A Live Activity keeps count while the phone is locked: how many run, how many wait, and what the first one wants.
03

Two modes, one app

  1. The host

    On the Mac where the agents run, moth is the host. The server and the terminal holder ship inside the app and run as its login items; there is no install script, and moving the app to the Trash removes everything.

  2. A client

    On any other Mac, the same app is a client of that host, over Tailscale. The iPhone is always a client. One protocol, so one interface everywhere.

04

How it’s made

moth began in Kotlin. This is the rewrite in Swift: 530 commits since the second of November 2026, checked the whole way by tests that drive the real apps.

  • Swift 6.4strict concurrency, warnings as errors
  • SwiftUImacOS 26 and iOS 26, system controls first
  • Hummingbirdthe host’s server, without its one-second timer
  • End-to-endthe Mac and iPhone apps against a lab host and a stand-in agent, never a real session
  • AlloJosh Puckett’s typeface, for the conversation and this page