@mu-crew/mu 3.1.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +203 -588
- package/README.md +80 -308
- package/dist/cli.js +6106 -4716
- package/dist/cli.js.map +1 -1
- package/dist/extension/mu-pi.js +786 -0
- package/dist/extension/mu-pi.js.map +1 -0
- package/dist/index.d.ts +738 -536
- package/dist/index.js +6617 -5785
- package/dist/index.js.map +1 -1
- package/docs/ARCHITECTURE.md +178 -1008
- package/docs/ROADMAP.md +88 -169
- package/docs/VISION.md +206 -407
- package/docs/VOCABULARY.md +202 -455
- package/docs/architecture/control-socket.md +119 -0
- package/docs/architecture/dag.md +113 -0
- package/docs/architecture/mux.md +163 -0
- package/docs/architecture/ops-log.md +140 -0
- package/docs/architecture/sdk.md +185 -0
- package/docs/architecture/sync.md +129 -0
- package/docs/architecture/tui.md +146 -0
- package/docs/guide/README.md +25 -0
- package/docs/guide/backends.md +61 -0
- package/docs/guide/cleanup.md +74 -0
- package/docs/guide/delegate.md +87 -0
- package/docs/guide/dispatch.md +137 -0
- package/docs/guide/getting-started.md +177 -0
- package/docs/guide/recovery.md +133 -0
- package/docs/guide/remote.md +74 -0
- package/docs/guide/sql.md +76 -0
- package/docs/guide/stop-a-worker.md +64 -0
- package/docs/guide/sync.md +78 -0
- package/docs/guide/tui.md +98 -0
- package/docs/guide/upgrade.md +76 -0
- package/docs/history/CHANGELOG-pre-3.md +4866 -0
- package/docs/reference/env.md +87 -0
- package/docs/reference/naming.md +82 -0
- package/docs/specs/2026-09-28-agent-state-from-murmur.md +1 -1
- package/docs/specs/2026-09-29-task-substates.md +1 -1
- package/package.json +4 -4
- package/skills/mu/REMOTE_WORKERS.md +186 -491
- package/skills/mu/SKILL.md +142 -217
- package/docs/HANDOVER.md +0 -486
- package/docs/USAGE_GUIDE.md +0 -2637
package/skills/mu/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mu
|
|
3
|
-
description: Manage AI agents in terminal-multiplexer panes (tmux or herdr) — from a single off-the-cuff helper to a persistent crew coordinated through a built-in task graph. Use when the user asks to "create/spin up a subagent to X", "run X in the background", "do this in parallel", "use one subagent per X to do Y", "kick off a helper to watch/investigate/draft X", or to spawn, send work to, observe, or coordinate one or many agents — especially work you'll keep talking to, long-lived
|
|
3
|
+
description: Manage AI agents in terminal-multiplexer panes (tmux or herdr) — from a single off-the-cuff helper to a persistent crew coordinated through a built-in task graph. Use when the user asks to "create/spin up a subagent to X", "run X in the background", "do this in parallel", "use one subagent per X to do Y", "kick off a helper to watch/investigate/draft X", or to spawn, send work to, observe, or coordinate one or many agents — especially work you'll keep talking to, long-lived or background agents, or anything needing a dependency graph. For zero-ceremony helpers use the reserved `scratch` workstream; for one-shot "fire and get a result back" use the `mu_delegate` tool — its pane stays attachable.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# mu — Multi-agent orchestration
|
|
@@ -14,121 +14,102 @@ not in `--help` do not exist.
|
|
|
14
14
|
|
|
15
15
|
## Output + JSON shapes
|
|
16
16
|
|
|
17
|
-
Default output
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- `mu sql --json`: bare array rows.
|
|
23
|
-
- `mu log --tail`: NDJSON (one object per line).
|
|
24
|
-
- Errors: `{error,message,nextSteps,exitCode}` on stderr.
|
|
25
|
-
- Validation errors also include structured `usage`.
|
|
26
|
-
- **`nextSteps` survives in JSON.**
|
|
17
|
+
Default output is a card on stdout plus a `Next:` block. Read both.
|
|
18
|
+
Every verb takes `--json`: one stdout object; collections are
|
|
19
|
+
`{items, count}`; `mu sql --json` is bare rows; `mu log --tail` is
|
|
20
|
+
NDJSON. Errors are `{error,message,nextSteps,exitCode}` on stderr
|
|
21
|
+
(validation errors add `usage`). **`nextSteps` survives in JSON.**
|
|
27
22
|
|
|
28
23
|
## Vocabulary
|
|
29
24
|
|
|
30
|
-
- **workstream** —
|
|
31
|
-
|
|
25
|
+
- **workstream** — one **mux session** `mu-<name>` (tmux session or
|
|
26
|
+
herdr workspace) and one DB partition.
|
|
32
27
|
- **agent** — named worker in a pane (you may be one).
|
|
33
|
-
- **mux** —
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
- **mux** — tmux or herdr, one per invocation. `mu doctor` names it;
|
|
29
|
+
`MU_MUX` forces it. `mu agent kick` is Linux-only on herdr.
|
|
30
|
+
- **control socket (ctl)** — how mu drives a pi agent: the mu pi
|
|
31
|
+
extension (`mu link pi`) serves exact send, state, wait and abort
|
|
32
|
+
inside pi's own TUI. `ctl missing|refused` means it does not answer.
|
|
37
33
|
- **task** — DAG node with mandatory `impact` (1–100) and
|
|
38
34
|
`effort_days`. Shown as status/substate: `OPEN/todo|parked`,
|
|
39
35
|
`IN_PROGRESS/active`, `CLOSED/done|rejected|wontfix|duplicate|superseded`.
|
|
40
36
|
Any `CLOSED/*` satisfies `--blocked-by`.
|
|
41
37
|
- **claim / release** — atomic take/clear of `tasks.owner`.
|
|
42
38
|
- **note** — append-only task context; survives sessions.
|
|
43
|
-
- **track** — independent DAG subtree;
|
|
44
|
-
ready
|
|
39
|
+
- **track** — independent DAG subtree; spawn at most one agent per
|
|
40
|
+
ready track.
|
|
45
41
|
- **workspace** — per-agent VCS copy under
|
|
46
42
|
`<state-dir>/workspaces/<workstream>/<agent>/`.
|
|
47
43
|
|
|
48
44
|
## When to use mu
|
|
49
45
|
|
|
50
46
|
Use mu for persistent helpers, parallel work, dependencies, gated review, or
|
|
51
|
-
work that must survive context compaction.
|
|
52
|
-
|
|
47
|
+
work that must survive context compaction. Stay in one context for tiny edits
|
|
48
|
+
or inspection.
|
|
53
49
|
|
|
54
50
|
### Off-the-cuff helpers (`scratch`)
|
|
55
51
|
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
For one-shot work inside pi, call `mu_delegate` (installed by `mu link pi`).
|
|
53
|
+
Outside pi: spawn into the reserved `scratch` workstream (no task DAG,
|
|
54
|
+
auto-created), `send --fresh`, then `mu agent wait --json` (`lastText`).
|
|
58
55
|
|
|
59
|
-
-
|
|
60
|
-
exit 0
|
|
56
|
+
- `mu agent wait <names...> --first` waits for busy → idle instead of a
|
|
57
|
+
`sleep` loop; exit 0 met, 5 timeout, 6 pane died.
|
|
61
58
|
- For a watcher, persist last-seen state in a log ledger: write `mu log -w
|
|
62
59
|
scratch --kind pr-state 'pr=1234 sha=abc ci=red'`, then read `mu log -w
|
|
63
|
-
scratch --kind pr-state -n 1 --json`. Act only on change
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
edit, build, or test the shared repo.
|
|
60
|
+
scratch --kind pr-state -n 1 --json`. Act only on change.
|
|
61
|
+
- One agent per independent unit; `--workspace` for any helper that may edit,
|
|
62
|
+
build, or test the shared repo.
|
|
67
63
|
|
|
68
|
-
A helper stuck at `needs_input`
|
|
69
|
-
trust prompt
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
Move off `scratch` when work gains dependencies or review gates.
|
|
64
|
+
A helper stuck at `needs_input` right after spawn likely hit pi's
|
|
65
|
+
project trust prompt: add `--approve` to `MU_<CLI>_COMMAND`. Move off
|
|
66
|
+
`scratch` when work gains dependencies or review gates.
|
|
73
67
|
|
|
74
68
|
## Mental model
|
|
75
69
|
|
|
76
70
|
### Workstreams, DAGs, tracks
|
|
77
71
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
The DAG has one edge: `mu task block A --by B` means **B blocks A**.
|
|
73
|
+
Tracks sharing a prerequisite collapse into one, so two agents never
|
|
74
|
+
take the same dependency.
|
|
81
75
|
|
|
82
76
|
### Workspaces prevent trampling
|
|
83
77
|
|
|
84
|
-
If an agent may edit
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
Workspaces auto-detect jj/sl/git; non-VCS uses `cp -a`. They are
|
|
89
|
-
auto-freed on `mu agent close` **iff clean**: no uncommitted changes
|
|
90
|
-
and no commits since fork. Non-clean close fails with
|
|
91
|
-
`WorkspacePreservedError`; then use `mu workspace free <agent>` or
|
|
92
|
-
`mu agent close <agent> --discard-workspace` (lossy).
|
|
78
|
+
If an agent may edit, build, or test while another is active in the same
|
|
79
|
+
repo, spawn with `--workspace`. Two builds in one checkout corrupt each
|
|
80
|
+
other; keep the main checkout for orchestration.
|
|
93
81
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
82
|
+
Workspaces auto-detect jj, sl, or git (else `cp -a`). `mu agent close`
|
|
83
|
+
frees one **only if clean** (no uncommitted changes, no commits since
|
|
84
|
+
fork); otherwise it fails with `WorkspacePreservedError`. Then use
|
|
85
|
+
`mu workspace free <agent>` or `--discard-workspace` (lossy).
|
|
86
|
+
Between waves, `mu workspace refresh <agent>` rebases onto main and
|
|
87
|
+
keeps LLM context. Claim and send warn at ≥10 commits behind
|
|
88
|
+
(`--strict-staleness` refuses).
|
|
97
89
|
|
|
98
90
|
### Remote agents
|
|
99
91
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
DB; panes may be remote** — never run a second mu on the host, since
|
|
105
|
-
`tasks.owner_id` is an FK into the machine-local `agents` table and a
|
|
106
|
-
remote mu could not claim your tasks anyway. You create the remote
|
|
107
|
-
workspace yourself (`--workspace` is local-only).
|
|
92
|
+
The PANE is local, the PROCESS is remote (`--command 'ssh <host> -t
|
|
93
|
+
"..."'`); `mu agent remote-env` forwards a pi agent's control socket.
|
|
94
|
+
**One orchestrator DB**: never run a second mu on the host. You create
|
|
95
|
+
the remote workspace yourself (`--workspace` is local-only).
|
|
108
96
|
|
|
109
97
|
**Read [REMOTE_WORKERS.md](REMOTE_WORKERS.md) before spawning your first
|
|
110
|
-
remote agent, and again before waiting on one
|
|
111
|
-
the claim's one-shot `Next:` command
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
batch all workers in one `--max-secs`-bounded mule job.
|
|
117
|
-
- **`mule` exit 3 is a HANDBACK** — no ssh master, and opening one can
|
|
118
|
-
need a human to touch a hardware key. Ask the operator; never retry,
|
|
119
|
-
never run `ssh -MNf` yourself, never fall back to `ssh <host> <cmd>`.
|
|
120
|
-
- **Exit 4 and 6 mean wait again; 5 means never.** Neither says the work
|
|
121
|
-
failed.
|
|
98
|
+
remote agent, and again before waiting on one.** Poll once per turn with
|
|
99
|
+
the claim's one-shot `Next:` command. On a session-capped host, route
|
|
100
|
+
long commands and polls through [mule](https://github.com/mu-crew/mule):
|
|
101
|
+
a refused bare ssh returns an empty sha that looks like progress.
|
|
102
|
+
**`mule` exit 3 is a HANDBACK** to the operator (hardware-key touch):
|
|
103
|
+
never retry or open `ssh -MNf` yourself.
|
|
122
104
|
|
|
123
105
|
### Agent names
|
|
124
106
|
|
|
125
|
-
Use roles: `worker-1`, `
|
|
126
|
-
`auditor-1`, `planner-1`.
|
|
107
|
+
Use roles with the smallest unused suffix: `worker-1`, `reviewer-1`,
|
|
108
|
+
`scout-1`, `auditor-1`, `planner-1`. No human names.
|
|
127
109
|
|
|
128
110
|
### Task note contract
|
|
129
111
|
|
|
130
|
-
End every delegated task with a note
|
|
131
|
-
fields:
|
|
112
|
+
End every delegated task with a note holding the applicable fields:
|
|
132
113
|
|
|
133
114
|
```text
|
|
134
115
|
FILES: paths inspected/changed (line ranges if precise)
|
|
@@ -141,12 +122,7 @@ ODDITIES: weird things not acted on
|
|
|
141
122
|
```
|
|
142
123
|
|
|
143
124
|
Then close with grounding:
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
mu task close <id> -w <ws> --evidence "tests pass: cargo test exit 0"
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
Future agents can reconstruct context via `mu task notes <id>`.
|
|
125
|
+
`mu task close <id> -w <ws> --evidence "tests pass: cargo test exit 0"`.
|
|
150
126
|
|
|
151
127
|
## Orchestrator loop
|
|
152
128
|
|
|
@@ -157,12 +133,14 @@ Every turn:
|
|
|
157
133
|
2. Spawn at most one agent per independent ready track.
|
|
158
134
|
3. **Claim before sending — even one-shot reviewers/scouts.**
|
|
159
135
|
`mu task claim <id> -w <ws> --for <agent> --evidence "..."`.
|
|
160
|
-
If no task exists, `mu task add` first
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
path, validation command, scope
|
|
136
|
+
If no task exists, `mu task add` first (`--note 'REPRO: ...'` when
|
|
137
|
+
the title is not enough). Ownership is durable and waitable; agent
|
|
138
|
+
state is not.
|
|
139
|
+
4. Send each new task with `mu agent send <w> --fresh '...'` (new
|
|
140
|
+
session + prompt in one step; refuses while busy): task id,
|
|
141
|
+
files/notes to read, workspace path, validation command, scope
|
|
142
|
+
guards, task note contract. Follow the `Next:` block; it picks
|
|
143
|
+
`--fresh` vs `--steer` for you.
|
|
166
144
|
5. End with a loud final-action block:
|
|
167
145
|
|
|
168
146
|
```text
|
|
@@ -179,58 +157,45 @@ Every turn:
|
|
|
179
157
|
|
|
180
158
|
## Dispatch rules that prevent real failures
|
|
181
159
|
|
|
182
|
-
- **Pipeline; don't barrier.** Wait for one task, cherry-pick only its
|
|
183
|
-
commits
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
- **
|
|
200
|
-
|
|
201
|
-
a half-edited clone.
|
|
202
|
-
- **Freeze only what conflicts.** While one task owns shared files, give idle
|
|
203
|
-
workers tasks that avoid them; a blanket freeze idled four of five workers for
|
|
204
|
-
a day.
|
|
205
|
-
- **Fix done before a long run.** Put the completion criterion in the task note
|
|
206
|
-
first: which checks, how many agreeing runs, what may differ. Without it the
|
|
207
|
-
target moves with every run.
|
|
208
|
-
- **Split long proofs into independent units**, sharded and in parallel, so a
|
|
209
|
-
unit that passes stays passed and one flake restarts only its own unit.
|
|
210
|
-
Workers poll background jobs every few minutes, not hourly.
|
|
160
|
+
- **Pipeline; don't barrier.** Wait for one task, cherry-pick only its
|
|
161
|
+
new commits, verify, return control. An umbrella wait hides progress;
|
|
162
|
+
merging stale branches can restore reverted code.
|
|
163
|
+
- **Verify the merge, not the worker's rerun.** Only the combination
|
|
164
|
+
with moved main is new; that found three breaks rerunning found none
|
|
165
|
+
of. Run a remote merge gate on the host (see REMOTE_WORKERS.md).
|
|
166
|
+
- **Push only from a green gate.** Make `git push` the last line under
|
|
167
|
+
`set -e`. Check the gate runs what it claims: an env-gated randomized
|
|
168
|
+
test once passed with zero cases.
|
|
169
|
+
- **Dispatch from current main.** Reset the worker's worktree to main
|
|
170
|
+
before each task.
|
|
171
|
+
- **Accept evidence, not close notes.** Re-run the key measurement from
|
|
172
|
+
a clean checkout; close notes have claimed unpushed commits.
|
|
173
|
+
- **Freeze only what conflicts.** Give idle workers tasks that avoid
|
|
174
|
+
shared files; a blanket freeze idled four of five workers for a day.
|
|
175
|
+
- **Fix done before a long run.** Put the completion criterion (checks,
|
|
176
|
+
agreeing runs, allowed variance) in the task note first.
|
|
177
|
+
- **Split long proofs into independent units**, sharded and parallel,
|
|
178
|
+
so one flake restarts only its unit.
|
|
211
179
|
- Bucket waves by file cluster, not severity; two agents editing one file
|
|
212
180
|
conflict. Refresh workspaces between waves.
|
|
213
|
-
- Cross-workstream wait
|
|
214
|
-
|
|
215
|
-
- For an idle worker, read the pane
|
|
216
|
-
|
|
217
|
-
-
|
|
218
|
-
|
|
219
|
-
-
|
|
220
|
-
|
|
221
|
-
|
|
181
|
+
- Cross-workstream wait and claim use qualified refs; only task
|
|
182
|
+
ownership crosses.
|
|
183
|
+
- For an idle worker, read the pane, then answer, retry, or release its
|
|
184
|
+
task. `MU_IDLE_THRESHOLD_MS` defaults to 5m.
|
|
185
|
+
- **Never chain `/new` and a prompt as two sends to a pi agent:** the prompt
|
|
186
|
+
can land mid-reset and vanish (it did, twice). `--fresh` does both inside pi.
|
|
187
|
+
- **Stop a worker:** `mu agent abort <w>` first for pi (exact, local or
|
|
188
|
+
remote, keeps context, waits for idle; exit 5 = still busy; queued
|
|
189
|
+
follow-ups return to the editor unsent). Then `mu agent kick` (pi
|
|
190
|
+
unresponsive, or non-pi; local panes only), then `mu agent close`.
|
|
191
|
+
- Use `mu agent send`, not raw mux input. Single-quote prompts containing shell
|
|
192
|
+
expansions, or use a quoted heredoc.
|
|
222
193
|
|
|
223
194
|
## CLI gotchas
|
|
224
195
|
|
|
225
|
-
- **`workstream teardown`** is dry-run
|
|
226
|
-
TOMBSTONE ops, so
|
|
227
|
-
|
|
228
|
-
`workstream list --torn-down` replays past teardowns with the group id to
|
|
229
|
-
undo, newest first, marking ones already recreated.
|
|
230
|
-
- **`agent wait <names...> --first`** blocks until an agent stops working
|
|
231
|
-
(busy → anything else) — the task-less counterpart to `mu task wait`, for
|
|
232
|
-
helpers that own no task. Use it instead of a `sleep` loop. Exit 0 met,
|
|
233
|
-
5 timeout, 6 pane died.
|
|
196
|
+
- **`workstream teardown`** is dry-run without `--yes`. It writes
|
|
197
|
+
TOMBSTONE ops, so `mu undo <group> --yes` reverses it; the log is the
|
|
198
|
+
backup. `workstream list --torn-down` lists group ids to undo.
|
|
234
199
|
- **`task close --if-ready`** no-ops until every blocker is CLOSED; bare
|
|
235
200
|
`task release` reopens IN_PROGRESS.
|
|
236
201
|
- **`task close --as rejected|wontfix --why ...`** (declined | valid, not worth it) unblocks dependents (listed in
|
|
@@ -239,49 +204,32 @@ Every turn:
|
|
|
239
204
|
IN_PROGRESS — `task release` first.
|
|
240
205
|
- **For waits use `task wait`, not `log --tail`.** `--kind` is the operator's
|
|
241
206
|
log-ledger channel; `--intent` is what mu recorded.
|
|
242
|
-
- **`mu undo`** bare lists
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
(ingest is idempotent).
|
|
261
|
-
**NEVER put `MU_DB_PATH` inside `MU_SYNC_DIR`** — it corrupts the DB and
|
|
262
|
-
`mu doctor` hard-fails. Agent/workspace state and task OWNERSHIP are
|
|
263
|
-
machine-local and never travel.
|
|
264
|
-
- **`mu doctor`** runs fast checks; `--deep` rebuilds the log into a temp DB and
|
|
265
|
-
diffs it field-by-field. DRIFT means the log and the tables disagree, which
|
|
266
|
-
breaks undo and sync at once (exit 5, naming table, key and field). It is a
|
|
267
|
-
capture bug, not operator error: back up and report it, do NOT reflexively
|
|
268
|
-
rebuild — if capture missed a mutation, the live rows hold the real work.
|
|
269
|
-
The `disk` section reconciles state-dir against DB both ways and is
|
|
270
|
-
**report-only**: `ws-rows` is a row whose directory is gone (nothing else
|
|
271
|
-
reports it), `ws-dirs` blocks the next `--workspace` spawn, and an orphan dir
|
|
272
|
-
may hold the only copy of uncommitted work — which is why mu prints the
|
|
273
|
-
cleanup command and runs none of them. `--disk` adds per-checkout byte usage.
|
|
207
|
+
- **`mu undo`** bare lists groups; `<group>` previews; `<group> --yes`
|
|
208
|
+
emits inverse ops for that group only (redo = undo the undo). Exit 4
|
|
209
|
+
if a later action changed the same fields (`--force` discards it).
|
|
210
|
+
Rows only: killed panes and freed workspace dirs do not come back.
|
|
211
|
+
- **`mu rebuild <file>`** writes a new DB from the ops log, without
|
|
212
|
+
agents or workspaces; re-spawn after the swap. Recovery is
|
|
213
|
+
`mu rebuild`, not `mu db backup`.
|
|
214
|
+
- **`mu sql`** skips ambient sync.
|
|
215
|
+
- **Sync:** set `MU_SYNC_DIR` on each machine to a shared folder
|
|
216
|
+
(Syncthing). Every command flushes and ingests ops, merged per field.
|
|
217
|
+
mu never runs ssh or rsync; `mu sync` prints the line.
|
|
218
|
+
`--repair <peer>` is always safe. **Never put `MU_DB_PATH` inside
|
|
219
|
+
`MU_SYNC_DIR`**: it corrupts the DB. Agents, workspaces, and task
|
|
220
|
+
ownership never travel.
|
|
221
|
+
- **`mu doctor --deep` DRIFT** (exit 5) is a capture bug: back up and
|
|
222
|
+
report it. Do not rebuild; the live rows may hold work the log missed.
|
|
223
|
+
The `disk` section is report-only: an orphan dir may hold the only copy
|
|
224
|
+
of uncommitted work, so mu prints cleanup commands and runs none.
|
|
274
225
|
|
|
275
226
|
## `mu task wait`
|
|
276
227
|
|
|
277
228
|
Use `--first --on-stall exit`: `--first` populates `.firing`, and
|
|
278
|
-
`--on-stall exit`
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
Answer it — questions are cheaper than rework. For remote workers, see
|
|
283
|
-
[REMOTE_WORKERS.md](REMOTE_WORKERS.md) before choosing timeout or stall
|
|
284
|
-
handling.
|
|
229
|
+
`--on-stall exit` stops an unattended wait when a worker needs attention.
|
|
230
|
+
Exit 6 is a dead pane; exit 7 is an owner in `needs_input`. Read that
|
|
231
|
+
pane (`mu agent read <owner>`) and answer: the worker may be waiting on
|
|
232
|
+
you. Questions are cheaper than rework.
|
|
285
233
|
|
|
286
234
|
## Models and thinking effort
|
|
287
235
|
|
|
@@ -293,40 +241,29 @@ export MU_PI_COMMAND="pi --model sonnet:medium"
|
|
|
293
241
|
mu agent spawn a --cli pi_big # uses $MU_PI_BIG_COMMAND
|
|
294
242
|
```
|
|
295
243
|
|
|
296
|
-
Convention: `pi_mini`
|
|
297
|
-
|
|
298
|
-
|
|
244
|
+
Convention: `pi_mini` for probing, `pi` for build and refactor,
|
|
245
|
+
`pi_big` for design, review, and incidents. List models with
|
|
246
|
+
`pi --list-models [search]`.
|
|
299
247
|
|
|
300
248
|
## Reaper and agent state
|
|
301
249
|
|
|
302
|
-
If an agent pane dies, or `mu agent close` kills it mid-task,
|
|
303
|
-
IN_PROGRESS tasks revert to OPEN with a `[reaper]` note
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
Agent state comes from [murmur](https://github.com/mu-crew/murmur) on
|
|
307
|
-
tmux and from herdr on herdr. `unknown` means no state source; run
|
|
308
|
-
`mu doctor` for the reason. mu needs murmur only for agent state:
|
|
309
|
-
tasks, claims, workspaces, spawn, send, read, and task completion waits
|
|
310
|
-
work without it. **mu owns the work; murmur reports what an agent is
|
|
311
|
-
doing.** See [REMOTE_WORKERS.md](REMOTE_WORKERS.md) § mu and murmur.
|
|
312
|
-
|
|
313
|
-
For high-stakes decisions:
|
|
250
|
+
If an agent pane dies, or `mu agent close` kills it mid-task, its
|
|
251
|
+
IN_PROGRESS tasks revert to OPEN with a `[reaper]` note. No manual
|
|
252
|
+
release after crashes.
|
|
314
253
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
254
|
+
pi agents report state through the control socket and need no murmur.
|
|
255
|
+
Other CLIs report through [murmur](https://github.com/mu-crew/murmur) on
|
|
256
|
+
tmux, or herdr on herdr. `unknown` means no state source; `mu doctor`
|
|
257
|
+
says why. Before a high-stakes decision, read the pane
|
|
258
|
+
(`mu agent read worker-1 -n 100`), `mu log -w <ws> --tail`, and
|
|
259
|
+
`mu task notes <id>`.
|
|
320
260
|
|
|
321
261
|
## In-pane worker loop
|
|
322
262
|
|
|
323
|
-
`$MU_AGENT_NAME
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
- Worker pane: spawned/adopted by mu; bare `mu task claim <id>` works.
|
|
328
|
-
- Orchestrator pane: not registered; bare `claim` errors with next
|
|
329
|
-
steps: `--self`, `--for <worker>`, or `mu agent adopt <pane>`.
|
|
263
|
+
`$MU_AGENT_NAME` (injected at spawn) resolves identity; adopted panes
|
|
264
|
+
fall back to the pane title. In a worker pane, bare `mu task claim <id>`
|
|
265
|
+
works. In the unregistered orchestrator pane it errors; use `--self`,
|
|
266
|
+
`--for <worker>`, or `mu agent adopt <pane>`.
|
|
330
267
|
|
|
331
268
|
```bash
|
|
332
269
|
mu me
|
|
@@ -342,28 +279,16 @@ Skipping close makes the orchestrator's wait hang. Won't do it:
|
|
|
342
279
|
|
|
343
280
|
## Follow-on prompts
|
|
344
281
|
|
|
345
|
-
A
|
|
346
|
-
work
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
mu agent send worker-1 '/new'
|
|
350
|
-
mu agent send worker-1 'Claim and work on task_x. Read notes first...'
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
No `sleep` needed. `mu agent send` waits for the pane to finish any
|
|
354
|
-
re-initialisation before pasting, and re-submits if the TUI swallowed
|
|
355
|
-
the Enter. If a send cannot be confirmed it prints a `warning:` to
|
|
356
|
-
stderr naming the pane; exit 0 with no warning means submitted.
|
|
357
|
-
|
|
358
|
-
Budget is `MU_SEND_READINESS_MS` (default 15000; 0 = fire-and-forget).
|
|
359
|
-
Sending to a BUSY agent is not delayed — that input queues normally.
|
|
282
|
+
A plain `mu agent send` appends to prior context; use it to steer or
|
|
283
|
+
answer. Unrelated work to pi: `mu agent send worker-1 --fresh 'Claim
|
|
284
|
+
task_x...'`. claude-code/codex: send `/new` (codex: `/clear`), then the
|
|
285
|
+
prompt; a send it cannot confirm prints a `warning:` on stderr.
|
|
360
286
|
|
|
361
287
|
## Guardrails
|
|
362
288
|
|
|
363
|
-
Task ownership outranks
|
|
364
|
-
activity log. Keep edges within one workstream
|
|
365
|
-
|
|
366
|
-
agent kick` if a subprocess wedges.
|
|
289
|
+
Task ownership outranks agent state. Coordinate through task notes and
|
|
290
|
+
the activity log. Keep edges within one workstream and reserve the `mu_`
|
|
291
|
+
task-id prefix. Give workers bounded paths and commands.
|
|
367
292
|
|
|
368
293
|
## See also
|
|
369
294
|
|