DocumentationIdle agents and memory

Work with agents

Idle agents and memory

Idle agents sleep to free memory and wake when you open their tab.

2 min read Dragent guide

Each CLI agent runs as its own process, and many use close to a gigabyte of memory even when they are not working. With a dozen agent tabs open, that can use up the memory of a laptop. Dragent puts idle agents to sleep so your computer stays responsive.

What sleeping means

An agent sleeps once it has finished its turn and nobody has used it for a while. Its process is stopped, but its tab, its terminal history and its conversation stay. The tab is labelled Sleeping.

Open the tab to wake the agent. You see Waking … while it restarts, and it continues the same conversation. Opening the tab from the mobile app wakes it too: the phone shows “Waking the agent on your desktop…” and connects once the agent is ready.

Agents that stay awake

Dragent never puts an agent to sleep while it:

  • is working, or is waiting for your answer or approval;
  • is on screen in any pane;
  • is in use from the mobile app;
  • is still running something it started that accepts connections, such as a development server;
  • is a worker in an active Agent Coordination team;
  • can’t resume its conversation exactly. Only agents whose conversation Dragent can resume are put to sleep.

The built-in Dragent agent never sleeps. It does not run as a separate process.

Choose when agents sleep

Go to Settings → Agent → Behavior and, under Memory, set Put idle agents to sleep after to 15 minutes (the default), 30 minutes, 1 hour, or Never.

Memory on your computerWhat Dragent does
NormalIdle agents sleep after the time you chose.
Running lowIdle agents sleep after 2 minutes, and a notice tells you how many were put to sleep and how much memory that freed.
Critically lowBefore you start another agent, Dragent asks: put idle agents to sleep first, start anyway, or cancel.

If your computer still runs out of memory

Agents that stay awake still use memory. If your computer slows down or restarts unexpectedly, close agent tabs you no longer need, or finish their work so they can sleep. On macOS, Activity Monitor’s Memory tab shows which processes use the most memory.