Zoes Download

Blog · Explanation

Keep coding agents running after you close the window

In Zoes, agents keep running after you close the window because a small Go daemon, pocketd, owns the terminals and sessions, not the window itself. Scheduled automations keep firing too. When you return, sessions that need you, failed, or finished show up in the inbox, the Dock badge and macOS notifications.

This post explains why agents usually die with their window, how Zoes separates the two, and the other ways people keep long agent runs alive.

Why agents die when the window closes

Start claude or codex in a terminal and it becomes a child process of that terminal's shell. Close the terminal window and the shell gets a hangup signal, and its children usually exit with it. The same holds for any app that starts agents as children of its own window process: when the window process ends, so do the agents.

For a quick question, that's fine. For an agent halfway through a refactor, it means a lost turn, and sometimes a working tree left half edited. A terminal multiplexer such as tmux keeps the process alive, but then you are back to checking each pane to see which agent is done and which one is waiting on you.

How Zoes splits the window from the work

Zoes is two programs. The window, pocket-desktop, is Rust on GPUI. The work is done by pocketd, a Go program that owns the terminals, the sessions, the Board, the automations, and the connection to the phone. The desktop app only shows what pocketd runs. It doesn't run agents itself.

pocketd starts at login as a background service and outlives the app:

  • On macOS it ships inside the app and is registered as a login item.
  • On Linux it is a systemd user service.
  • On Windows it is a scheduled task.

The desktop app and the zoes command talk to pocketd over a Unix socket, ~/.coding-pocket/pocketd.sock. Close the window and the socket's other end is still there, with every agent still running.

On macOS, closing the window also leaves the app itself in the background by default, so the Dock badge and banners keep working. To change that, go to Settings › General › Quitting & sleep › When the window closes and pick Stay in the background or Quit Zoes. Agents keep running either way.

Two more details follow from the split:

  • Updates. Agents and terminals keep running through an app update. When an update replaces pocketd, it hands its live terminals and agents to the new program inside the same process, and clients just reconnect. Windows can't do this handover, so updating pocketd on Windows closes its terminals.
  • Restarts. The restore.resumeAgents setting, on by default, resumes agents after pocketd or the machine restarts.

pocketd is in packages/pocketd of the public repository. Read it.

Star Zoes on GitHub

Coming back: what needs you

A session that kept running while you were away is only useful if you can see what it did. Each session reports one of five statuses, and three of them are about you:

  • Needs you: the agent is waiting on a permission, a question, or a dialog.
  • Failed: a turn ended with an error.
  • Done: a turn ended and nobody has seen it yet.

Those show in the sidebar, the Inbox (the bell at the top of the sidebar), the Dock badge, and macOS banners. Up next puts them in the order to handle them: Needs you, then Failed, then Done, each oldest first, and ⌘⇧J jumps to the first. Activity lays out every session across projects in columns, including an In review column for idle sessions whose branch has an open pull request. Claude Code and Codex report status from a terminal or a chat. The other eight agents report it from a chat. Details are in Sessions and status.

Automations that run while the app is closed

Because pocketd runs on its own, it can also start work on a schedule. An automation is a prompt, an agent, and a project, with a trigger:

  • Days and time: chosen weekdays at a time in 24-hour HH:MM.
  • Repeat: every so many minutes, from 5 minutes to 7 days.

Each run is an ordinary session, in the project's checkout or in a new worktree off a branch you pick. New automations use Edits access by default. A run that asks for permission becomes Needs you and waits, like any other session, and the next scheduled run is skipped until you answer.

One limit to know: pocketd fires runs only while it is running and the machine is awake. A run that comes due while the Mac sleeps starts when it wakes, if it is late by less than the grace window, 12 hours by default. Otherwise it is marked Skipped.

If you would rather drive runs from cron or CI, the zoes command can start a session and wait for it. See Script coding agents from your shell.

Other ways people solve this

A daemon on your own machine is one answer. It isn't the only one, and it can't help when that machine is asleep or off. Other tools in this space take different routes:

  • A cloud workspace. Conductor's docs say "Local workspace sessions run on your Mac. If you close the app or shut down your Mac, those sessions end." For runs that continue, Conductor Cloud runs workspaces in a sandbox. That fits when you want agents working while your laptop is closed.
  • A background service you install. T3 Code's remote-access docs say "Closing the desktop app's last window stops its local server." To keep a host available without the window, T3 Code has t3 up and t3 service, which keep a background service running, and its desktop, web, and phone clients connect to that host. Zoes's pocketd is the same idea, on by default: it starts at login without a separate setup step. See Zoes vs T3 Code.
  • A headless server. Zeron documents a headless Linux engine that runs as a background service and survives reboots. Orca can run agents on a remote server or a per-worktree cloud VM in a cloud account you control.
  • A remote host. MonoCode's experimental remote sessions run on a host over SSH, and the host keeps them going when the desktop closes.

Running agents on another machine with Zoes's SSH hosts

Zoes's version of the last route is a host. In Settings › Hosts, add a Mac, Linux, or Windows machine you can reach with ssh. Zoes installs pocketd there as a per-user service, and the host's projects show in your sidebar with their agents running on the host. Close your laptop and the host's agents keep going.

Two things to know. On Linux, if lingering is off, pocketd stops when you log out of the host, and Zoes gives you the loginctl enable-linger command to fix it. On a Windows host, updating pocketd restarts it and closes that host's terminals. See Run agents on another machine over SSH.

FAQ

Do coding agents stop when I close the app?

In Zoes, agents keep running after you close the window because a small Go daemon, pocketd, owns the terminals and sessions, not the window itself. Scheduled automations keep firing too. When you return, sessions that need you, failed, or finished show up in the inbox, the Dock badge and macOS notifications.

What is pocketd?

pocketd is Zoes's background service, a Go program that owns the terminals, the sessions, the Board, the automations and the connection to the phone. It starts at login: as a login item on macOS, a systemd user service on Linux, and a scheduled task on Windows. The desktop app and the zoes command talk to it over a Unix socket.

Can I schedule Claude Code prompts to run while I'm away?

Yes. A Zoes automation is a prompt that pocketd starts on chosen weekdays at a time, or on a repeat from every 5 minutes to every 7 days. Runs keep firing while the desktop app is closed, as long as the machine is awake. A run that comes due while the Mac sleeps starts when it wakes, if it is less than 12 hours late by default.

How do I get notified when an agent finishes or needs input?

Zoes shows a macOS banner when a session needs you, fails or is done, and counts those sessions in the Inbox and on the Dock badge. A banner for a permission request has Allow and Deny and stop. By default, the session you are looking at gets no banner.