One developer, a team of AI agents, and the stack under an iPhone app

I set out to build one phone console for every coding agent I run, and I built it with a team of AI agents. How that worked, what broke, and what the agents got wrong.

16 min read

On this page
  1. The stack under the app
  2. Standing on other people’s work
  3. How the team works
  4. Reviews caught what tests didn’t
  5. Small probes that killed big designs
  6. Tests, and not trusting them
  7. What the agents got wrong
  8. Giving back
  9. What the numbers don’t say
  10. The chapters

I wanted one place on my phone for every coding agent I run. Not one app per agent, and not a phone terminal I squint at: one console for Claude Code, Codex, opencode, pi and the rest, whether they run under herdr, tmux, Zellij, herdr-core or Ultimate, or in Codex’s and OpenCode’s own servers. And it had to keep working where phones actually are: on a train, switching between Wi-Fi and cellular, or with no signal at all.

That became Waycar, a free iPhone and iPad app. You see which agent needs you, open its live terminal, and send it a message. Terminals ride out network changes over mosh. A message you write, or an agent you start, while the Host is out of reach waits on the phone and goes out when the Host is back. You don’t need to keep a laptop open.

I’m Mike, and I’m the only person working on it. From September 20 to November 30, 2026, I made 2,271 commits to it in 72 days. I didn’t do that alone at a keyboard. A team of AI coding agents wrote code, reviewed each other’s work and ran the tests. I decided what to build, and I checked what came back.

The source is public, in three repositories:

  • waycar/waycar-app (Apache-2.0): the app, the SSH, mosh and terminal layers under it, the Rust tools that run on the Host, the push relay and the website.
  • waycar/swift-mosh (MIT, like upstream): wiedymi’s pure-Swift mosh client, with my 20 patches and two TLA+ models of the client.
  • waycar/simslot (Apache-2.0): the queue that lets many agents share one Mac’s iOS simulators.

This is the story of how it got built. A lot of it is about what went wrong, because that part taught me the most.

The stack under the app

A phone app that talks to coding agents over SSH sounds like a thin client. It isn’t. Most of the hard bugs lived below the screens, in code I first thought I’d never touch.

SSH: four patches to libssh2

Waycar connects with libssh2 and OpenSSL, built into the app from pinned sources. One SSH connection carries API requests, terminal sessions and file transfers. Each new channel on that connection waited for the one before it. On a phone with a slow network, those waits added up.

The fix was four patches to libssh2. One skips a round trip during key login. One sends the terminal request and the command back to back. One fixes a wait that failed when a reply for a different channel arrived first. One lets several channel opens be in flight at once.

I measured them against OpenSSH 10.3p1 behind a proxy that adds 80 ms of round-trip delay, best of three runs:

  • Key login: 218-234 ms before, 117-132 ms after.
  • Terminal plus command: 192 ms before, 93 ms after.
  • Four channel opens: 366 ms before, 95 ms after.

The same test suite checks that refusals still work and that a failed open doesn’t break the session. The full story is in Making SSH channel opens overlap without making the session unsafe.

mosh: a screen that kept pieces of the past

Terminals can also run over mosh, which keeps working when the phone changes networks. Waycar’s mosh client is swift-mosh, an independent MIT-licensed Swift implementation by wiedymi, vendored at version 0.1.8. I’ve added 20 patches on top, about 6,400 lines. They’re public with the app, in waycar/swift-mosh.

The worst bug showed up as stray text from old output. The connection was fine. The screen was wrong.

The cause was a rule I had missed. A mosh update says which earlier screen it starts from. When acknowledgements run late, the server can build a new update on an older screen than the one the phone is showing. My client applied it to the newest screen anyway.

In a test with 300 numbered lines and every client packet held back 150 ms, 11 to 18 of 24 rows ended up wrong. With the fix, which keeps recent screens and applies each update to the one it names, the screen came out exact. That story is A mosh diff belongs to its base, not the screen I happen to show.

A second bug hid in the same place. The phone and the Host have to agree on how wide each character is. One symbol counted as two columns on the phone and one on the Host. A status row with two of them shifted every row after it. Waycar now uses a width table generated from the system’s own width function, with a check for drift.

Terminal: Ghostty, rebuilt without one library

