# Chat and runs

The goal's one conversation across the web and your channels, the task agents it hands work to, and the sessions they work in.

Canonical page: https://app.auto-lab.ai/docs/goals/chat

**Chat** is the goal's single running conversation. You and the goal's other admins talk to its agent here, from
the web app or from any channel connected to the goal. Goal members can read Chat but not send messages. This page covers what you can do in Chat, what shows
up in it, how the agent hands work to task agents, and where sessions fit.

## One conversation per goal

Select **Chat** in the goal's rail. Messages from the web app, Slack, Microsoft Teams, iMessage and email all
land in the same conversation, so the agent has the whole story wherever you write from. Its answer goes back to
the place the message came from, and the web page shows everything. To connect a channel, see
[Channels](/docs/connect/channels).

A message from someone who is not on the goal, such as an email from outside your organization, is answered in
Chat only, with limited tools. Nothing goes back to that sender until someone on the goal gives the go.

## What you can do in Chat

| To | Do this |
|---|---|
| Ask or hand over work | Type in the composer and send. Say what you need in your own words. |
| Steer while it works | Send another message. The agent reads it at its next step instead of waiting for the current turn to end. |
| Answer a specific message | Hover the message and select the reply arrow, double-click it, or long-press it on a phone. The composer names the message you are answering; press Esc to cancel. |
| Attach files | Select the paperclip. Up to 10 files per message, 20 MB each: photos, PDFs, text and data files, Office documents. A message can be files alone. |
| Stop the agent | Send `/stop`. It ends the running turn. Task agents that are already running carry on; cancel them on the **Runs** page. |
| Shorten the history | Send `/compact`. The agent summarizes the older part of the conversation and keeps the recent part word for word. |

The agent looks at photos directly. To read a document, it hands the file to a task agent.

`/compact` changes what the agent carries into each turn, not what you see: every message stays on the page, and
the agent can still search the full history. It also compacts on its own when the conversation grows long.
Either way, Chat shows **History compacted**.

When the agent answers something other than your last message, such as a task reporting back or a reminder
firing, its reply quotes the message it belongs to. Select the quote to jump to the original.

## What shows up in Chat

Chat also shows what happens between messages.

| You see | What it means |
|---|---|
| **Needs your approval**, with **Approve** and **Deny** | The agent wants to take an action your rules gate. The card names the app and action, its risk (read, write or destructive) and the exact values. See [Approvals and autonomy](/docs/goals/approvals). |
| A question above the composer | The agent needs a decision or a fact. The card stays pinned until you answer, so it never scrolls away. Pick an option, type your own, or select **Skip** to let it continue without an answer. |
| **… task** cards, such as **Research task** | A task agent is working. Progress lines fill in, then its report. **Open run** opens it on the Runs page. |
| **Connect …** | The agent needs access to an app. **Connect** opens the connection page in a new tab. Once the app is connected, Chat carries on with what you asked. |
| **Learned: …** with **Undo** | The agent saved something it learned. **Undo** takes it back. See [Learning](/docs/brain/learning). |
| **Scheduled reminder**, **Scheduled check-up**, **Scheduled routine** | One of the goal's schedules fired. The messages below it are that run. See [Plans, schedules and triggers](/docs/goals/schedules). |
| **Reply arrived** | Something the agent was waiting for came in, such as an answer to an email it sent. |
| **Delivery to … failed** | A reply could not reach Slack, Teams, iMessage or email. The agent does not claim a message was delivered when it was not. |

Older messages load a page at a time: select **Load earlier messages** at the top.

## Task agents and runs

To keep the conversation focused, the agent hands pieces of work to **task agents**. Each hand-off is a **run**.
A run shows as a card in Chat that fills in as the task agent works.

| Task agent | What it does | Limit |
|---|---|---|
| Research | Answers one question. It reads the goal's connected apps (read only), its memory and, when it needs them, its files, and searches and reads the web. It changes nothing in your apps. | 60 steps, 25 minutes |
| Docs | Drafts or updates one document or message. It can read and write in connected apps; a write your rules gate comes back to Chat as an approval card. | 40 steps, 20 minutes |
| Mail reader | Turns one email into a short summary: what it says, what it asks, the dates. It has no tools, so it cannot act on what the email says. | 1 step, 1 minute |
| Browser | Uses one website in a browser of its own, signed in with a saved login when there is one. It never sees your password. A purchase stops at the final review and waits for you to confirm. | 60 steps, 20 minutes |
| Coder | Opens a session on its own branch of the goal's repository, makes the change and ends with a change request for you to review. The card links **Review change request #…**. | 60 minutes |

A few rules apply to every task agent:

- It cannot ask you anything. When it needs you, it stops with **Needs input** and the agent asks you in Chat.
- It cannot set schedules or start other task agents.
- A goal runs up to 10 task agents at a time, counting queued ones. At the limit, the agent waits for one to finish or cancels one.
- If the agent is waiting on your approval or answer when a run ends, the run's report waits until you decide.

### The Runs page

Open **Runs** from a task card's **Open run**, or from the **⋯** menu on the sidebar's recent list while Chat is
selected. Each row shows the role, the brief, the status, when it started, how long it took, the steps it used out
of its limit, tokens, cost, and where it ran:

| Environment | Meaning |
|---|---|
| **Shared** | It ran without a machine of its own. |
| **Own box** | It had its own machine, for files or a browser. |
| **Workbench** | It worked in a session. Coder runs work this way. |

Select **Cancel** to stop a queued or running run. Select a row to open its brief, its report and **What the agent
did**, step by step.

### Watch the browser live

While a Browser run is working or waiting for input, open it to see a **Live view**: the page as the agent sees
it. If the agent is stuck on a check it cannot clear, you can click the picture, **Type** a short text such as a
code, or **Press** one key.

## Sessions: the workbench

Chat is the conversation; sessions are the workbench. A **session** is an isolated cloud machine with its own
branch of the goal's repository. On a goal that runs in Chat you do not talk in sessions. The agent uses
them for hands-on work:

- a Coder task works in a session and ends with a change request
- a task agent that needs files or a browser gets a machine of its own
- a scheduled trigger from **Brain › Triggers** starts a session for each run

To see them all, open the **⋯** menu on the sidebar's recent list and select **All sessions**. Every row carries a
**Workbench** tag, and a session a task agent opened links back to its run. Filter by **Mine** or **All sources**,
group by status or source, or search by title. **Manage** lets you rename, share, restart, stop or delete
sessions. **New session** opens one directly, for example to work on files with an agent; that conversation stays
in the session and does not appear in Chat.

A session's machine stops when it has been idle for a while and keeps its files. Only work committed to the
session's branch lasts after the session is deleted. Each session has its own access setting, **Session
access**: **Only you**, **Specific people**, or everyone on the goal. The person who started the session changes
it. For sessions a trigger starts, set it on the trigger.

## Bring an earlier session into Chat

A goal that worked in sessions before it moved to Chat opens with an empty conversation. Select **Import the last
session as history** to copy the text of the most recent finished session into Chat. The agent can then refer to
it and search it. Nothing runs, tool details are left out, and each session imports only once. If the agent is
busy, try again when it finishes.

## Older goals without Chat

A goal that has not moved to Chat opens **Chat** as a new session. Each conversation there is its own session,
listed in the sidebar, and the agent works in that session's machine. These goals have no Runs page and no
**Brain › Schedules**; recurring work runs from **Brain › Triggers**.
