<!-- source: https://docs.dreamlake.ai/agents/background-turns @ 0.1.192 b2f973b1 -->
# Background agent turns

When the server supports it, the agent composer shows an execution mode:

| Mode | What happens when you close the tab | Tools |
| --- | --- | --- |
| **Keep running** (default) | The turn continues on DreamLake for up to 10 minutes | Server tools only; the agent cannot act on the open page |
| **This tab** | The turn stops | Server tools and page tools (layouts, library view, browser workspace files) |

Switch to **This tab** for anything that needs the open page. The mode is never
changed for you, and page tools are never removed silently. If the server does
not support background turns, the control is absent and turns run in the tab.

## Following a turn

Closing the panel or the browser, reloading, navigating or going offline only
stops *watching*. Reopen the conversation (from history or its `?s=` link) to
see the running turn's progress, then the saved answer and tool results. While it
runs, progress is a periodically saved snapshot, not a recording of every step.
Messages you send while it runs are delivered at the next model step.

## Stopping

**Stop** asks the server to cancel that exact turn, from any tab or browser.
The composer shows *Stopping…*, *Stop requested…*, *Already finished* or *Stop
not confirmed* (try again). Tool calls that had already finished keep their
effects; Stop does not undo them.

## How a turn can end

| Shown | Meaning |
| --- | --- |
| The answer | Completed |
| Stopped | You stopped it |
| Stopped at the time limit | It reached the 10-minute limit |
| Stopped because your access ended | Your account or access was revoked during the turn |
| The server running this turn stopped | The server restarted or failed; the turn does **not** resume. Results recorded before that are shown |

## If sending fails

If the connection drops before the server confirms your message, the composer
checks whether it arrived instead of sending it again. A message that is never
confirmed stays marked as unconfirmed; check the conversation history before
sending it again.

## Restart-safe turns

Where DreamLake runs background workers, **Keep running** turns are
restart-safe: if the server running one fails, another server takes it over
(the composer shows *recovering on another server*). In exchange they use a
fixed, smaller set of tools, listed in the **Keep running** tooltip before you
send:

- read Projects, Memos and your agent memory;
- update an agent memory entry;
- rename or archive a session.

Not available in restart-safe turns: editing Memo text, creating, moving or
deleting resources, page and runner tools, and sending through connected apps
(which always needs your confirmation). Use **This tab** for those.

A turn is taken over at most twice. If it had already started a change when
its server failed, it is not repeated and ends as *interrupted*; check the
results. Each turn has a budget (40 model rounds, 80 tool calls, 400,000
tokens) and the 10-minute limit; neither resets when it is taken over.

## Wake on save

On a Memo page, **Wake on save** lets you ask DreamLake to continue the
conversation once, the next time that Memo is saved, without any tab open.
Before creating the wait you choose how long it lasts (15 minutes to 24 hours,
1 hour by default) and see what it may use: this conversation's namespace,
the agent's current Project grants, the restart-safe tools, and a budget of
10 model rounds, 20 tool calls and 100,000 tokens. One wait per conversation.
Expiry ends the wait's permission: a continuation must also finish by then, and
none starts in the last minute. Cancel it at any time; if it has already
started a turn, Cancel offers to stop exactly that turn. **Stop** stops only
the turn you stop; it does not cancel waits. Saves after the first are recorded
but do not start more work.

## Limits

Output shown while a turn runs is a periodically saved snapshot and an ordered
record of what the agent wrote and which tools it used; reasoning and images
are not kept. That record is kept for 7 days after the turn ends.