The terminal is drawn by Ghostty, through Lakr233’s Swift layer libghostty-spm. I vendored that layer and added seven patches, mostly for touch: selecting text with a finger, tapping links, tapping a file path to preview it.

The native core needed more than a patch. Apple builds of Ghostty link GNU gettext, which is LGPL. A statically linked LGPL library means users must be able to relink the app, which an App Store app can’t offer. So I build the Ghostty core myself, from pinned commits, with that library turned off.

Host Tools: from Node to one Rust binary

The Host Tools run on the computer where your agents live. They pair the phone, install status hooks for each agent, read chat transcripts, and send encrypted notifications.

The original plugin needed Node on the Host. Some Linux distributions ship a Node too old to run it, so users had to install a newer one first. The Rust rewrite merged as a series of pull requests on October 29, and the Node code was deleted the same day. The Host now needs no Node at all. At the end of November the Rust code was 80,778 lines, with 1,371 tests.

I don’t have a clean record of how long the work behind those pull requests took. They were prepared on branches and merged in one day. So I won’t tell you it was built in a day.

herdr, and six more runtimes

herdr is the agent manager Waycar first talked to. It’s an independent open-source project, and Waycar is a third-party client. I added tmux, herdr-core, Zellij and Ultimate, and the servers that Codex and OpenCode run, as six more runtimes. So the app works on Hosts that don’t run herdr, and one Console lists them all.

Standing on other people’s work

Waycar didn’t start from a blank page, and much of what runs under it isn’t mine: wiedymi’s swift-mosh; the mosh protocol and design by Keith Winstein, John Hood, Anders Kaseorg, Keegan McAllister and the mosh contributors; libssh2, maintained by Viktor Szakats and Will Cosgrove; OpenSSL; Ghostty by Mitchell Hashimoto and its contributors; Lakr233’s libghostty-spm; herdr by Ogulcan Celik and its contributors; OCB by Phillip Rogaway and Ted Krovetz; and the smaller libraries listed in the app’s Acknowledgements. Thank you.

Waycar has had 16 tagged app releases, from 1.0.0 on September 27 to 1.4.2 on November 16. 1.4.2 has been on the App Store since November 17. The Host Tools have had 35 releases of their own.

How the team works

I work in Ultimate, an open-source agent harness. One long-running root conversation keeps the project record. For each piece of work it starts a coordinator on its own branch, in its own Git worktree. Coordinators start workers for bounded pieces, reviewers to inspect the result, and a lander that merges, runs the checks and pushes.

Ultimate’s record for this project starts on October 31, 2026. From then through November 11:

  • 62 task branches started from the root conversation.
  • 269 agent conversations besides the root: coordinators, workers, scouts, reviewers and watchers.
  • 55 of them were reviewer agents.
  • 42 landings on main were recorded.

Before October 31, I worked through GitHub pull requests with other agent tools. 264 pull requests were merged between September 26 and October 31.

You might expect the commits to say who wrote them. About half do. Since September 20, 983 of 1,816 non-merge commits carry a trailer naming an AI co-author or the agent conversation that made them. A commit without one may still have come from an agent. So trailers can’t tell you who or what wrote a line, and I won’t turn them into a percentage.

Some decisions stay mine. Agents don’t decide on their own that a release is ready, send anything to Apple, or install a build on my phone. They do those things only when I say so, and the project’s written workflow says the same.

Reviews caught what tests didn’t

Since October 31, every change goes to a separate reviewer agent before it lands. The reviewer gets the exact commit range and reads the change cold.

Of the 55 reviewers in that first stretch, 30 sent the work back at least once. Across all of them I count 33 “needs changes” verdicts and 29 approvals.

Three of those findings show why I keep doing it.

The wrong project. I added Ultimate itself as a Waycar backend, so I can talk to my own agents from the phone. To find a project, the app read a lock file and connected to the port written in it. One review found three serious problems. The detection script broke on Hosts whose login shell is fish. One stopped project could strand every other project’s conversations. And if a lock file was stale and another project had taken its port, messages could go to the wrong project. The connection worked, so nothing looked wrong. The fix checks who is answering before trusting the answer.

A prompt meant for someone else. Waycar can queue a new agent’s first message while the phone is offline and send it later. A reviewer noticed one path where the launch joined an agent that was already running. The queued message would then go to that running agent, as if it were new. The tests had not caught it. Now those messages wait until I choose to send them.

