<!-- https://zerolog.ch/docs/stop · Docs / Agents -->
# Stop button

> Stop ends the run, not only the view. One press reaches the tool that is running, the other server slot, the goal and the Ultracode jobs of the chat. The button shows Stopping and…

**Stop ends the run, not only the view.** One press reaches the tool that is running, the other server slot, the goal and the Ultracode jobs of the chat.

- The button shows **Stopping** and stays locked until the server confirms the end. If the request fails, it is sent once more; a second failure shows an error.
- Every tool the assistant can call watches the Stop signal, also tools that wait for a workflow. After a stop, no late result lands in the chat.
- During a release a run can sit on the other server slot. The stop reaches it within a few seconds. A stop that arrives while a message is still being prepared is remembered, and the run starts already stopped.
- Stop **pauses** a [/goal](https://zerolog.ch/docs/goal) instead of ending it. Writing the next message does not restart it. The goal bar says paused and shows a **Resume** button.
- The [Ultracode](https://zerolog.ch/docs/ultracode) jobs of the chat are paused too. Their card shows **Resume**, which continues where the job stopped. A job that fails for a reason a retry cannot change, such as a missing checking model, is not repeated.

We tested this with a replica of the tools, the server slots and the database. We have not yet watched it on a real long build inside a container.

## What one press on Stop reaches

Mermaid source of the diagram on this page:

```mermaid
%% Stop button: what one press reaches. Facts from server/routes/chats.js (/abort), goal pause, job cancel, web stream.ts.
flowchart TB
  press["1. You press Stop"]
  lock["2. Button shows Stopping<br/>and stays locked"]
  subgraph REACH["3. One press reaches"]
    direction TB
    tool["Running tool ends<br/>no late result lands"]:::hot
    slot["Other server slot<br/>gets the stop in seconds"]
    goal["/goal is paused<br/>Resume button"]
    wf["Ultracode jobs of the chat<br/>pause, Resume on the card"]
    tool ~~~ slot ~~~ goal ~~~ wf
  end
  conf["4. Server confirms the end<br/>button unlocks"]

  press --> lock --> REACH --> conf

  classDef hot stroke:#8f7ac9
```
