<!-- https://zerolog.ch/docs/goal · Docs / Agents -->
# /goal

Type it and what “done” means, in plain language.

`/goal every test in ~/budget passes`

the checkable end state

*Give it a condition the checker can see in the chat (“pytest reports 0 failed”, “the build prints no errors”). “Make it better” never becomes true.*

## The loop

The checker is a separate, small model. It cannot run anything; it judges only what the chat shows, such as a tool result or an exit code. A plan or a claim of success without a result behind it does not count. Each check is billed like any other model call and shows up in your usage as a goal check; in a free chat the free router does the checking.

The checker sees up to 400 messages since the goal was set, limited to the last 16,000 characters.

It reports impossible only when the model cannot remove the obstacle itself, such as an access right you need to grant. Slow progress does not count.

## What does not interrupt it

the run

- You close the tab

  It runs on the server. The next round still starts without you.
- You reload the page

  The lines are where you left them.

## What you see

Every round shows up as a line in the chat.

- Stop hook · not met yet
- Hook called model again
- Goal met

## Ceilings

### Rounds default 25

Stalls after four checks in a row naming the same missing piece. Otherwise capped at 25 continuations; the operator can change that number.

Need the older, unattended kind instead? `/jobgoal` (`/jg`, `/job`) starts a background job with its own log under [Jobs](https://zerolog.ch/docs/jobs).

### Time per run, by plan

A run lasts at most 4 hours on Mini, 8 on Pro and 12 on Max. Ultra has no limit. The Free plan has no autonomous runs. The clock starts when you set the goal; a new goal starts a new run. At the limit the goal ends with a notice in the chat. History and files stay.

### Credit

With no credit left the goal ends with a notice; top up and set it again. If the checker itself cannot answer, the goal stays set and a message from you continues it.

### Condition

Up to 4000 characters. Chats without an account cannot set a goal.

Plans and prices: [Plans](https://zerolog.ch/docs/plans), [Pricing](https://zerolog.ch/pricing). What else limits spending: [Limits](https://zerolog.ch/docs/limits).

Overview of unattended runs and what limits them: [/goal and /ultracode](https://zerolog.ch/unattended-agents).

### Time, credit and approvals

Standard limits are 4 hours per run on Mini, 8 on Pro and 12 on Max; Ultra has no plan time limit, and the Free plan has no autonomous runs. This is per run, not a monthly hours allowance. See [current plans](https://zerolog.ch/pricing). Paid catalogue requests stop when credit is exhausted. A missing approval, provider error or stopped runtime can prevent progress; an unlimited plan is no guarantee of completion.

When you close the browser, the chat run and stored goal stay on the server. Files, conversation history and a separate terminal process have different lifetimes. See [unattended runs](https://zerolog.ch/unattended-agents), [workspace persistence](https://zerolog.ch/ai-coding-agent-workspace) and [terminal sessions](https://zerolog.ch/docs/terminal).

## How a /goal loop runs and ends

Mermaid source of the diagram on this page:

```mermaid
%% /goal: the stop-hook loop in a chat. Facts from server/zielhaken.js (zielUrteil, zielHaken, pruefeZiel), server/routes/chats.js (watchdog, onDone), web/apps/web/lib/slash.ts.
flowchart TB
  set["You type /goal and a condition"]
  turn["The model works on a turn<br/>(same run, same tools)"]
  check["Evaluator model reads<br/>the chat since<br/>the goal was set"]:::hot

  subgraph END["The goal ends"]
    direction LR
    met["Met"]
    imp["Impossible"]
    stall["Stalled<br/>same piece<br/>4 checks"]
    cap["Capped<br/>25 rounds"]
    lim["Time limit<br/>or no credit"]
  end

  set --> turn
  turn --> check
  check -->|not met: try again| turn
  check --> met
  check --> imp
  check --> stall
  check --> cap

  linkStyle 2 stroke:#8f7ac9
```