A gate that passed by skipping. Before an App Store release, a script checks a test Host the release depends on. A reviewer found that it treated skipped checks as passing. A release could have gone out on checks that never ran. In release mode, a skipped check now fails.

Small probes that killed big designs

The most useful agent work was often small. A quick experiment against the real thing stopped a design before it spread.

Offline launches. To recover a launch that may or may not have happened, the app needed a tag it could find again on the Host. The obvious idea was an environment variable set at creation. An agent started herdr 0.9.5 in a throwaway container, created tabs, workspaces and split panes with a marker, and read everything back. None of the API replies returned it, before or after a server restart. The recovery code uses markers each backend can actually return instead.

Launches that never finished. On one of my Linux Hosts running herdr 0.9.1, five of six launches of the omp agent through herdr’s integration got stuck in “launch pending”. Reading herdr’s source showed why: that state only clears when the agent’s terminal changes state or something asks herdr about that agent directly. Often neither happened. One request three and a half seconds after the launch fixed it. It also stopped the herdr server from spinning at about 95% CPU.

Ghost sessions. A phone that attaches to a terminal sets that terminal’s size until it leaves. On a Mac we found 17 orphaned mosh-server processes, the oldest about 23 hours old. Each one held a terminal at phone size. Now every mosh session I leave ends with mosh’s shutdown handshake, and the server has a network timeout as a backstop.

Tests, and not trusting them

At the end of November the app had 7,567 test cases in its main test target. The packages and services add more. In the last green CI runs:

  • the app suite (November 26) listed 7,565 tests and ran 7,319 of them. The CI script says the other 246 run in its separate real-server lanes;
  • the SSH package ran 138 tests in the same run;
  • the mosh package ran 189, with none skipped;
  • the Host Tools (November 22) ran 1,371;
  • the push relay ran 114.

The numbers matter less than whether they mean anything. A test can select nothing and still exit green, so CI checks how many tests actually ran in the suites that need real SSH servers.

Flaky tests got the same treatment as bugs. Two UI waits caused 20 of 27 failures across 18 CI runs. The easy guess was a busy build machine. Running just those two suites in a loop on an idle Mac failed 10 of 20 times, so load wasn’t it. The agent compared a failing run’s view tree with a passing one: 45 views against 90. A tap that arrived while SwiftUI was still building a new window could lose its redraw. Waiting 20 display frames first fixed the focus test in 40 of 40 runs. A second wait got the same fix by analogy, and I can’t say it was the same cause.

A reviewer found the Rust tests flaky too: 5 of 15 full runs failed. Running 24 copies of the test binary at once reproduced it in seconds. The review traced it to three separate causes. Now the rule is to run 24 copies in parallel before asking for review.

Unit tests can’t tell you how tmux behaves on Rocky Linux. So the agents also test against real systems. Five Linux test Hosts run five distributions with different tmux versions. A lab Host runs 17 agent programs against a fake model server, so a test can launch an agent, run a turn and close it without spending tokens. Contract checks start pinned real versions of herdr-core, Zellij, Codex, OpenCode and Ultimate in scratch folders. When one fails, the app’s assumption changed, and you fix the app or the pin, never the check.

All of this runs on one Mac that many agents share. Too many simulators at once made tests flaky. A script now caps booted simulators at four for the whole machine and queues the rest. The lab’s virtual machine died twice under memory pressure on the same day, so the rules now say to drive one agent program at a time.

What the agents got wrong

The agents did a lot of good work. They also made mistakes a careful human makes, plus a few of their own. These are the ones I remember.

They shipped fixes without the tests the reviewer asked for. An audit of hidden state machines found 62 problems. 40 were fixed, each with a test that failed first and then passed. Three more shipped without a regression test, even though the reviewer had asked for one. The landing note says so plainly. That’s honest, but it’s still three fixes with nothing to stop them coming back.

They blamed the wrong layer. Before the 1.3.0 release, a test Host’s mosh check failed, and the release was marked blocked on a UDP failure. The obvious suspect was the network. The real cause: the test client was exiting because its terminal type was set to dumb. No network change was needed.

