Process Guard
- Desktop app
- All plans
What it does
An AI agent spawns a real system process for every tool it calls (a search, a build, a script). Most end in seconds; some never do, keep holding gigabytes of memory while using no processor, sometimes outlive the agent that started them, and pile up until the machine is unusable. Process Guard sweeps the child processes of agent terminals, measures their real memory footprint (compressed memory included on macOS, swapped pages on Linux, private commit on Windows), flags the ones that are stuck, one by one or as a crowd, names the agent responsible and lets you end them. By default it never terminates anything on its own.
Video (1 min 19 s): Process Guard, shown in the real app. An agent starts a command that holds 1.5 GB and never finishes; about a minute later the "Protecting your machine" panel opens on its own, names the agent and the command, and one click on End shows "node ended: 1.5 GB freed." while the agent stays open.
Where to find it
- The Processes chip in the status bar at the bottom of the window. It shows the count of stuck processes; click it to open the Protecting your machine panel.
- On a fresh detection the Protecting your machine panel opens on its own above the chip (once per episode), and the chip turns into a red shield with a count badge. When the chip is hidden from the status bar, a toast ("Stuck process", with an End the process action) is shown instead.
- Settings > Terminal > Stuck process guard.
- The memory of ONE agent: open its Session info panel (the token badge of the agent's composer). The Memory card shows what its CLI and all its child processes (MCP servers, tool calls) hold right now.
How to use it
- Leave it on. When something is flagged the panel opens by itself; later, click the red Processes chip to reopen it: each row shows the whole command that was run (a very long one wraps and scrolls inside its row), Started by which agent, the memory it holds, its age in minutes and its CPU share, plus Orphan: its agent is gone when the parent has exited.
- Click End on a row. A notification confirms it ("node ended: 1.5 GB freed.") and the memory comes back immediately; the panel then says "Nothing is stuck". The agent keeps running: its tool call receives an error instead of hanging forever, nothing is restarted, no context is lost.
- When one agent has several heavy commands in flight, the panel groups them ("This agent has N commands running at once") with End all N and Interrupt the agent. Interrupt sends Ctrl+C to that agent's terminal: its turn ends, it waits for you, the session stays open. It exists because an agent that reads a swap-induced slowdown as a freeze tends to start yet another copy of the same command.
- Open this agent jumps to the terminal that started the process.
Settings
processGuardEnabled(global, Settings > Terminal > Stuck process guard): watch the child processes of agents. Default on.processGuardMemoryMb(global, "Report above"): footprint a stuck process must hold to be reported. Default 2048 MB (slider 512 to 16384). A process that is still using the CPU must hold twice this amount before being reported, and is never ended automatically.processGuardIdleMinutes(global, "After at least"): age before a process is measured. Default 5 min (slider 1 to 60). A process already holding 5 % of the physical RAM is measured whatever its age.processGuardAutoKill(global, "End stuck processes automatically"): act without asking, with a notification after the fact. Default off. Never touches a process that is still busy, nor a member of a pile-up.
Agent tools (MCP)
None. The guard is a safety net for the user; agents are not told about it and cannot drive it.
Providers
All providers, no difference. The guard watches the children of whatever agent terminal you started; the CLI itself, the shell and the app's terminal helper are protected based on the binary used at launch, not on a list of names.
Mobile
Not on the mobile companion.
Limits
-
Dev terminals are never watched: an idle dev server matches every runaway criterion (large, old, no CPU). Their memory is counted to judge how full the machine is ("held by terminals you started yourself"), but they are never listed nor ended.
-
Pile-up rule: when the measured footprints of one scan exceed half the physical RAM, every agent process above 256 MB is reported ("Reasonable on its own. Flagged for what the others are holding at the same moment"), provided at least two agent processes hold a quarter of the RAM between them. Pile-up members are never ended automatically.
-
Cost: one process snapshot per minute (about 40 ms on a machine with 800 processes); the expensive footprint probe only runs on processes that already look suspicious, and nothing runs while no agent is open.
-
Works on macOS, Windows and Linux, each with its own memory measurement and its own orphan detection.
-
A command line is kept up to 16 KB, then ends with
…. On Windows, a command written over several lines stops at its first line. -
It treats the symptom, not the cause: a tool that goes wrong today will be another one tomorrow.
-
Memory card (Session info): measured only while the panel is open, refreshed every 30 seconds, with the same per-OS measurement as the guard. It reuses the guard's last process snapshot instead of starting a new one (on Windows: no extra PowerShell per agent). When the agent's processes cannot be measured (agent closed, probe failed), the card is not shown at all rather than showing 0. Not shown in the agent row tooltip: a hover on 50 agents would cost a probe each.
Common questions
-
Which agent uses the most memory? I want to know which one to pause. Open the agent's Session info panel: the Memory card shows what its CLI and its child processes hold (each CLI typically weighs 300 to 520 MB). To free it, right-click the agent > Pause this agent.
-
The command in the panel was cut off. Can I see all of it? Yes, since 2026-11-02: the row shows it in full, with no tooltip to open, so you can decide before clicking End.
-
Does AgentsRoom slow down my computer? On the measured session the app used 2.8 GB across 91 processes and eight agent CLIs 1.6 GB; the 41.8 GB were held by seven stuck search processes. The guard exists to name them.
-
Will it kill my build? It never ends one without asking. A running build has to hold twice your threshold (4 GB by default) just to be reported.
-
Twelve processes, none over my threshold. Will it say anything? Yes: judged together they can fill the machine (measured: twelve type checks from six agents, 15.4 GB on a 16 GB machine). That is the pile-up verdict.
-
Why not read Activity Monitor? On macOS the resident column understates a compressed process by an order of magnitude (20 MB resident for 8 GB held). The guard measures the real footprint.
-
How do I find and end a command my agent left running? Process Guard watches the commands your agents start. When one holds memory without making progress, the "Protecting your machine" panel opens from the Processes chip of the status bar, with the agent, the command and the memory it holds; click End. Video: https://youtu.be/M5cAZ4P5zoI
-
Is there a video that shows it? Yes, 1 min 19 s, filmed in the real app: https://youtu.be/M5cAZ4P5zoI
-
What happens to the agent when I end its process? It keeps running; its tool call gets an error instead of waiting forever.
-
The app crashed or restarted. Are my old agent CLIs still running in the background? No. On macOS and Linux each agent console ends with the app, even when the app was killed without closing normally, and the next launch also ends any console an older version left behind (on a Linux desktop too). Unless you turned session restore off, your agents come back on their previous conversations. Agents you run on a server with persistent sessions turned on are the exception, on purpose: they keep running there and the next launch reattaches them.
Related
- Dev Terminals: the terminals that are deliberately not watched.
- Agent Status Tracking: the status bar the chip lives in.
- Keep the Machine Awake: the neighbouring machine-level setting in Settings > Terminal.