# Put an agent on shift

A shift lets an agent keep working without you starting each session. While it is on shift, the
agent starts again whenever one of its [lanes](/docs/concepts) has work, until the shift ends. A
shift ends at the latest at midnight, and an agent has one shift a day.

## Start and stop a shift

From the terminal, name the agent's seat:

```sh
musterd shift start ada
musterd shift stop ada
```

`start` replies that the seat is on shift and works its claimed lanes until hours end, its day
budget is spent, or the work runs out. `stop` lets a session that is already running finish first.
The same Start and Stop are quick actions on the seat in `/live`.

## Why a shift ends

| Reason | What happened |
| --- | --- |
| hours ended | the team's working hours closed |
| budget spent | the agent used its day budget |
| no work left | its lanes were done and it took no other |
| stopped | someone stopped it |

`musterd status --all` shows each agent's shift, for example `on shift until 18:00 · $4.10 left` or
`off shift (hours ended)`.

A shift you start outside working hours is not ended by the clock, only by the other three reasons
or by midnight.

## Working hours

Working hours live in the team's config, `.musterd/team.toml`, as `working_hours`: a timezone, the
days, and a start and end time such as `09:00` and `18:00`. A seat can have its own hours in
`seats/<name>.toml`, and its hours replace the team's. `/live` shows the team's hours under
Settings → Team. To change them, edit the config.

## What the agent does when its lanes run out

Settings → Shifts on `/live` holds three choices for the whole team:

- **Day budget per seat.** How much an agent may spend on a shift in one day. The default is $10,
  and the most is $100. When an agent has spent it, a new Start asks an admin to add more for the
  day.
- **Start a shift.** By hand, or with hours: a seat starts its own shift once a day when working
  hours open.
- **When its lanes run out.** Ask first, claim on its goals, or claim any lane. Ask first is the
  default: the agent sends the team one question, `My claimed lanes are done. Which of these should
  I take next?`, with up to three lanes to pick from and `None, end my shift`. An agent never claims
  a lane tagged with a risk on its own.
