---
title: Herdr power use
description: Run the factory as a live terminal workspace. Clients as Herdr workspaces, plays as tabs, every stage a Claude Code pane you can watch or steer, a maestro to talk to, and keys for ideas, questions, gates and the board.
---

**Verification:** illustrative. `gw herdr doctor` was run against a twin factory; opening tabs and panes was not, to keep the test off a live Herdr session (details at the bottom).

In Herdr, the factory stops being a list of commands and becomes a place. Every client is a workspace, every play a tab, and every stage a live Claude Code pane. Plays that need you turn up in Herdr's Agents sidebar as **blocked**, with the reason.

## Set it up once

```bash
herdr                                 # start Herdr
cd ~/factory && gw herdr setup        # links the plugin, installs the Factory view, sets runner: herdr
gw doctor --fix                       # trusts the factory folder in Claude Code, so stage panes don't stop at the trust prompt
gw herdr doctor                       # what Greenware sees: binary, session, socket, plugin, each play's tab and viewer
```

`gw herdr setup` switches `factory.yaml` to `runner: herdr`. If your Herdr config has no Greenware keys, it prints the snippet to add. The installer adds the keys when Herdr was installed first. The snippet is also in [`examples/herdr/keys.toml`](https://github.com/orchidautomation/greenware/blob/main/examples/herdr/keys.toml).

## The layout

| Greenware | Herdr |
|---|---|
| Client | A workspace named `gw:<client>`. Its first tab is a client overview with a live board |
| Play | A tab named after the play id |
| Maestro | The tab's left pane: a Claude Code session you talk to about this play |
| Viewer | Top right: renders the play, reports its state to Herdr, and **drives the engine** (`gw watch <play> --drive`) |
| Stage | A live Claude Code pane under the viewer, open only while its stage runs |

The viewer is the play's driver. Close it and the play stops advancing. `gw herdr open <client>/<play>` brings the tab back, and the plugin's **Greenware: reopen every active play** action reopens all of them. When Herdr starts, the plugin's startup hook restores every active play's tab by itself.

## Keys

| Key | Action | Opens |
|---|---|---|
| `prefix+i` | Greenware: new idea | A popup to type the raw ask and pick the client |
| `prefix+a` | Greenware: answer questions | The inbox popup: every open question across plays, default one key away |
| `prefix+y` | Greenware: review gates | The gates popup: what's waiting at A and B, with the plan or verification summary |
| `prefix+m` | Greenware: board | The board in a tab, refreshing every 2 seconds |

Gates sit on `y` because `prefix+g` is Herdr's goto. Onboarding a client from its domain is a plugin action too (**Greenware: onboard a client from its domain**). It has no key by default.

## Working with the maestro

The maestro is the fastest way through a play. Ask it "where is this?", "what are you asking me?", "summarize Gate A". It:

- shows you how the agent read your idea first, and records your correction if you have one (`gw answer <play> reading "…"`);
- asks the questions one at a time with the default as its recommendation, and records only what you say;
- summarizes each gate: what gets built, the cost, the risks, any rulings the planner needs;
- explains failures from `gw logs` and the play folder.

What it can and can't do on its own is fixed in code. It runs `gw show`, `gw questions`, `gw status`, `gw logs` and `gw answer` without asking. `gw approve`, `reject`, `reopen`, `accept`, `retry` and `stop` always stop at Claude Code's permission prompt for you. The maestro never decides a gate.

Turn it off per factory with `herdr.maestro: false` in `factory.yaml` if you'd rather drive with popups and keys.

## Steering a stage

A stage pane is a real Claude Code session with the stage's prompt and permissions. Watch it work, or type into it to steer: "use the existing `t_suppress` function instead of a new suppression node", "the contacts action is `find-people-v2`, check its schema". The engine still validates whatever the stage writes. Steering can't get an invalid artifact past the validator, or a Clay call past `clayx`'s permissions.

Each stage reads a snapshot of its context from `.greenware/context/` inside the play folder, so it never asks for extra folder access. The snapshot never includes holdouts or Clay logins.

## A power-user morning

1. Herdr starts, and every active play's tab comes back.
2. The Agents sidebar shows three plays **blocked**: two with questions, one at Gate A.
3. `prefix+a`: answer the questions in the inbox, accepting defaults where they're right. Those plays start running at once.
4. `prefix+y`: open Gate A. Read the cost and the contract, and approve with a ruling the planner asked for.
5. `prefix+i`: drop in the ask from your 9:30 call. A new tab opens, and its Decompose pane starts.
6. While Build runs on one play, switch to its stage pane and tell it which existing function to reuse.

Through Herdr's phone and Telegram plugins, blocked plays reach your phone as well.

## Factory settings for Herdr

```yaml
runner: herdr
herdr:
  session: ""              # a named Herdr session; empty means the default (or HERDR_SESSION)
  stageTimeoutMs: 2700000  # 45 minutes before the runner gives up on a stage pane
  maestro: true
```

Herdr by day, headless by night: `GW_RUNNER=headless` overrides `runner:` for one command, so cron can drive the same factory (see [Headless in cron and CI](/cookbook/headless-cron-and-ci)). Don't drive the same play from both at once. A play has one viewer, and the cron script skips while its own last run holds the lock, but it can't see a Herdr viewer.

## Failure modes

| What you see | What it means | What to do |
|---|---|---|
| A stage pane sits at Claude Code's trust prompt | The factory folder isn't trusted | `gw doctor --fix`, or trust the folder once in the pane |
| `gw idea` says Herdr isn't running | runner is herdr and no Herdr server | Start `herdr`; the play waits in its own tab |
| A play stopped moving after you closed panes | You closed its viewer, the driver | `gw herdr open <play>` |
| `plugin: not linked (run gw herdr setup)` in `gw herdr doctor` | The plugin isn't linked to this factory | `gw herdr setup` from the factory folder |
| Keys do nothing | No keys in your Herdr config | Add `examples/herdr/keys.toml` |

## Verification

**Illustrative.** `gw herdr doctor` was run read-only against a twin factory: it reported the binary, the session, a running server, the socket, `plugin: linked`, and each play with `tab=- viewer=gone` (no tabs opened). `gw herdr setup`, `gw herdr open` and the popups were not run: they would create workspaces and tabs, and change the plugin's factory, in a live Herdr session. The layout, keys, maestro permissions and settings come from `src/herdr/` (`commands.ts`, `layout.ts`, `maestro.ts`), `herdr-plugin/herdr-plugin.toml` and the factory schema.

**Not run:** any Herdr tab, pane or popup, steering a live stage pane, the phone and Telegram plugins.
