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