How to keep coding agents running when the window closes
Keeping agents running when the window closes means their work doesn’t depend on the window you watch it in. An agent run in a terminal stops when that terminal closes, unless you run it under a tool such as tmux. Moontors, an agentic development environment (ADE), runs every session in a background service instead, so closing the window doesn’t stop the agents.
Close the window
Section titled “Close the window”Start your sessions, then close the window. The sessions keep working in the background service, on every system. Whether Moontors’ notifications still arrive with the window closed depends on your system; see Notifications.
Open Moontors again and every session is there, with everything it did while you were away.
When the background service stops
Section titled “When the background service stops”The background service exits when no window is open, no session is running or waiting for you, and no terminal is running. The sessions themselves stay: the next prompt starts the agent again in the same conversation.
What still stops an agent
Section titled “What still stops an agent”- Sleep: Moontors doesn’t keep your computer awake. While it sleeps, the agents can’t work, and a turn under way can fail when its connection drops. If agents should work while you’re away, keep the computer awake with your system’s own power settings.
- Restarting or logging out: the background service stops with your session on the computer. A turn that was running shows as Stopped, and the next prompt carries the conversation on.
- An update: Restart to update waits until running work ends, so it never cuts a turn off. Terminals still running end with the restart, and Moontors says how many before it restarts. See Sessions and the board.
Know when to come back
Section titled “Know when to come back”Moontors sends a desktop notification when a session needs you, as Notifications describes. While a session waits, its agent waits too, so answer it to keep the work going.
Away from your computer, the phone shows the board and each session, and answers what a session asks, on the same Wi-Fi as your computer or through your VPN.
Questions
Section titled “Questions”Do the agents keep running when I quit Moontors?
Section titled “Do the agents keep running when I quit Moontors?”Yes. A background service runs the sessions, so quitting the app or closing its window doesn’t stop them.
Do they keep running while my computer sleeps?
Section titled “Do they keep running while my computer sleeps?”No. Moontors doesn’t keep your computer awake, so if agents should work while you’re away, keep it awake with your system’s own power settings.
Will I hear when a session needs me with the window closed?
Section titled “Will I hear when a session needs me with the window closed?”On macOS, yes; on Windows and Linux, not until you open Moontors again, as Notifications says. The sessions keep working either way.