agentctl in My Pocket¶
November 17, 2026
As I write this, my laptop has 34 Claude Code agents running across seven tmux sessions. A Terraform agent is planning a change for a client, a couple of Go engineers are working through agentctl tickets, a reviewer is reading a PR, and my primary agent is keeping track of all of them.
Until yesterday, all of that stopped when I got up from my desk.
Now it doesn't. My phone buzzes with "go-engineer blocked", I tap the notification, read the permission prompt, hit Yes, and the agent gets back to work. I can do that from the couch, the kitchen, or the passenger seat on the way to the grocery store.
The fleet waits for you¶
If you run agents, you know the problem. Agents don't work for an hour and hand you a finished thing. They work for four minutes and then ask whether they can run terraform plan. Or they finish, open a PR, and sit idle until somebody gives them the next job.
agentctl was already good at showing me who needed attention. The status bar, the window glyphs and the hub all exist so I can see at a glance which agents are blocked. But all of that assumed I was looking at my laptop. If I walked away for an hour, I came back to a row of agents that had been blocked for 55 minutes.
Not a cloud sandbox: my actual laptop¶
There are plenty of ways to run a coding agent from your phone now. Most of them start a fresh agent in a container somewhere else. That's fine for a quick fix in a public repo, but it isn't my setup.
My setup is the laptop. It has:
- The roster. The architect, the Go, Python, Swift and Terraform engineers, the reviewer and the rest, each with its own instructions, model and permission rules.
- The credentials.
ghauth, AWS profiles, kubeconfigs for the homelab, the MCP servers I've connected, and the VPN routes to the machines they talk to. - The state. Dozens of git worktrees, the shared context store, the audit log, and the sessions that are already halfway through something.
The phone app doesn't move any of that. It moves me. Every agent I see on my phone is the same Claude Code process in the same tmux window I'd see if I sat back down, with the same config and the same context. When I dispatch a new job from my phone, it launches on the laptop exactly as if I'd typed agentctl dispatch at my desk.
That's what makes it feel so different.
What it does¶
It's a web app that I've added to my iPhone's Home Screen, so it opens full screen like any other app. It does five things:
- Shows the fleet. Every agentctl session and every agent in it, grouped by project and sorted by what needs me: blocked first, then working, done and idle. Dispatched workers nest under the agent that started them. It updates live.
- Pushes when something needs me. A real iOS notification when an agent blocks, when one finishes (with or without a PR), and a reminder if one has been blocked for ten minutes. Quiet hours keep it from buzzing at 2am.
- Unblocks agents. When an agent is sitting on a permission dialog, the app shows the dialog text and a button for each option. I can also reply to an idle agent, interrupt a runaway one, or close a finished window.
- Starts work. Pick an agent, a project, and optionally a backend, model and effort level, type a prompt, and it's dispatched to the laptop.
- Gives me a real terminal. Tap "Live terminal" and I'm inside the agent's tmux window with a key bar for Esc, Tab, ^C and the arrows. It's the real thing, not a picture of it.
That last one is the escape hatch. Anything I'd normally do at my desk, I can do from the terminal. It's not pleasant on a phone screen, but it means nothing is out of reach.
How it works¶
It's all one new command, agentctl serve, which runs as a launchd agent on the laptop. The web app is embedded in the Go binary. There's no npm and no build step. It's plain HTML, CSS and JavaScript modules, with xterm.js vendored in for the terminal.
The plumbing reuses what agentctl already had:
- Fleet data comes from the same code behind
agentctl status --json, so the phone and the terminal can't disagree. - Live updates come from watching the files that Claude Code hooks write on every state change. The server diffs what the fleet looks like, not raw file events, and streams changes over Server-Sent Events.
- Notifications use Web Push, which iOS supports for Home Screen web apps. That meant no Apple developer account, no Xcode and no App Store review.
- The live terminal attaches a hidden tmux viewer session to the agent's window inside a PTY and pipes it over a WebSocket. It's attached with
ignore-size, so opening it on a phone doesn't squash the window on my laptop to 40 columns. - Keep-awake. While any agent is working or blocked,
serveholds acaffeinateso the laptop doesn't fall asleep halfway through a job.
I did start down the native road first. There was a design for a native iOS app and an experimental macOS companion app. A web app served from the binary turned out to do everything I wanted with a fraction of the moving parts, so the native design never got built and the Mac app got deleted.
Being careful about it¶
A web page that can approve shell commands on my laptop is a pretty big hole if it's done wrong, so this got more design time than anything else:
- It's never on the public internet. Connections are refused unless they come from a private address range: my home network or my VPN. To use it away from home, I connect to the VPN first.
- Its own certificate authority.
servecreates a local CA that is name-constrained to local names and private IPs, so even a stolen CA key can't impersonate a real website. - Pairing.
agentctl serve pairprints two QR codes: one to install the CA on the phone, one to pair. Each paired device gets its own long-lived token, and I can list and revoke them. - Writes are off by default. Answering, replying, dispatching and typing in the terminal all need
allow_writeturned on in the config. - Answers are checked against what I saw. When I tap Yes, the server re-reads the pane and only sends the key if the dialog is still the exact one the phone showed me. If it changed in the meantime, I get an error instead of approving something I never read.
- Replies are text, not commands. A reply starting with
!,/or#is refused, because Claude Code would run it as a shell command, slash command or memory edit. - Everything is logged. Every write goes to an audit log, and push notifications never include pane text or prompts.
Built overnight, mostly by agents¶
The design was approved on the evening of November 16. It was split into six PRs: the server and pairing, the read API, push, the write API, the web app, and the live terminal. The first merged at 11:14pm. The live terminal merged at 9:26 the next morning.
Most of that work was done by agents running in agentctl, which were dispatched, reviewed and merged from... well, partly from my phone, once there was enough of it to use. It wasn't flawless. One change to how the pane preview renders broke the app, got reverted, and was redone properly an hour later. Then a hardening pass tightened push, replies and dispatch before I'd call it done.
Game changing¶
I don't use that phrase lightly, but this is the biggest change to how I work since I started running agents in parallel.
Before, the number of agents I could keep busy was capped by how long I could sit at my desk. Now it's capped by how often I glance at my phone, which, let's be honest, is constantly. Agents that would have spent an hour blocked get unblocked in a minute. Ideas I have away from the desk turn into a dispatched job and a PR waiting for me when I sit back down.
And because it's my real laptop and not a sandbox, I don't have to settle for less when I'm away. It's the same fleet, the same config and the same agents, just in my pocket.
Try it¶
agentctl serve is in agentctl now. If you're already running agentctl:
agentctl serve install # run it under launchd
agentctl serve pair # scan the QR codes with your phone
Then open the link on your phone, add it to your Home Screen, and turn on notifications in Settings. When you're ready to let it do more than watch, set "allow_write": true in the serve block of your config.