They designed the wrong experience. For a launch interrupted by a lost connection, the first proposal was an “Interrupted” card and a manual retry. I said no. The app should check the Host, then use the agent it finds or start it. That became a saved project rule, so the next agent doesn’t propose the card again.

They jumped ahead. When I reported that queued agents couldn’t be tapped, a coordinator took my report as the go-ahead. It skipped the assessment it owed me and started building five fixes. The fixes were reasonable. The order was wrong: a question gets a proposal first, and I decide.

Their reports can outrun their evidence. It’s the most common failure, and the hardest to see. So evidence has to come with the claim: a commit, the tests that ran, the skips, and whether any crash was reported. The good summaries keep “tests written but not run” and “installed, not tested on a device” apart from “passed”. The written workflow also makes every run add a dated “run learnings” entry, and a missing one blocks the landing. Before the source went public, that log held more than 110 entries. The public repository started it fresh, because the old entries name my own machines throughout. When a lesson repeats, it becomes a rule in the instructions every agent reads.

Giving back

Waycar depends on other people’s projects. Some of the fixes I found belong in those projects, not only in mine. After launch they will be offered back to libssh2, swift-mosh and libghostty-spm, and the herdr finding goes to herdr as a bug report.

herdr’s 100 ms tick. Every API request to herdr over SSH waited up to about 100 ms. The server checks a new connection for its first request on a 100 ms timer. A patch that waits for data instead of the timer answered in 0.0 to 0.4 ms in a local benchmark. herdr closes pull requests from people outside its approved contributors, and I’m not on that list, so it goes to herdr as a bug report, with the patch there if a maintainer wants it. The details will be in a later chapter, The 100 ms wait between a socket connection and an API request.

libssh2. Of the four patches, I think the channel-reply fix is a plain bug fix and the clearest one to offer, so it goes first. The other three add new interfaces, and their design needs discussion with the maintainers.

libghostty-spm. The touch patches, for selection, link taps and tap hooks, will go back to Lakr233 as pull requests.

swift-mosh. The older-screen fix and the other patches live in my copy of swift-mosh. I’d like to offer them to its author. I also want to ask for one thing: a short public statement that swift-mosh was written without mosh’s GPL source. My own patches record how they were written. The first six came from watching the protocol on the wire. Two more had their behavior checked against mosh’s source, with no code, comments or names taken.

The GPL near miss. My first mosh client, on September 20, was mosh’s own GPL code, by way of Blink Shell’s port. Five days later I replaced it with swift-mosh, which is MIT, before any release. Only five internal TestFlight builds ever carried the GPL client. The Ghostty core had a similar problem: the stock build linked GNU gettext’s libintl, which is LGPL, so I built my own core without it. libghostty-spm shipped the same fix two weeks later after a separate report.

Did we copy anything? Before going public I had the code compared against thirteen projects it could plausibly have borrowed from, with two similarity tools and a cross-language check. Every vendored library matches its upstream pin, apart from my documented patches. Code I claim as mine matched nothing beyond short platform idioms, except one 13-line UIKit class adapted from libghostty-spm, which now carries a credit comment. swift-mosh shares mosh’s protocol vocabulary but no comments and no matching code; it reads like an independent implementation, not a port. How its author wrote it is his to say, so I’m asking him.

Two libraries of their own. Two parts are useful without the app, so they’re public in their own repositories, next to it: waycar/swift-mosh, wiedymi’s swift-mosh with my 20 patches and two TLA+ models of the client, MIT like upstream; and waycar/simslot, the queue that lets many agents share one Mac’s simulators. Both run their tests on GitHub’s hosted runners.

What the numbers don’t say

I don’t know how much faster agents made me. I have no controlled comparison, and the commit count is not a stand-in for one. More code also means more code to understand, test and maintain.

What I can say is narrower. With agents, I could chase a protocol bug, rebuild a library and fix a flaky test at the same time, while still deciding what the app should do. My job didn’t shrink. It moved: less typing, more checking.

If you try this yourself, here’s what I’d keep:

  1. Give every task a narrow goal, one owner and a way to prove it worked.
  2. Ask for a failing test before the fix.
  3. Give reviewers an exact commit range and a reason to say no.
  4. Probe the real system before designing around it.
  5. Put limits on shared machines early.
  6. Write corrections down as rules, or the same mistake comes back with a different agent.

The chapters

This story has three technical chapters:

The source: