agent-council 0.1.0 → 0.2.0

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.
data/README.md CHANGED
@@ -6,14 +6,31 @@ better than any single agent's, and a **head-to-head comparison** of the
6
6
  models and providers behind the agents, measured on speed, token usage,
7
7
  cost, and quality.
8
8
 
9
- agent-council runs the **same analytical prompt** through each agent
10
- using the [Pi](https://github.com/earendil-works/pi) coding-agent harness,
11
- with whatever mix of providers and models you choose. It saves each
12
- agent's final response as a separate Markdown report and records how long
13
- it took, how many tokens it used, and what it cost. A **consolidator**
14
- agent then combines the reports into a findings report of consensus
15
- findings, unique findings, and contradictions, and a companion report
16
- that assesses what each agent contributed.
9
+ agent-council runs the **same analytical prompt** through each agent,
10
+ under the coding-agent harness each one names: the
11
+ [Pi](https://github.com/earendil-works/pi) harness, for any provider's
12
+ models, or [Claude Code](https://code.claude.com/docs), for Anthropic's,
13
+ billed however your `claude` login is. The agents can use any mix of
14
+ harnesses, providers, and models, including the same model more than
15
+ once, or under each harness.
16
+
17
+ A **consolidator** agent then reads every agent's report, checks their
18
+ claims against the project where it can, and writes two reports:
19
+
20
+ - **The consolidated findings report**, better than any single agent's:
21
+ - consensus findings;
22
+ - unique findings;
23
+ - contradictions.
24
+ - **A companion meta report**, on each agent:
25
+ - its statistics: duration, token counts, and estimated cost;
26
+ - how deeply it researched: did it read the code, run commands,
27
+ verify its claims?
28
+ - how much it added, as opposed to noise or errors.
29
+
30
+ Each agent's own report is saved too, and each run's measurements
31
+ (every agent's outcome, duration, token usage, and estimated cost)
32
+ go into a machine-readable `run.json`, so your runs build up into a
33
+ dataset for comparing models and providers on your own work.
17
34
 
18
35
  **New to Ruby? [Install agent-council from scratch](INSTALL.md)**
19
36
 
@@ -34,16 +51,20 @@ that assesses what each agent contributed.
34
51
  Public leaderboards tell you how models do on someone else's tasks.
35
52
  agent-council tells you how they do on *yours*: your codebase, your
36
53
  questions, your standards. Every run is a controlled experiment, with the
37
- same prompt, the same repository, and the same tools at the same moment,
38
- so the differences you see are differences in the models and in the
39
- providers serving them.
54
+ same prompt, the same repository, and, under each harness, the same tools,
55
+ at the same moment, so the differences you see are differences in the
56
+ models and in the providers serving them (and, in a run that mixes
57
+ harnesses, in the harnesses, whose tools and loaded context differ).
40
58
 
41
59
  - **Speed.** Every agent's wall-clock duration, side by side. Find out
42
60
  which models answer in two minutes and which take twenty, and whether
43
61
  the wait buys anything.
44
- - **Tokens and cost.** Input, cached input, and output tokens, and dollar
45
- cost where pi can price the model, per agent and in total. See whether
46
- the model that costs ten times as much finds ten times as much.
62
+ - **Tokens and cost.** Input, cached input, and output tokens, and an
63
+ estimated dollar cost where the harness can price the model, per agent
64
+ and in total. See whether the model that costs ten times as much finds
65
+ ten times as much. The cost is an estimate that can be far from what
66
+ you pay, in either direction; see
67
+ [How far to trust the cost](#how-far-to-trust-the-cost).
47
68
  - **Quality.** The reports sit side by side, labeled by source. The
48
69
  consolidator shows which findings each model shared with the others,
49
70
  which only it found, and where models contradicted each other, and its
@@ -66,12 +87,40 @@ reports, prompt, config, and measurements are saved together in a
66
87
  timestamped directory, so a comparison can be rerun next month, against
67
88
  next month's models.
68
89
 
69
- The project is at an early stage; support for more harnesses than Pi,
70
- such as Claude Code and Codex, is among the
71
- [planned features](DESIGN.md#18-status-and-future-work), and will extend
72
- these comparisons to the same model running under different harnesses. See
90
+ Because the harness is chosen per agent, a comparison can also pit the
91
+ same model against itself under different harnesses. The project is at
92
+ an early stage; support for more harnesses, such as Codex, is among the
93
+ [planned features](DESIGN.md#18-status-and-future-work). See
73
94
  [`DESIGN.md`](DESIGN.md) for the rationale.
74
95
 
96
+ ## What makes a good fit
97
+
98
+ agent-council can help with any question about a set of readable files
99
+ (or about no files at all) that meets these conditions:
100
+
101
+ - **It can be asked in one prompt.** Agents run non-interactively, with
102
+ no clarification or steering partway through.
103
+ - **It can be investigated by several agents at once without
104
+ collisions.** Reading files and running read-only commands is fine.
105
+ Agents run tests and builds only when the prompt permits them, and
106
+ even then skip any that need shared services (databases, servers,
107
+ fixed ports, Docker).
108
+ - **It has a text answer.** Only each agent's final message is saved as
109
+ its report. Agents are told not to change the project and to keep
110
+ temporary files in a scratch directory, which is deleted when the
111
+ agent finishes. Actions such as posting or deploying would happen once per agent.
112
+ - **It gains from several independent answers and a synthesis of
113
+ them.** Open-ended questions ("what's wrong with this?", "what should
114
+ we do?") gain the most; one with an obvious answer gains nothing.
115
+
116
+ Weigh two costs as well: a council costs several times what one agent
117
+ costs and takes as long as its slowest agent plus the consolidation, and
118
+ whatever the agents read goes to their providers (see
119
+ [Safety and privacy](#safety-and-privacy)).
120
+
121
+ For a catalog of uses, from code review to choosing models, see
122
+ [`USE_CASES.md`](USE_CASES.md).
123
+
75
124
  > **Between releases**, the documentation in the repository describes the
76
125
  > next release, not the latest published one, so it may cover features
77
126
  > (and a version) that are not yet in a released gem. The documentation
@@ -86,7 +135,9 @@ in detail.
86
135
  1. **Install the prerequisites:** Ruby 3.3+ (or JRuby 10+) and the
87
136
  [`pi` CLI](https://github.com/earendil-works/pi) (`pi --version`). See
88
137
  [Prerequisites](#prerequisites), or [INSTALL.md](INSTALL.md) if you
89
- need to install Ruby too.
138
+ need to install Ruby too. These steps run every agent under pi; to
139
+ run agents under Claude Code as well, or instead (then without pi),
140
+ see [Choosing a harness](#choosing-a-harness).
90
141
  2. **Set up credentials for at least one provider in pi** (see
91
142
  [pi's documentation][pi-docs]), then list the models available to pi
92
143
  (a listed model can still be one your plan doesn't include). Two
@@ -117,11 +168,14 @@ in detail.
117
168
  ```yaml
118
169
  # agent-council.yml
119
170
  agents:
120
- - provider: <provider-1>
171
+ - harness: pi
172
+ provider: <provider-1>
121
173
  model: <model-1>
122
- - provider: <provider-2>
174
+ - harness: pi
175
+ provider: <provider-2>
123
176
  model: <model-2>
124
177
  consolidator:
178
+ harness: pi
125
179
  provider: <provider-1>
126
180
  model: <model-1>
127
181
  ```
@@ -141,9 +195,9 @@ in detail.
141
195
  Each model's answer is saved as a Markdown file under
142
196
  `agent-council-reports/<yyyy-mm-dd>/<hh-mm-ss>/reviews/`, and the
143
197
  consolidated report is written to the run directory itself, split into a
144
- `_findings.md` file (findings, contradictions, and overall assessment, with
198
+ `*_findings.md` file (findings, contradictions, and overall assessment, with
145
199
  no front matter or orchestration tables, so it can be pasted into an AI chat as is) and a
146
- `_meta.md` file (front matter, tables, agents consulted, and agent
200
+ `*_meta.md` file (front matter, tables, agents consulted, and agent
147
201
  performance), or a single `_consolidated_...md` file if the model's report
148
202
  couldn't be split; see
149
203
  [What you get](#what-you-get). To add more models or change the
@@ -155,17 +209,32 @@ consolidator, see
155
209
  - Ruby 3.3 or later, or JRuby 10 or later (standard library only for the
156
210
  tool itself; CI tests 3.3, 3.4, 4.0, JRuby 10.0 and the latest
157
211
  JRuby)
158
- - The [`pi` CLI](https://github.com/earendil-works/pi) installed
159
- (`pi --version`; tested with pi 1.3.0 and 1.4.0)
160
- - Credentials for at least one provider (several give more diverse
161
- viewpoints), configured through pi itself (see
162
- [pi's documentation][pi-docs])
212
+ - The harness CLIs your config uses (each run checks for them first):
213
+ - for pi: the
214
+ [`pi` CLI](https://github.com/earendil-works/pi)
215
+ (`pi --version`), 1.0.4 or later, for `--no-mcp` (tested with pi
216
+ 1.3.0, 1.4.0, and 1.5.2), with credentials for at least one provider
217
+ (several give more diverse viewpoints), configured through pi itself
218
+ (see [pi's documentation][pi-docs]);
219
+ - for Claude Code: the [`claude` CLI](https://code.claude.com/docs)
220
+ (`claude --version`; tested with 2.1.325 and 2.1.327, and earlier versions may
221
+ lack flags agent-council passes),
222
+ logged in or set up with an API key.
223
+
224
+ agent-council runs the `pi` and `claude` executables found on its
225
+ `PATH`, not your shell's aliases or functions of those names. If yours
226
+ add something, such as an environment variable or a directory on
227
+ `PATH`, set it in the environment you run agent-council from (for
228
+ one case, see
229
+ [Claude Code's sandbox](#claude-codes-sandbox)).
163
230
  - On Windows, WSL (e.g. Ubuntu): native Windows is not supported. Install
164
- and run Ruby, pi, and agent-council inside WSL, from a WSL shell
231
+ and run Ruby, the harness CLIs your config uses, and agent-council
232
+ inside WSL, from a WSL shell
165
233
  ([INSTALL.md](INSTALL.md) has the steps). Windows drives are reachable
166
234
  at `/mnt/c/...`, but file access there is much slower than in the Linux
167
- filesystem (e.g. `~/projects`). Set up pi's provider credentials inside
168
- WSL too; WSL doesn't share them with Windows.
235
+ filesystem (e.g. `~/projects`). Set up pi's provider credentials (and
236
+ log in to Claude Code) inside WSL too; WSL doesn't share them with
237
+ Windows.
169
238
 
170
239
  ## Installation
171
240
 
@@ -186,29 +255,23 @@ to write one. To work on agent-council itself, see
186
255
  ### Finding the installed documentation and examples
187
256
 
188
257
  The installed gem contains this README, [`INSTALL.md`](INSTALL.md),
189
- [`DESIGN.md`](DESIGN.md), [`code-review-agents.md`](code-review-agents.md),
190
- `RELEASE_NOTES.md`, and the sample prompts and configs under `examples/`,
191
- all matching the installed version. The help output shows where they are
192
- for the copy of `agent-council` you are actually running:
258
+ [`USE_CASES.md`](USE_CASES.md), [`DESIGN.md`](DESIGN.md),
259
+ [`RUNAWAY_AGENTS.md`](RUNAWAY_AGENTS.md), `RELEASE_NOTES.md`, and the sample prompts and configs under
260
+ `examples/`, all matching the installed version. The help
261
+ output shows where they are for the copy of `agent-council` you are
262
+ actually running:
193
263
 
194
264
  ```bash
195
265
  agent-council -h # see "Documentation (Local)" and "Examples (Local)"
196
266
  ```
197
267
 
198
- To get the gem's directory in a shell variable:
268
+ To get that copy's directory in a shell variable, used by the examples
269
+ below:
199
270
 
200
271
  ```bash
201
- AC_HOME=$(ruby <<'RUBY'
202
- print Gem::Specification
203
- .find_by_name('agent-council', '>= 0.a')
204
- .full_gem_path
205
- RUBY
206
- )
272
+ AC_HOME=$(agent-council --gem-dir)
207
273
  ```
208
274
 
209
- If several versions are installed, this finds the newest, prereleases
210
- included: the same one a plain `agent-council` command runs.
211
-
212
275
  ## Discovering and configuring models
213
276
 
214
277
  ```bash
@@ -226,19 +289,24 @@ Edit the config to choose the ensemble. The config is the optional second
226
289
  argument; if omitted, `./agent-council.yml` in the current directory is used
227
290
  (parent directories are not searched), else `~/.agent-council.yml` in your
228
291
  home directory. It is an error if neither exists. Each entry becomes one
229
- pi run with that `--provider` and `--model` (see
230
- [How it works](#how-it-works-and-what-pi-is-told) for the full command), so no Ruby changes
292
+ agent, which runs under the harness it names (see
293
+ [Choosing a harness](#choosing-a-harness)) with that
294
+ model and provider (see
295
+ [How it works](#how-it-works-and-what-the-agents-are-told) for the full commands), so no Ruby changes
231
296
  are needed to add, remove, or swap models. A small config (replace the
232
297
  providers and models with ones you have credentials for):
233
298
 
234
299
  ```yaml
235
300
  # agent-council.yml
236
301
  agents:
237
- - provider: opencode-go
302
+ - harness: pi
303
+ provider: opencode-go
238
304
  model: kimi-k2.7-code
239
- - provider: openai
305
+ - harness: pi
306
+ provider: openai
240
307
  model: gpt-6.1-sol
241
308
  consolidator: # optional; omit to skip consolidation
309
+ harness: pi
242
310
  provider: opencode-go
243
311
  model: kimi-k2.7-code
244
312
  ```
@@ -247,26 +315,30 @@ Use at least two agents: a council of one gives a single viewpoint, and
247
315
  consolidating a single report adds cost without adding anything.
248
316
 
249
317
  The config must be a YAML mapping with a non-empty `agents` list. Each
250
- agent, and the consolidator, needs string `provider` and `model` values
251
- (quote any value YAML would read as something else, such as a number,
252
- a date, or `yes`); other keys are ignored.
318
+ agent, and the consolidator, needs nonblank string `harness`,
319
+ `provider`, and `model` values (quote any value YAML would read as
320
+ something else, such as a number, a date, or `yes`). None has a default;
321
+ a 0.1.0 config needs `harness: pi` added to each entry. `harness` names
322
+ the harness the entry runs under, `pi` or `claude`; an unknown name is
323
+ rejected at startup (with `--consolidate`, only the consolidator's,
324
+ since no analysts run). Other keys are ignored. A config error lists
325
+ every bad entry, named as in `'agents' entry #2` or `'consolidator'`,
326
+ with every problem it has.
253
327
 
254
328
  More samples are in [`examples/configs/`](examples/configs/), which is
255
- included in the installed gem. For scripts and agents,
329
+ included in the installed gem; `mixed-harness.yml` mixes pi and Claude
330
+ Code agents. For scripts and agents,
256
331
  [`pi-models`](#occasional-utility-pi-models) lists the models in
257
332
  machine-readable forms.
258
333
 
259
- For a recommended code-review ensemble, see
260
- [`code-review-agents.md`](code-review-agents.md). It is Markdown, not a
261
- config file: copy its YAML block into your config.
262
-
263
- An optional top-level `consolidator:` entry (provider + model, same
264
- shape as an agent) runs after all agents finish. That model receives:
334
+ An optional top-level `consolidator:` entry (the same shape as an
335
+ agent's: a harness, a provider, and a model) runs after all agents
336
+ finish. That model receives:
265
337
 
266
338
  - the original prompt;
267
339
  - the analyst reports in `reviews/`, each labeled with its source model;
268
- - a list of the agents without a report, with each one's failure reason
269
- (in a normal run);
340
+ - a list of the agents without a report, each with its harness and its
341
+ failure reason, followed by any warnings about that agent;
270
342
  - the instructions in `lib/agent_council/templates/consolidate_prompt.md`
271
343
  in the gem's directory (`$AC_HOME`; see
272
344
  [Finding the installed documentation and examples](#finding-the-installed-documentation-and-examples))
@@ -277,6 +349,59 @@ agent-council saves its response as a report in the run dir itself (see
277
349
  consolidate a run that has already finished, see
278
350
  [Consolidating a finished run](#consolidating-a-finished-run).
279
351
 
352
+ ### Choosing a harness
353
+
354
+ An entry with `harness: claude` runs under
355
+ [Claude Code](https://code.claude.com/docs) instead of pi, so one config
356
+ can mix the two, and can compare a model under each:
357
+
358
+ ```yaml
359
+ agents:
360
+ - harness: pi
361
+ provider: openai
362
+ model: gpt-6.1-sol
363
+ - harness: claude
364
+ provider: anthropic
365
+ model: claude-opus-5-5
366
+ consolidator:
367
+ harness: claude
368
+ provider: anthropic
369
+ model: claude-sonnet-5-5
370
+ ```
371
+
372
+ - **Models.** `model` is any model name or alias `claude --model`
373
+ accepts. Claude Code takes no provider, so `provider` only labels the
374
+ agent: `anthropic`, or e.g. `bedrock` if your `claude` is set up to use
375
+ it.
376
+ - **Billing.** agent-council leaves authentication and billing to Claude
377
+ Code: an agent bills however `claude` would at your terminal, to your
378
+ subscription if you are logged in with one, or to an API key if one is
379
+ configured. Unlike an interactive session, `claude -p` doesn't ask
380
+ before using an `ANTHROPIC_API_KEY` in your environment, so a key
381
+ exported for another tool bills council runs to the API. On a
382
+ subscription, agents share your plan's usage limits with your
383
+ interactive work (several agents at once use them up faster), and the
384
+ reported cost is Claude Code's estimate at API prices, not a charge
385
+ (see [How far to trust the cost](#how-far-to-trust-the-cost)).
386
+ - **Context.** Each agent runs as an interactive session started in your
387
+ project would, so your `CLAUDE.md` files, settings, hooks, and plugins
388
+ apply, and so does Claude Code's auto memory: agents see the memory
389
+ notes Claude Code has kept for the project, and are told, as an
390
+ interactive session is, that they may add to them. See
391
+ [Safety and privacy](#safety-and-privacy).
392
+ - **Refused tool calls.** Claude Code can still refuse a tool call, for
393
+ example one that a `permissions.deny` rule in your settings or the
394
+ project's forbids. The agent then carries on without it; its report is
395
+ kept, and a warning naming the call (up to five distinct calls, with a
396
+ count of the rest) is printed under its progress line (the
397
+ consolidator's, under its result table), shown in the report's
398
+ metadata table (so the consolidator sees an analyst's too), and
399
+ recorded in `run.json`, since the report may lack what the call would
400
+ have found. If the agent fails anyway (say, it runs out of turns after
401
+ repeated refusals), the warning still follows its failure reason, on
402
+ the console, in `run.json`, and in what the consolidator is told about
403
+ it, since the refusals may be why it failed.
404
+
280
405
  ## Running
281
406
 
282
407
  ```bash
@@ -284,8 +409,8 @@ cd /path/to/the/repo/you/want/analyzed
284
409
  agent-council /path/to/prompt.md
285
410
  ```
286
411
 
287
- There is no option to choose the directory analyzed: Pi analyzes its **own
288
- working directory**, which is the directory you run `agent-council` from. Run it from
412
+ There is no option to choose the directory analyzed: each agent analyzes its
413
+ **own working directory**, which is the directory you run `agent-council` from. Run it from
289
414
  the project you want analyzed; the prompt file can live anywhere, as can a
290
415
  config given as an argument.
291
416
  Reports land in `./agent-council-reports` under that working directory,
@@ -306,6 +431,10 @@ agent-council -o tmp/council my-analysis-prompt.md
306
431
  agent-council -h
307
432
  # Version
308
433
  agent-council -v
434
+ # Root directory of agent-council, holding its docs and examples
435
+ agent-council --gem-dir
436
+ # The project's GitHub URL
437
+ agent-council --project-url
309
438
  # See Consolidating a finished run
310
439
  agent-council --consolidate agent-council-reports/2026-09-03/09-14-02
311
440
  ```
@@ -316,11 +445,13 @@ must expand it.
316
445
 
317
446
  [`examples/`](examples/) holds sample prompts and configs — pure samples, not
318
447
  used at runtime. `examples/prompts/` and `examples/configs/` are included in
319
- the installed gem. The commands below use `$AC_HOME`, the installed gem's
320
- directory (see [Finding the installed documentation and
321
- examples](#finding-the-installed-documentation-and-examples)); in a source
322
- checkout, set `AC_HOME` to the checkout's path and put its `exe/` on
323
- your `PATH` (see [Development](#development)). They still analyze your
448
+ the installed gem. The commands below use `$AC_HOME`, agent-council's
449
+ root directory (see [Finding the installed documentation and
450
+ examples](#finding-the-installed-documentation-and-examples)). To use a
451
+ source checkout instead, use its `exe/agent-council` wherever
452
+ `agent-council` appears, including when setting `AC_HOME`: run it by its
453
+ full path, or put its `exe/` on your `PATH` (see
454
+ [Development](#development)). They still analyze your
324
455
  current directory, and the sample configs name specific providers and
325
456
  models — copy and edit one if yours differ.
326
457
 
@@ -338,7 +469,7 @@ agent-council \
338
469
  `examples/configs/single.yml` — a tiny, cheap prompt (one multiplication
339
470
  question — enough to prove a real answer came back) and a one-model
340
471
  config, for verifying your setup in seconds (the
341
- [report-format addendum](#how-it-works-and-what-pi-is-told) may wrap
472
+ [report-format addendum](#how-it-works-and-what-the-agents-are-told) may wrap
342
473
  the number in a short report):
343
474
 
344
475
  ```bash
@@ -364,9 +495,7 @@ agent-council \
364
495
  list); its sample
365
496
  code-review recommendation is in
366
497
  [`examples/results/recommend-model-ensemble-code-review.md`](https://github.com/keithrbennett/agent-council/blob/main/examples/results/recommend-model-ensemble-code-review.md)
367
- (generated output, in the source repository only — not in the gem; it
368
- shares its title with, but is not, the curated
369
- [`code-review-agents.md`](code-review-agents.md)).
498
+ (generated output, in the source repository only — not in the gem).
370
499
  - `examples/prompts/review-latest-commit-prompt.md` — a code-review prompt
371
500
  for the latest commit (plus any uncommitted changes); run it from the
372
501
  repository under review with a multi-model config.
@@ -388,6 +517,51 @@ agent-council \
388
517
  so run your full test suite first; it stops with an error if the coverage
389
518
  data looks out of date.
390
519
 
520
+ ### What a run prints
521
+
522
+ A run of `review-latest-commit-prompt.md` with four review agents and a
523
+ consolidator, from a repository's root with the default config:
524
+
525
+ ```text
526
+ Working Dir: /home/me/code/my-project
527
+ Config: [default] /home/me/.agent-council.yml
528
+ Prompt: examples/prompts/review-latest-commit-prompt.md
529
+ Run Dir: agent-council-reports/2026-11-18/22-46-15
530
+
531
+ Review Agents (4):
532
+ #1 pi / deepseek / deepseek-flash
533
+ #2 pi / deepseek / deepseek-flash
534
+ #3 pi / openrouter / deepseek/deepseek-v4.1-flash-1017
535
+ #4 pi / openrouter / deepseek/deepseek-v4.1-flash-1017
536
+
537
+ Consolidator Agent:
538
+ pi / anthropic / claude-sonnet-5-5
539
+
540
+ Review Progress:
541
+ ✓ 00:01:53 #3 openrouter / deepseek/deepseek-v4.1-flash-1017
542
+ ✓ 00:02:31 #4 openrouter / deepseek/deepseek-v4.1-flash-1017
543
+ ✓ 00:02:42 #2 deepseek / deepseek-flash
544
+ ✓ 00:03:45 #1 deepseek / deepseek-flash
545
+
546
+ Reviews (in agent-council-reports/2026-11-18/22-46-15/reviews):
547
+ Ok Duration Agent In Cached Out Cost
548
+ ✓ 00:03:45 #1 deepseek / deepseek-flash 1.1M 1.1M 29.4k $0.05
549
+ ✓ 00:02:42 #2 deepseek / deepseek-flash 967.2k 924.8k 22.8k $0.05
550
+ ✓ 00:01:53 #3 openrouter / deepseek/deepseek-v4.1-flash-1017 1.4M 1.4M 30.0k $0.06
551
+ ✓ 00:02:31 #4 openrouter / deepseek/deepseek-v4.1-flash-1017 1.4M 1.3M 25.6k $0.02
552
+
553
+ --- Reviews complete (4/4 succeeded; 4.9M in (4.7M cached) / 107.9k out, $0.18) ---
554
+
555
+ Consolidation Report (in agent-council-reports/2026-11-18/22-46-15):
556
+ Ok Duration Agent In Cached Out Cost
557
+ ✓ 00:00:17 anthropic / claude-sonnet-5-5 11.7k 0 2.2k $0.05
558
+ ```
559
+
560
+ Progress lines appear as each agent finishes. Costs are the harness's
561
+ estimates and can be far off; see [How far to trust the
562
+ cost](#how-far-to-trust-the-cost). The files the run wrote are described
563
+ in [What you get](#what-you-get).
564
+
391
565
  ### Setting your own defaults with `AGENT_COUNCIL_OPTS`
392
566
 
393
567
  To use the same options on every run, put them in the
@@ -408,16 +582,17 @@ so set it with care: for example, an `--output-dir` there makes
408
582
  words like a shell would, but agent-council doesn't expand variables in
409
583
  it: `~` works, but a literal `$HOME` stays literal. (In a double-quoted
410
584
  `export`, your shell has already expanded it.) A malformed value, such as
411
- one with an unclosed quote, makes every command fail, `-h` and `-v`
412
- included, with a message naming `AGENT_COUNCIL_OPTS`.
585
+ one with an unclosed quote, makes every command fail, `-h`, `-v`,
586
+ `--gem-dir`, and `--project-url` included, with a message naming
587
+ `AGENT_COUNCIL_OPTS`.
413
588
 
414
589
  ### Stopping a run
415
590
 
416
591
  Ctrl-C (or SIGTERM, SIGHUP, or SIGQUIT) stops the run, keeping reports
417
592
  already written:
418
593
 
419
- - Running agents, the consolidator included, get SIGTERM (pi then also
420
- stops the commands it started) and a shared 5 seconds to exit before
594
+ - Running agents, the consolidator included, get SIGTERM (pi and Claude
595
+ Code then also stop the commands they started) and a shared 5 seconds to exit before
421
596
  they are killed. A killed agent can't stop the commands it started, so
422
597
  those may keep running.
423
598
  - A second SIGINT, SIGTERM, or SIGQUIT kills them at once; further SIGHUPs
@@ -431,6 +606,12 @@ already written:
431
606
 
432
607
  [`DESIGN.md`](DESIGN.md) §7 explains why it works this way.
433
608
 
609
+ agent-council has no time limit, so an agent that never finishes holds
610
+ up the run until you stop it. To stop a run automatically after a set
611
+ time, run it under the `timeout` command; [`RUNAWAY_AGENTS.md`](RUNAWAY_AGENTS.md)
612
+ explains how, the options to use and avoid, and why there's no
613
+ built-in limit yet.
614
+
434
615
  ### Consolidating a finished run
435
616
 
436
617
  To consolidate a finished run later — say its consolidation failed, it
@@ -455,9 +636,12 @@ any suffix). Exit status is 0 only if the consolidation succeeded.
455
636
  then no longer records the run's original consolidator).
456
637
  - If the run had no consolidator, add a `consolidator:` entry to the
457
638
  copy first; otherwise `--consolidate` exits with an error.
639
+ - A run made by agent-council 0.1.0, before entries named their
640
+ harness, has a consolidator with no `harness`; it ran under pi, so
641
+ add `harness: pi` to it (the error message says so).
458
642
  - Leave the copy's `agents:` exactly as they were (same order,
459
- providers, and models): an agent counts as having no report when no
460
- report carries its number, provider, and model.
643
+ harnesses, providers, and models): an agent counts as having no
644
+ report when no report carries its number, provider, and model.
461
645
  - **The consolidation instructions are the current template's** (the
462
646
  installed gem's, or a checkout's own), which may have changed since
463
647
  the run.
@@ -474,9 +658,11 @@ any suffix). Exit status is 0 only if the consolidation succeeded.
474
658
  `run_stamp` and `query` naming the consolidated report). A run where
475
659
  every analyst failed, or that was interrupted before any report was
476
660
  written, can't be consolidated.
477
- - **Failure reasons aren't saved in the run dir**, so the consolidator
478
- is told only which configured agents have no report, with a note that
479
- the reason wasn't recorded.
661
+ - **Failure reasons come from `run.json`.** The consolidator is told
662
+ each configured agent without a report, with the error and warnings
663
+ `run.json` records for it when it failed; for an agent with no such
664
+ entry (an interrupted run, a removed report, or no readable
665
+ `run.json`), with a note that the reason wasn't recorded.
480
666
 
481
667
  ### Time zone
482
668
 
@@ -548,7 +734,7 @@ agent-council-reports/
548
734
  codebase-review.md # prompt copy
549
735
  analyst_format.md # report-format addendum copy
550
736
  consolidated.yml # config copy
551
- run.json # every agent run's outcome, duration, and token usage
737
+ run.json # every agent's outcome, duration, and token usage
552
738
  reviews/ # analyst reports
553
739
  2026-09-02-16-21-43_codebase-review_01_pi_opencode-go_glm-5.3.md
554
740
  2026-09-02-16-21-43_codebase-review_02_pi_opencode-go_kimi-k3.md
@@ -580,8 +766,9 @@ agent-council-reports/
580
766
  tree (a consolidated report has `consolidated` in place of
581
767
  `<agent-number>`, and, if the report was split, ends in `_findings` or `_meta` before `.md`); `<hh-mm-ss>` includes the run dir's suffix, if any,
582
768
  and `<provider>` and `<model>` are sanitized like the query slug below,
583
- but keep their case. `<harness>` is currently always `pi`, the only
584
- harness agent-council supports so far.
769
+ but keep their case. `<harness>` is the agent's (or consolidator's)
770
+ `harness` config value, `pi` or `claude` (see
771
+ [Choosing a harness](#choosing-a-harness)).
585
772
  `<agent-number>` is the agent's 1-based position in the config's
586
773
  `agents` list (`01`, `02`, ...), so every report has a unique name even
587
774
  if the same provider/model is configured more than once. The query slug
@@ -593,9 +780,9 @@ agent-council-reports/
593
780
  `my-prompt-draft`); a name left empty becomes `prompt`.
594
781
  - **Day buckets** keep the reports directory itself navigable when you have hundreds
595
782
  of runs.
596
- - Each report file, except a consolidated report's `_findings.md`, begins with a small **YAML front matter** block,
783
+ - Each report file, except a consolidated report's `*_findings.md`, begins with a small **YAML front matter** block,
597
784
  written by the orchestrator (never by the model), identifying the
598
- report (what was measured about its run is in `run.json`, below):
785
+ report (what was measured about the agent that wrote it is in `run.json`, below):
599
786
  - in every report: `role` (`analyst` or `consolidator`), `timestamp`
600
787
  (unquoted ISO 8601), `query` (the query slug), `harness`, `provider`, `model`,
601
788
  `prompt_file` and `config_file` (the names of
@@ -609,29 +796,35 @@ agent-council-reports/
609
796
  consolidation ran; with `--consolidate`, possibly long after
610
797
  `timestamp`, the run's start).
611
798
 
612
- - The run dir's **`run.json`** records every agent run, for tools and
613
- for analysis across many runs: `analysts` and `consolidations`, one
614
- entry per run with its `agent_index` (analysts only), `harness`,
799
+ - The run dir's **`run.json`** records every analyst and consolidation, for tools
800
+ and for analysis across many runs: `analysts` and `consolidations`,
801
+ one entry for each analyst and each consolidation (`--consolidate`'s
802
+ included), with its `agent_index` (analysts only), `harness`,
615
803
  `provider`, `model`, `ok`, `duration_seconds`, `usage`, and `report` (its
616
- path in the run dir; for a split consolidation, the `_findings.md` file)
617
- or `error`; a split consolidation also has `meta_report`, the `_meta.md`
618
- file, which has the front matter; `total_usage`, the
804
+ path in the run dir; for a split consolidation, the `*_findings.md` file)
805
+ or `error`. A split consolidation also has `meta_report`, the `*_meta.md`
806
+ file, which has the front matter. Any entry the harness warned about
807
+ (such as a Claude Code agent with refused tool calls) also has
808
+ `warnings`, a list of messages. The file also has `total_usage`, the
619
809
  entries' summed usage, whose `cost` is included only if every summed
620
810
  entry's cost is known; and `total_usage_runs`, how many entries reported
621
- usage (and so are in the total). Failed runs are included, since their
622
- tokens were spent.
811
+ usage (and so are in the total). Failed agents are included, since their
812
+ tokens were spent, but a Claude Code agent that ends without its final
813
+ `result` event (e.g. because its `claude` was killed) reports no usage,
814
+ since only that event gives the agent's totals.
623
815
  It is written once the reviews finish and updated after each
624
816
  consolidation, including each `--consolidate`; a `--consolidate` of a
625
817
  run dir without a readable `run.json` warns and writes none.
626
818
 
627
- `usage` is the model's token usage, summed over every request of the
628
- run, as reported by the harness: `input` (excluding cached input),
819
+ `usage` is the model's token usage, summed over every request the
820
+ agent made, as reported by the harness: `input` (excluding cached input),
629
821
  `cache_read`, `cache_write`, and `output` token counts, plus `cost` in
630
- US dollars when the harness could price the run (pi uses its own price
631
- table, so models missing from it have no cost). It is `null` when the
632
- provider reports no usage. Providers count tokens somewhat differently
633
- (reasoning tokens, for example), so compare counts across providers
634
- only roughly.
822
+ US dollars when the harness could price the usage (pi uses its own price
823
+ table, so models missing from it have no cost; Claude Code prices usage
824
+ at Anthropic's API list prices), recorded as the harness reports it,
825
+ only rounded to six decimal places. It is an estimate, not what you're
826
+ billed; see [How far to trust the cost](#how-far-to-trust-the-cost).
827
+ `usage` is `null` when the provider reports no usage.
635
828
 
636
829
  `--consolidate` relies on the analysts' `prompt_file`, `config_file`,
637
830
  `run_stamp`, and `query`, and on `agent_index` to tell which configured
@@ -639,7 +832,8 @@ agent-council-reports/
639
832
  not by filename parsing, so `.md` files in `reviews/` without
640
833
  `provider` and `model` front matter are ignored.
641
834
  - Below the front matter, the orchestrator adds a metadata table
642
- summarizing its main fields and its run's duration and token usage
835
+ summarizing its main fields, the agent's duration and token usage, and
836
+ any warnings about the agent, such as tool calls Claude Code refused
643
837
  (for consolidated reports, under a `# Consolidated Report` title and a
644
838
  `### Prompt:` line, and followed by a `### Sources` table giving each
645
839
  source's duration, input (cached included), cached input, output, and
@@ -648,28 +842,32 @@ agent-council-reports/
648
842
  starts with. The consolidator is asked to put a line containing only `=== META ===`
649
843
  between its findings and its `Agent Consultants` and `Agent performance`
650
844
  sections, and the report is split there: the text after the marker stays
651
- with this header and front matter in the `_meta.md` file, and the text
652
- before it goes to the `_findings.md` file under a `# Consolidated Findings`
845
+ with this header and front matter in the `*_meta.md` file, and the text
846
+ before it goes to the `*_findings.md` file under a `# Consolidated Findings`
653
847
  title, a few lines identifying the run (its stamp and query, the prompt
654
- file, and the consolidator and time), and a legend of the agents (number,
848
+ file, the consolidator and time, and any warnings about the
849
+ consolidator), and a legend of the agents (number,
655
850
  harness, provider, model). If
656
851
  the marker is missing, repeated, inside a code fence, or not followed by
657
852
  the `Agent Consultants` heading, or the report no longer starts with the
658
853
  header written to it, the report is left unsplit, under the unsuffixed
659
854
  name, and a warning says why.
660
- - The copied prompt, config, and report-format addendum keep an analyst
661
- run's inputs recoverable after the fact. The pi and agent-council
662
- versions, the scaffolding text appended to pi's system prompt, and the
855
+ - The copied prompt, config, and report-format addendum keep an analyst's
856
+ inputs recoverable after the fact. The harness and
857
+ agent-council versions, the scaffolding text appended to the harness's
858
+ system prompt, and the
663
859
  consolidation template are not recorded.
664
860
  - The prompt and config copies keep their own file names (e.g.
665
861
  `single.yml`), so the prompt, the config, and `analyst_format.md` must
666
862
  have different file names, and none can be named `reviews`; a run that
667
863
  would break either rule stops before starting.
668
864
 
669
- Each run starts by printing its config, prompt, and run directory
670
- (`Run Dir: agent-council-reports/2026-09-03/09-14-02`), then its agents
671
- under `Review Agents (N):` and, if configured, `Consolidator Agent:`;
672
- these labels also name the harness (e.g. `#2 pi / openai / gpt-6.1-sol`).
865
+ Each run starts by printing its working directory (`Working Dir:`, which
866
+ relative paths below are shown against), config, prompt, and run
867
+ directory (`Run Dir: agent-council-reports/2026-09-03/09-14-02`), then
868
+ its agents under `Review Agents (N):` and, if configured,
869
+ `Consolidator Agent:`; these labels also name the harness
870
+ (e.g. `#2 pi / openai / gpt-6.1-sol`).
673
871
  You can open the run dir while agents are still working, or after a
674
872
  Ctrl-C (see [Stopping a run](#stopping-a-run)). Other access patterns:
675
873
 
@@ -685,10 +883,13 @@ ls agent-council-reports/*/*/reviews/*codebase-review*
685
883
  While the agents run, a `Review Progress:` section prints one line per
686
884
  agent as it finishes: `✓` or `✗`, its duration, its label (e.g.
687
885
  `#2 openai / gpt-6.1-sol`) and, for a failure, the reason on the line
688
- below. When all reviews finish, a `Reviews` table shows which models
886
+ below; any warnings about an agent (such as tool calls Claude Code
887
+ refused) follow as indented `Warning:` lines, under its progress line or,
888
+ for the consolidator, under its result row. When all reviews finish, a `Reviews` table shows which models
689
889
  succeeded, how long each took (`HH:MM:SS`) and their token usage in
690
890
  `In`, `Cached`, `Out`, and `Cost` columns (`In` counts cached input too;
691
- `-` when unknown; failed runs show what they used), with the failures'
891
+ `-` when unknown; failed agents show what they used; `Cost` is an estimate,
892
+ see [How far to trust the cost](#how-far-to-trust-the-cost)), with the failures'
692
893
  reasons listed below it under `Errors:`. A
693
894
  `--- Reviews complete (N/M succeeded; <total usage>) ---` line follows,
694
895
  e.g. `2.1M in (2.0M cached) / 32.7k out, $0.18`. The total's cost is
@@ -702,89 +903,177 @@ complete ---` (or `--- Consolidation error ---`). One model's failure
702
903
  does not affect the others. Exit status is 0 only if every analyst
703
904
  agent succeeded; the consolidator's result doesn't affect it.
704
905
 
705
- Output paths are printed relative to the current working directory (e.g.
906
+ Output paths are printed relative to the current working directory (shown
907
+ on the `Working Dir:` line; e.g.
706
908
  `agent-council-reports/2026-09-04/21-39-01/reviews`), not to where
707
909
  agent-council is installed. Paths outside the working directory (such
708
910
  as an `--output-dir` elsewhere) are printed absolute, as is a default
709
- config's (`Config: [default] /path/to/agent-council.yml`), to show
911
+ config's (`Config: [default] /path/to/agent-council.yml`), to show
710
912
  which default was picked up.
711
913
 
712
- ## How it works (and what pi is told)
914
+ ### How far to trust the cost
915
+
916
+ Every cost agent-council shows or records is the harness's estimate
917
+ from per-token prices, not a bill, and it can be far off in either
918
+ direction:
919
+
920
+ - **Subscriptions.** On a subscription or plan (a Claude Code login, or
921
+ a plan-based pi provider), the estimate is what the usage would cost
922
+ at pay-per-token prices. What you actually pay for a run may be
923
+ nothing extra, while the run uses up your plan's limits.
924
+ - **Price tables.** pi prices usage from its own price table, which may
925
+ not match what your provider charges (discounts, price changes, or
926
+ routing to a differently priced upstream), and a model missing from
927
+ it gets no cost at all. Claude Code prices usage at Anthropic's API
928
+ list prices.
929
+ - **Stopped agents.** An agent stopped by Ctrl-C (or another signal)
930
+ records no usage, though its provider still bills for what it used,
931
+ and a run stopped before every analyst finished writes no `run.json`
932
+ at all. A runaway agent stopped by hand, the most expensive kind of
933
+ agent, is therefore missing from the totals entirely.
934
+ - **Token counts.** Providers count tokens somewhat differently
935
+ (reasoning tokens, for example), so compare counts, and the costs
936
+ built on them, across providers only roughly.
937
+
938
+ For what you were actually charged, check your provider's billing or
939
+ usage page.
940
+
941
+ ## How it works (and what the agents are told)
713
942
 
714
943
  - Every analyst agent receives the **same bytes**: the prompt file's
715
944
  contents (with one trailing newline removed), a blank line, and the
716
945
  report-format addendum
717
946
  (`lib/agent_council/templates/analyst_format.md`, copied into each run
718
- dir), piped to pi on stdin as the prompt. No roles, no per-model customization. The addendum asks for a
947
+ dir), piped to the agent's harness on stdin as the prompt. No roles, no per-model customization. The addendum asks for a
719
948
  Markdown report with `##` section headings, which can conflict with a
720
949
  prompt that asks for some other output form (the smoke-test prompt's
721
950
  "Reply with just the number, then one sentence explaining how you got
722
951
  it.", for example); models usually reconcile the two. (The
723
952
  consolidator gets its own prompt; see
724
953
  [Discovering and configuring models](#discovering-and-configuring-models).)
725
- - Each agent runs as
726
- `pi -p --mode json --no-session --tools read,grep,find,ls,bash
954
+ - Under pi, each agent runs as
955
+ `pi -p --mode json --no-session --no-mcp --tools read,grep,find,ls,bash
727
956
  --provider P --model M --append-system-prompt <scaffolding>`.
728
- - `--no-session` keeps runs independent: no conversation state leaks
729
- between ensemble members.
730
- - `--tools` is an allowlist for pi's built-in, extension, and custom
731
- tools: `bash` remains for investigation (`git log`, dependency
732
- inspection, ...), while file-editing tools and unlisted extension and
733
- custom tools are unavailable, as are MCP tools. The allowlist is the
734
- only enforced restriction (see [Safety and privacy](#safety-and-privacy)). A fixed
735
- scaffolding text appended to the system prompt (identical for all
736
- agents, the consolidator included, except the scratch path) tells agents
737
- not to modify project files, git state, software, or configuration, or
738
- start persistent services (they get a scratch directory for temporary
739
- files), and
740
- not to run tests, builds, or similar commands, which can collide between
741
- concurrent analysts, unless the prompt permits them (as
957
+ - `--no-session` keeps agents independent: no conversation state leaks
958
+ between ensemble members.
959
+ - `--no-mcp` turns off pi's built-in MCP support, so the MCP servers
960
+ configured for pi don't start and agents have no MCP tools. (An
961
+ extension that provides its own MCP support isn't affected.)
962
+ - `--tools` is an allowlist for pi's built-in, extension, and custom
963
+ tools: `bash` remains for investigation (`git log`, dependency
964
+ inspection, ...), while file-editing tools and unlisted extension and
965
+ custom tools are unavailable.
966
+ - Otherwise pi behaves normally: it loads context files such as
967
+ `AGENTS.md` and `CLAUDE.md` as in any pi session, and the analyzed repo's
968
+ `.pi` project resources only if pi already trusts the project
969
+ (agent-council passes no `--approve`). See
970
+ [pi's documentation][pi-docs] for what loads from where.
971
+ - The final response is read from pi's JSONL event stream. pi exits 0
972
+ even when the provider rejects the request (e.g. Copilot's
973
+ `model_not_available_for_integrator`) or the output is cut off;
974
+ agent-council detects these in the event stream and reports them as
975
+ failures, not reports. [`DESIGN.md`](DESIGN.md) §13 has the details.
976
+ - Under Claude Code, each agent runs as
977
+ `claude -p --output-format stream-json --verbose --no-session-persistence
978
+ --tools Read,Grep,Glob,Bash --allowedTools Read,Grep,Glob,Bash
979
+ --permission-mode manual --strict-mcp-config --model M
980
+ --append-system-prompt <scaffolding>`.
981
+ - `--no-session-persistence` keeps agents independent: no session is
982
+ saved, to be resumed or to show up in your session list.
983
+ - `--tools` limits the built-in tools to these four: `Bash` remains for
984
+ investigation, while `Edit`, `Write`, and the rest are unavailable.
985
+ `--allowedTools` pre-approves the four, since `-p` mode can't ask
986
+ (a call that needs approval is refused), and `--permission-mode
987
+ manual` keeps your own default mode (such as `plan`) from applying.
988
+ - `--strict-mcp-config`, with no `--mcp-config`, loads no MCP servers,
989
+ neither yours nor a plugin's, so agents have no MCP tools. (Where an organization manages Claude
990
+ Code's MCP servers with a `managed-mcp.json`, Claude Code's own
991
+ message says it refuses this flag, which would fail every Claude Code
992
+ agent; that case is untested.)
993
+ - Otherwise Claude Code behaves as an interactive session started in
994
+ the analyzed repo would: it loads `CLAUDE.md` files (and what they
995
+ import, such as `@AGENTS.md`), your user and the project's settings,
996
+ hooks, and plugins, and its auto memory for the project (the
997
+ `MEMORY.md` index, with the instruction to keep it up to date).
998
+ (`--bare`, which would skip them, also permits only API-key
999
+ authentication, so it isn't used.)
1000
+ - The final response is the stream's `result` event; an agent that fails
1001
+ (not logged in, an unknown model, the output cut off) is reported
1002
+ with the reason Claude Code gives. [`DESIGN.md`](DESIGN.md) §13 has
1003
+ the details.
1004
+ - The tool limits and the MCP settings above are the only restrictions
1005
+ agent-council enforces (see [Safety and
1006
+ privacy](#safety-and-privacy)). A fixed scaffolding text appended to
1007
+ the system prompt (identical for all agents, the consolidator
1008
+ included) tells agents not to modify project files, git state,
1009
+ software, or configuration, or start persistent services (they get a
1010
+ scratch directory for temporary files), and not to run tests, builds,
1011
+ or similar commands, which can collide between concurrent analysts,
1012
+ unless the prompt permits them (as
742
1013
  `examples/prompts/review-latest-commit-prompt.md` does for tests and
743
1014
  linters); where such a command isn't permitted but would help, the
744
1015
  agent describes what it would run instead. The full text is
745
- `scaffold_text` in `lib/agent_council/harnesses/pi_harness.rb`;
1016
+ `scaffold_text` in `lib/agent_council/harnesses/scaffold.rb`;
746
1017
  [`DESIGN.md`](DESIGN.md) §10 explains the rules.
747
- - Each agent gets its own disposable temp directory (exposed via `TMPDIR`
748
- and named in the scaffolding), deleted after the run. After Ctrl-C, a
749
- directory can be left behind if a second signal stops agent-council at
750
- once, or if cleanup after a killed agent doesn't finish in time.
751
- - Otherwise pi behaves normally: it loads context files such as
752
- `AGENTS.md` and `CLAUDE.md` as in any pi run, and the analyzed repo's
753
- `.pi` project resources only if pi already trusts the project
754
- (agent-council passes no `--approve`). See
755
- [pi's documentation][pi-docs] for what loads from where.
756
- - The final response is read from pi's JSONL event stream. pi exits 0
757
- even when the provider rejects the request (e.g. Copilot's
758
- `model_not_available_for_integrator`) or the output is cut off;
759
- agent-council detects these in the event stream and reports them as
760
- failures, not reports. [`DESIGN.md`](DESIGN.md) §13 has the details.
1018
+ - Each agent gets its own disposable temp directory, as its `TMPDIR`,
1019
+ which the scaffolding tells it to use for scratch space, deleted when
1020
+ the agent finishes (under Claude Code's sandbox, `TMPDIR` is a directory Claude
1021
+ Code makes inside it; see [Claude Code's
1022
+ sandbox](#claude-codes-sandbox)). After Ctrl-C, a directory can be
1023
+ left behind if a second signal stops agent-council at once, or if
1024
+ cleanup after a killed agent doesn't finish in time.
761
1025
 
762
1026
  ## Safety and privacy
763
1027
 
764
- agent-council does not sandbox the agents. Before running it, know that:
765
-
766
- - **Agents have a shell.** Each agent, the consolidator included, gets pi's
767
- `bash` tool, running as you, in the directory you run from, with your
768
- environment (including any API keys in it; agent-council only sets
769
- `TMPDIR`), your file permissions, and your network access. Of pi's
770
- built-in tools, only `edit` and `write` (and the Windows-only
771
- `powershell`) are withheld. The read-only rules described above are
772
- instructions in the system prompt, which a model can ignore or misapply.
773
- - **MCP servers still start.** agent-council doesn't pass `--no-mcp`,
774
- so pi starts or connects the MCP servers you have configured for every
775
- agent, as you. Their tools can't be called (tested with pi 1.4.0):
776
- the `--tools` allowlist names none of them, nor pi's `codemode` and
777
- `tool_search` tools, which reach them indirectly. A server that does
778
- something merely by starting still does it.
1028
+ agent-council does not sandbox the agents (Claude Code's own sandbox,
1029
+ off by default, restricts Claude Code agents' commands if Claude
1030
+ Code's settings enable it, and the analyzed repository's settings can
1031
+ enable or disable it; see
1032
+ [Claude Code's sandbox](#claude-codes-sandbox)).
1033
+ Before running it, know that:
1034
+
1035
+ - **Agents have a shell.** Each agent, the consolidator included, gets a
1036
+ shell tool (pi's `bash`, or Claude Code's `Bash`), running as you, in
1037
+ the directory you run from, with your environment (including any API
1038
+ keys in it; agent-council only sets `TMPDIR` and `CLAUDE_CODE_TMPDIR`,
1039
+ both to the agent's scratch directory), your file permissions, and
1040
+ your network access (for Claude Code agents, unless its sandbox
1041
+ restricts writes and network access). Of pi's built-in tools, only
1042
+ `edit` and `write` (and the Windows-only `powershell`) are withheld;
1043
+ of Claude Code's, all but `Read`, `Grep`, `Glob`, and `Bash`. The
1044
+ read-only rules described above are instructions in the system prompt,
1045
+ which a model can ignore or misapply.
1046
+ - **Your pi extensions, and your Claude Code hooks and plugins, load.**
1047
+ `--no-mcp` turns off only pi's built-in
1048
+ MCP support. Extensions you've installed load for every pi agent, as
1049
+ you, and one that provides its own MCP support can still start servers.
1050
+ Your Claude Code hooks and plugins run for every Claude Code agent, as
1051
+ you, and so do hooks the analyzed repository's `.claude` settings
1052
+ define (see the next item). Agents also get Claude Code's auto memory
1053
+ for the project, so your memory notes go to their provider, and an
1054
+ agent may add or change a memory file (with `Bash`), as an
1055
+ interactive session may. `CLAUDE_CODE_DISABLE_AUTO_MEMORY=1` in the
1056
+ environment you run agent-council from turns auto memory off.
779
1057
  - **The analyzed repository can steer the agents.** Agents read the
780
- repository's files, and pi loads its context files (such as
781
- `AGENTS.md`) and, if the project is trusted, its `.pi` resources, so
782
- text in the repository can try to direct what the agents run (prompt
783
- injection). Prompts that permit tests,
784
- such as `examples/prompts/review-latest-commit-prompt.md`, run the
785
- project's own code.
1058
+ repository's files, and the harness loads the repository's context
1059
+ files and settings: pi its context files (such as `AGENTS.md`) and, if
1060
+ the project is trusted, its `.pi` resources; Claude Code its
1061
+ `CLAUDE.md` files and `.claude` settings, which apply without the
1062
+ trust prompt an interactive session would show first (their hooks,
1063
+ for one, run commands; checked). So the repository can direct what
1064
+ runs: its text by prompt injection, and its hooks by running commands
1065
+ of their own, whatever the agent does. To run Claude Code agents
1066
+ without customizations, whether the repository's or yours (hooks,
1067
+ plugins, skills, and the like), set `CLAUDE_CODE_SAFE_MODE=1` in the
1068
+ environment you run agent-council from. Permission rules and admin-managed settings still apply. It also
1069
+ skips `CLAUDE.md` files, so agents no longer see the project's own
1070
+ instructions. Prompts that permit tests, such as
1071
+ `examples/prompts/review-latest-commit-prompt.md`, run the project's
1072
+ own code.
786
1073
  - **Your code goes to every configured provider.** Whatever an agent reads,
787
- and the output of whatever it runs, is sent to that agent's provider. The
1074
+ and the output of whatever it runs, is sent to that agent's provider
1075
+ (for a Claude Code agent, wherever your `claude` sends it: Anthropic,
1076
+ unless it is set up for another). The
788
1077
  consolidator's provider receives the prompt and all reports, plus
789
1078
  anything the consolidator itself reads or runs. Check those providers'
790
1079
  data policies before analyzing private code.
@@ -797,10 +1086,69 @@ Run agent-council only on repositories you trust, or inside a container, VM,
797
1086
  or disposable checkout that holds no credentials you aren't willing to
798
1087
  expose.
799
1088
 
1089
+ ### Claude Code's sandbox
1090
+
1091
+ agent-council doesn't turn Claude Code's sandbox on or off: Claude
1092
+ Code's settings decide (`sandbox.enabled`, off by default), as in an
1093
+ interactive session, including settings committed to the analyzed
1094
+ repository, which can enable it or disable one you enabled (only
1095
+ `--settings` or managed settings take precedence over them). When it's
1096
+ enabled, Claude Code agents' `Bash` commands run in it, except those
1097
+ matching `sandbox.excludedCommands`, which run outside it, and to which
1098
+ the analyzed repository's settings can add (not checked). The points
1099
+ below are from Claude Code's [sandboxing
1100
+ docs](https://code.claude.com/docs/en/sandboxing) unless marked as
1101
+ checked; most apply on any platform, the last two were checked on Linux.
1102
+
1103
+ - **It doesn't protect the repository.** The working directory, which is
1104
+ the analyzed repository, stays writable, apart from protected files
1105
+ such as the `.claude` settings files and `.git/hooks`. In a check
1106
+ (Claude Code 2.1.325, with the sandbox's other settings at their
1107
+ defaults), it blocked network access and writes to the home directory
1108
+ outside the working directory; reads weren't checked.
1109
+ - **An agent's request to run a command outside it was refused.** Claude
1110
+ Code's docs say an allow rule matching a command also approves an
1111
+ unsandboxed retry without a prompt, but in a check (Claude Code
1112
+ 2.1.327) with agent-council's options, the retry was refused, and
1113
+ Claude Code reported the refusal, which agent-council shows as a
1114
+ warning. To disable such retries altogether, set
1115
+ `sandbox.allowUnsandboxedCommands` to `false` in your user settings
1116
+ (the analyzed repository's settings could otherwise override it). This
1117
+ doesn't affect `sandbox.excludedCommands`.
1118
+ - **The scratch directory itself isn't writable.** Inside the sandbox,
1119
+ Claude Code points `TMPDIR` at a directory of its own inside
1120
+ agent-council's scratch directory (agent-council sets
1121
+ `CLAUDE_CODE_TMPDIR` so that it is). In a check (2.1.327), writes under
1122
+ `$TMPDIR` worked, but writes to the scratch directory's own path
1123
+ failed ("read-only file system"). The scaffolding sends agents to
1124
+ `$TMPDIR`, not to that path, so this only matters to an agent that
1125
+ finds the path some other way.
1126
+ - **agent-council doesn't notice other sandbox trouble.** When the
1127
+ sandbox can't start, commands run unsandboxed unless
1128
+ `sandbox.failIfUnavailable` is `true`; an agent whose commands fail or
1129
+ run unsandboxed is still reported like any other.
1130
+ - **Every `Bash` call failed** in a check on Ubuntu, whose AppArmor
1131
+ restricts unprivileged user namespaces, with a `setgroups` error from
1132
+ the distribution's `/usr/bin/bwrap` (bubblewrap, which runs the
1133
+ sandbox on Linux, alongside `socat`). The docs' fixes are an AppArmor
1134
+ profile for `/usr/bin/bwrap` or a sysctl. A copy of `bwrap` elsewhere
1135
+ with its own such profile also worked. Claude Code runs the first
1136
+ `bwrap` on the `PATH` it inherits, and agent-council runs `claude`
1137
+ directly, not through your shell, so a shell alias or function doesn't
1138
+ reach agents: put the working `bwrap`'s directory first on `PATH` in
1139
+ the environment you run agent-council from.
1140
+ - **Commands ran unsandboxed** in a check where a socket path under the
1141
+ temporary directory exceeded the Unix limit of about 108 bytes.
1142
+ agent-council sets each agent's `TMPDIR` and `CLAUDE_CODE_TMPDIR` to a
1143
+ scratch directory inside your own temporary directory (from `TMPDIR`,
1144
+ `TMP`, or `TEMP`, else `/tmp`), which adds about 36 bytes, so keep
1145
+ yours short, e.g. `TMPDIR=/tmp agent-council ...`. A
1146
+ `CLAUDE_CODE_TMPDIR` of your own doesn't reach agents.
1147
+
800
1148
  ## Limitations (deliberate)
801
1149
 
802
- No retries or timeouts of agent-council's own (pi itself may retry
803
- transient provider failures), no ranking
1150
+ No retries or timeouts of agent-council's own (the harnesses themselves
1151
+ may retry transient provider failures), no ranking
804
1152
  or scoring of reports
805
1153
  (beyond the optional consolidator's synthesis), no manifests or indexes —
806
1154
  the directory layout is the index. See [`DESIGN.md`](DESIGN.md) §18–19.
@@ -821,8 +1169,8 @@ its full path. Sample prompts such as `recommend-model-ensemble-prompt.md`
821
1169
  expect `pi-models` on your `PATH`; to use them from a checkout, add its
822
1170
  `exe/` directory (`export PATH="/path/to/agent-council/exe:$PATH"`).
823
1171
 
824
- Setup, tests, lint, the pre-commit hook, and the security audit are
825
- described in [`CONTRIBUTING.md`](https://github.com/keithrbennett/agent-council/blob/main/CONTRIBUTING.md)
1172
+ Setup, tests, lint, the pre-commit hook, checking CI status, and the
1173
+ security audit are described in [`CONTRIBUTING.md`](https://github.com/keithrbennett/agent-council/blob/main/CONTRIBUTING.md)
826
1174
  in the source repository. Before submitting a pull request, open an
827
1175
  issue and wait for explicit approval; `CONTRIBUTING.md` describes the
828
1176
  process.
@@ -840,7 +1188,8 @@ two ways:
840
1188
  (`--json`, for `jq`), or one `provider/id` per line (`--ids`, for shell
841
1189
  loops), and exits non-zero with a clear message if pi is missing or
842
1190
  fails. `pi-models -h` lists the options and the JSON fields. In a config
843
- entry, its `provider` is `provider` and its `id` is `model`.
1191
+ entry (with `harness: pi`), its `provider` is `provider` and its `id`
1192
+ is `model`.
844
1193
  - **Source.** `pi-models` asks pi over its RPC interface instead of running
845
1194
  `pi --list-models`, so its list can include models that
846
1195
  `pi --list-models` omits (e.g. extra `github-copilot` models), and those