agent-council 0.3.0 → 0.4.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 +92 -21
- data/INSTALL.md +8 -6
- data/README.md +232 -67
- data/RELEASE_NOTES.md +188 -110
- data/RUNAWAY_AGENTS.md +187 -9
- data/USE_CASES.md +1 -1
- data/examples/configs/mixed-harness.yml +14 -7
- data/examples/prompts/review-latest-commit-prompt.md +9 -0
- data/examples/prompts/review-pull-request-prompt.md +6 -0
- data/examples/prompts/test-coverage-analysis-prompt.md +56 -42
- data/exe/agent-council +3 -0
- data/exe/agent-council-ps +9 -0
- data/exe/pi-models +3 -33
- data/lib/agent_council/harnesses/claude_code_harness.rb +40 -60
- data/lib/agent_council/harnesses/codex_harness.rb +42 -89
- data/lib/agent_council/harnesses/harness.rb +185 -0
- data/lib/agent_council/harnesses/opencode_harness.rb +234 -0
- data/lib/agent_council/harnesses/pi_harness.rb +29 -59
- data/lib/agent_council/harnesses/scaffold.rb +3 -3
- data/lib/agent_council/harnesses.rb +11 -26
- data/lib/agent_council/pi_models.rb +40 -0
- data/lib/agent_council/plain_line.rb +24 -0
- data/lib/agent_council/platform.rb +2 -2
- data/lib/agent_council/progress_printer.rb +59 -0
- data/lib/agent_council/ps.rb +548 -0
- data/lib/agent_council/safe_stdout.rb +48 -0
- data/lib/agent_council/version.rb +1 -1
- data/lib/agent_council/worker_pool.rb +28 -15
- data/lib/agent_council.rb +157 -122
- metadata +12 -4
data/README.md
CHANGED
|
@@ -9,7 +9,8 @@ cost, and quality.
|
|
|
9
9
|
agent-council runs the **same analytical prompt** through each agent,
|
|
10
10
|
under the coding-agent harness each one names: the
|
|
11
11
|
[Pi](https://github.com/earendil-works/pi) harness, for any provider's
|
|
12
|
-
models; [
|
|
12
|
+
models; [OpenCode](https://opencode.ai/docs/cli), likewise for any
|
|
13
|
+
provider's; [Claude Code](https://code.claude.com/docs), for Anthropic's,
|
|
13
14
|
billed however your `claude` login is; or
|
|
14
15
|
[Codex](https://developers.openai.com/codex/cli), for OpenAI's, billed
|
|
15
16
|
however your `codex` login is. The agents can use any mix of
|
|
@@ -139,7 +140,7 @@ in detail.
|
|
|
139
140
|
[`pi` CLI](https://github.com/earendil-works/pi) (`pi --version`). See
|
|
140
141
|
[Prerequisites](#prerequisites), or [INSTALL.md](INSTALL.md) if you
|
|
141
142
|
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
|
+
run agents under OpenCode, Claude Code, or Codex as well, or instead (then
|
|
143
144
|
without pi), see [Choosing a harness](#choosing-a-harness).
|
|
144
145
|
2. **Set up credentials for at least one provider in pi** (see
|
|
145
146
|
[pi's documentation][pi-docs]), then list the models available to pi
|
|
@@ -227,9 +228,14 @@ consolidator, see
|
|
|
227
228
|
- for Codex: the [`codex` CLI](https://developers.openai.com/codex/cli)
|
|
228
229
|
(`codex --version`; tested with 0.167.0, and earlier versions may
|
|
229
230
|
lack flags agent-council passes), logged in with a ChatGPT plan or
|
|
230
|
-
an API key
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
an API key;
|
|
232
|
+
- for OpenCode: the [`opencode` CLI](https://opencode.ai/docs/cli)
|
|
233
|
+
(`opencode --version`; tested with 1.19.6; 1.2.4 ignores
|
|
234
|
+
`OPENCODE_DB`, so its agents' sessions would be saved to your
|
|
235
|
+
history), with credentials for at least one provider
|
|
236
|
+
(`opencode auth login`).
|
|
237
|
+
|
|
238
|
+
agent-council runs the `pi`, `opencode`, `claude`, and `codex` executables found on its
|
|
233
239
|
`PATH`, not your shell's aliases or functions of those names. If yours
|
|
234
240
|
add something, such as an environment variable or a directory on
|
|
235
241
|
`PATH`, set it in the environment you run agent-council from (for
|
|
@@ -241,7 +247,7 @@ consolidator, see
|
|
|
241
247
|
([INSTALL.md](INSTALL.md) has the steps). Windows drives are reachable
|
|
242
248
|
at `/mnt/c/...`, but file access there is much slower than in the Linux
|
|
243
249
|
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
|
|
250
|
+
log in to OpenCode, Claude Code, or Codex) inside WSL too; WSL doesn't share them
|
|
245
251
|
with Windows.
|
|
246
252
|
|
|
247
253
|
## Installation
|
|
@@ -282,16 +288,46 @@ AC_HOME=$(agent-council --gem-dir)
|
|
|
282
288
|
|
|
283
289
|
## Discovering and configuring models
|
|
284
290
|
|
|
291
|
+
Each harness has its own way to find the models it can use. pi,
|
|
292
|
+
OpenCode, and Codex list theirs:
|
|
293
|
+
|
|
285
294
|
```bash
|
|
286
|
-
pi
|
|
295
|
+
# pi: the models of the providers you have credentials for
|
|
296
|
+
pi --list-models
|
|
297
|
+
|
|
298
|
+
# OpenCode: its models, as provider/model
|
|
299
|
+
opencode models
|
|
300
|
+
opencode models opencode-go # only one provider's
|
|
301
|
+
opencode models --refresh # refresh its model catalog, then list
|
|
302
|
+
|
|
303
|
+
# Codex: its model names (slugs), leaving out the ones it marks hidden
|
|
304
|
+
codex debug models | jq -r '.models[] | select(.visibility != "hide") | .slug'
|
|
287
305
|
```
|
|
288
306
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
307
|
+
- **pi.** An entry's `provider` and `model` are a listed model's
|
|
308
|
+
`provider` and `model` columns. `pi --list-models` lists only the
|
|
309
|
+
models of providers pi has credentials for, not its whole catalog, so
|
|
310
|
+
a provider missing from it may just lack credentials. A listed model
|
|
311
|
+
can still be unusable, e.g. one your plan doesn't include.
|
|
312
|
+
Credentials, and which one pi uses when a provider has several, are
|
|
313
|
+
pi's business; see [pi's documentation][pi-docs].
|
|
314
|
+
- **OpenCode.** An entry's `provider` is the part of a listed name
|
|
315
|
+
before the first `/`, and its `model` the rest. OpenCode keeps a
|
|
316
|
+
cached catalog of models from models.dev; `--refresh` updates it
|
|
317
|
+
first, for a model too new to be listed. See [OpenCode's CLI
|
|
318
|
+
commands](https://opencode.ai/docs/cli/commands), and
|
|
319
|
+
`opencode models --help` for the options.
|
|
320
|
+
- **Codex.** `codex debug models` prints Codex's model catalog as JSON
|
|
321
|
+
(the `jq` command above picks out the names); a listed model's `slug`
|
|
322
|
+
is what an entry's `model` takes. The catalog is Codex's own models,
|
|
323
|
+
so with a custom `model_provider` in your Codex config, give the
|
|
324
|
+
names that provider takes instead. It's a debugging command, so its
|
|
325
|
+
output may change between Codex versions (this was checked with
|
|
326
|
+
0.171.0).
|
|
327
|
+
- **Claude Code.** `model` is an alias, such as `opus` or `sonnet`, or
|
|
328
|
+
a full model name; Claude Code's [Model
|
|
329
|
+
configuration](https://code.claude.com/docs/en/model-config) page
|
|
330
|
+
lists the aliases.
|
|
295
331
|
|
|
296
332
|
Edit the config to choose the ensemble. The config is the optional second
|
|
297
333
|
argument; if omitted, `./agent-council.yml` in the current directory is used
|
|
@@ -327,7 +363,7 @@ agent, and the consolidator, needs nonblank string `harness`,
|
|
|
327
363
|
`provider`, and `model` values (quote any value YAML would read as
|
|
328
364
|
something else, such as a number, a date, or `yes`). None has a default;
|
|
329
365
|
a 0.1.0 config needs `harness: pi` added to each entry. `harness` names
|
|
330
|
-
the harness the entry runs under, `pi`, `claude`, or `
|
|
366
|
+
the harness the entry runs under, `pi`, `claude`, `codex`, or `opencode`; an unknown name is
|
|
331
367
|
rejected at startup (with `--consolidate`, only the consolidator's,
|
|
332
368
|
since no analysts run). Other keys are ignored. A config error lists
|
|
333
369
|
every bad entry, named as in `'agents' entry #2` or `'consolidator'`,
|
|
@@ -335,7 +371,7 @@ with every problem it has.
|
|
|
335
371
|
|
|
336
372
|
More samples are in [`examples/configs/`](examples/configs/), which is
|
|
337
373
|
included in the installed gem; `mixed-harness.yml` mixes pi, Claude
|
|
338
|
-
Code, and
|
|
374
|
+
Code, Codex, and OpenCode agents. For scripts and agents,
|
|
339
375
|
[`pi-models`](#occasional-utility-pi-models) lists the models in
|
|
340
376
|
machine-readable forms.
|
|
341
377
|
|
|
@@ -378,7 +414,9 @@ consolidator:
|
|
|
378
414
|
```
|
|
379
415
|
|
|
380
416
|
- **Models.** `model` is any model name or alias `claude --model`
|
|
381
|
-
accepts
|
|
417
|
+
accepts (see [Discovering and configuring
|
|
418
|
+
models](#discovering-and-configuring-models)). Claude Code takes no
|
|
419
|
+
provider, so `provider` only labels the
|
|
382
420
|
agent: `anthropic`, or e.g. `bedrock` if your `claude` is set up to use
|
|
383
421
|
it.
|
|
384
422
|
- **Billing.** agent-council leaves authentication and billing to Claude
|
|
@@ -407,7 +445,7 @@ consolidator:
|
|
|
407
445
|
MCP call no rule allows, or one that a `permissions.deny` rule in your
|
|
408
446
|
settings or the project's forbids. The agent then carries on without
|
|
409
447
|
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
|
|
448
|
+
count of the rest) is printed under its finish line (the
|
|
411
449
|
consolidator's, under its result table), shown in the report's
|
|
412
450
|
metadata table (so the consolidator sees an analyst's too), and
|
|
413
451
|
recorded in `run.json`, since the report may lack what the call would
|
|
@@ -426,8 +464,10 @@ agents:
|
|
|
426
464
|
model: gpt-5.6-terra
|
|
427
465
|
```
|
|
428
466
|
|
|
429
|
-
- **Models.** `model` is any model name `codex --model` accepts
|
|
430
|
-
|
|
467
|
+
- **Models.** `model` is any model name `codex --model` accepts (`codex
|
|
468
|
+
debug models` lists them; see [Discovering and configuring
|
|
469
|
+
models](#discovering-and-configuring-models)). As with Claude Code,
|
|
470
|
+
`provider` only labels the agent: Codex uses the
|
|
431
471
|
`model_provider` its own config names.
|
|
432
472
|
- **Billing.** agent-council leaves authentication and billing to Codex:
|
|
433
473
|
an agent bills however `codex` would at your terminal, to your ChatGPT
|
|
@@ -446,13 +486,14 @@ agents:
|
|
|
446
486
|
what an agent can write is whatever your `sandbox_mode` allows (see
|
|
447
487
|
[Codex's sandbox](#codexs-sandbox)). The read-only rules are
|
|
448
488
|
given as `developer_instructions`, which replaces any your config sets.
|
|
449
|
-
- **Tools.**
|
|
450
|
-
|
|
451
|
-
Codex
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
since agent-council runs Codex with
|
|
455
|
-
which subagents need, so a Codex
|
|
489
|
+
- **Tools.** Codex agents keep Codex's whole built-in toolset,
|
|
490
|
+
including its file-editing tool (`apply_patch`) and its subagent
|
|
491
|
+
tools: this Codex version has no way to withhold them. (pi and Claude
|
|
492
|
+
Code agents get only read and shell tools, plus MCP tools, as
|
|
493
|
+
described here, and OpenCode agents lose their file-editing tools.)
|
|
494
|
+
The subagent tools fail, though, since agent-council runs Codex with
|
|
495
|
+
`--ephemeral` (no session files), which subagents need, so a Codex
|
|
496
|
+
agent works alone.
|
|
456
497
|
- **MCP tools need approval in your config.** Your MCP servers load (see
|
|
457
498
|
[Safety and privacy](#safety-and-privacy)), but `codex exec` never asks
|
|
458
499
|
for approval, so an agent's MCP tool call is refused unless your config
|
|
@@ -462,12 +503,72 @@ agents:
|
|
|
462
503
|
warning, recorded the same way as Claude Code's refused calls.
|
|
463
504
|
- **Outside a git repository.** Codex normally refuses to run outside one
|
|
464
505
|
it trusts; agent-council passes `--skip-git-repo-check`, so Codex agents
|
|
465
|
-
run wherever pi
|
|
506
|
+
run wherever pi, Claude Code, and OpenCode agents do.
|
|
466
507
|
- **Warnings.** Errors Codex reports without failing the agent (such as
|
|
467
508
|
missing metadata for a model name) are printed as one warning, and
|
|
468
509
|
failed MCP tool calls (such as those refused for lack of approval) as
|
|
469
510
|
another, each recorded the same way as Claude Code's refused calls.
|
|
470
511
|
|
|
512
|
+
An entry with `harness: opencode` runs under
|
|
513
|
+
[OpenCode](https://opencode.ai/docs/cli) (`opencode run`), which, like
|
|
514
|
+
pi, reaches many providers, so a council can compare one model under
|
|
515
|
+
both:
|
|
516
|
+
|
|
517
|
+
```yaml
|
|
518
|
+
agents:
|
|
519
|
+
- harness: opencode
|
|
520
|
+
provider: opencode-go
|
|
521
|
+
model: glm-5.3
|
|
522
|
+
- harness: pi
|
|
523
|
+
provider: opencode-go
|
|
524
|
+
model: glm-5.3
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
- **Models.** Unlike Claude Code's and Codex's, `provider` is passed:
|
|
528
|
+
the agent runs `--model <provider>/<model>`, so give a provider and a
|
|
529
|
+
model as `opencode models` lists them, split at the first `/` (see
|
|
530
|
+
[Discovering and configuring
|
|
531
|
+
models](#discovering-and-configuring-models)).
|
|
532
|
+
- **Billing.** agent-council leaves authentication and billing to
|
|
533
|
+
OpenCode: an agent uses the credentials `opencode auth login` saved.
|
|
534
|
+
Cost is OpenCode's estimate from its own model catalog (see
|
|
535
|
+
[How far to trust the cost](#how-far-to-trust-the-cost)).
|
|
536
|
+
- **Context.** Each agent runs as an interactive session started in your
|
|
537
|
+
project would: your OpenCode config, plugins, and MCP servers apply,
|
|
538
|
+
and so do the project's `AGENTS.md` files and `opencode.json`.
|
|
539
|
+
agent-council adds its settings through `OPENCODE_CONFIG_CONTENT`,
|
|
540
|
+
which OpenCode merges over your config and the project's (a value of
|
|
541
|
+
your own for it is replaced): the read-only rules, as an
|
|
542
|
+
`instructions` file, and the settings below.
|
|
543
|
+
- **Agent.** Agents run as OpenCode's `build` agent (`--agent build`),
|
|
544
|
+
whatever `default_agent` your config or the project's names.
|
|
545
|
+
- **Tools.** Editing is denied (`permission.edit: deny`, globally and
|
|
546
|
+
for `build`), which withholds OpenCode's file-editing tools; `bash`
|
|
547
|
+
and the rest stay, its subagent tool (`task`) included. This is a
|
|
548
|
+
default, not a guarantee: your config or the project's can allow
|
|
549
|
+
editing again (for `build` or for a subagent it defines), and `bash`
|
|
550
|
+
can write files regardless, as under every harness.
|
|
551
|
+
- **No session history.** Each agent's session goes to a database in
|
|
552
|
+
its scratch directory (`OPENCODE_DB`), deleted afterward, so it isn't
|
|
553
|
+
added to your history, as the other harnesses' sessions aren't.
|
|
554
|
+
Snapshots (OpenCode's undo) are turned off, so a run doesn't copy the
|
|
555
|
+
project's files, untracked ones included, into OpenCode's data
|
|
556
|
+
directory. OpenCode still writes its logs there.
|
|
557
|
+
- **Permissions that ask are refused.** `opencode run` can't ask, so a
|
|
558
|
+
tool call set to `ask`, by your permissions or OpenCode's defaults
|
|
559
|
+
(e.g. for files outside the project), is refused with a warning, and
|
|
560
|
+
the agent goes on without it (agent-council sets
|
|
561
|
+
`experimental.continue_loop_on_deny`). The agent's scratch directory
|
|
562
|
+
is allowed, so it can read what it puts in `$TMPDIR`. To let agents
|
|
563
|
+
make other such calls, allow them in your permissions. MCP tools need
|
|
564
|
+
no permission by default.
|
|
565
|
+
- **Usage.** OpenCode's title request is turned off (its usage isn't
|
|
566
|
+
reported). A subagent's usage isn't reported either, so an agent that
|
|
567
|
+
starts subagents reports less than it used.
|
|
568
|
+
- **A `.gitignore` in the project's `.opencode` directory.** If the
|
|
569
|
+
analyzed project has one, OpenCode writes a `.gitignore` there, as an
|
|
570
|
+
interactive session would.
|
|
571
|
+
|
|
471
572
|
## Running
|
|
472
573
|
|
|
473
574
|
```bash
|
|
@@ -578,7 +679,7 @@ agent-council \
|
|
|
578
679
|
- `examples/prompts/test-coverage-analysis-prompt.md` — a line-coverage
|
|
579
680
|
analysis organized by the logical parts of the system, with gaps ranked by
|
|
580
681
|
risk and a ready-to-use prompt for each recommended fix. It reads
|
|
581
|
-
SimpleCov's
|
|
682
|
+
SimpleCov's coverage data through
|
|
582
683
|
[cov-loupe](https://github.com/keithrbennett/cov-loupe) and runs no tests,
|
|
583
684
|
so run your full test suite first; it stops with an error if the coverage
|
|
584
685
|
data looks out of date.
|
|
@@ -594,16 +695,25 @@ Config: [default] /home/me/.agent-council.yml
|
|
|
594
695
|
Prompt: examples/prompts/review-latest-commit-prompt.md
|
|
595
696
|
Run Dir: agent-council-reports/2026-11-18/22-46-15
|
|
596
697
|
|
|
597
|
-
Review Agents (4):
|
|
698
|
+
Configured Review Agents (4):
|
|
598
699
|
#1 pi / deepseek / deepseek-flash
|
|
599
700
|
#2 pi / deepseek / deepseek-flash
|
|
600
701
|
#3 pi / openrouter / deepseek/deepseek-v4.1-flash-1017
|
|
601
702
|
#4 pi / openrouter / deepseek/deepseek-v4.1-flash-1017
|
|
602
703
|
|
|
603
|
-
Consolidator Agent:
|
|
704
|
+
Configured Consolidator Agent:
|
|
604
705
|
pi / anthropic / claude-sonnet-5-5
|
|
605
706
|
|
|
606
|
-
|
|
707
|
+
Run this in another terminal to see (sub)process statuses:
|
|
708
|
+
agent-council-ps 48200
|
|
709
|
+
|
|
710
|
+
Started Agents:
|
|
711
|
+
- pid 48211 #1 deepseek / deepseek-flash
|
|
712
|
+
- pid 48212 #2 deepseek / deepseek-flash
|
|
713
|
+
- pid 48214 #3 openrouter / deepseek/deepseek-v4.1-flash-1017
|
|
714
|
+
- pid 48216 #4 openrouter / deepseek/deepseek-v4.1-flash-1017
|
|
715
|
+
|
|
716
|
+
Finished Agents:
|
|
607
717
|
✓ 00:01:53 #3 openrouter / deepseek/deepseek-v4.1-flash-1017
|
|
608
718
|
✓ 00:02:31 #4 openrouter / deepseek/deepseek-v4.1-flash-1017
|
|
609
719
|
✓ 00:02:42 #2 deepseek / deepseek-flash
|
|
@@ -619,11 +729,14 @@ Reviews (in agent-council-reports/2026-11-18/22-46-15/reviews):
|
|
|
619
729
|
--- Reviews complete (4/4 succeeded; 4.9M in (4.7M cached) / 107.9k out, $0.18) ---
|
|
620
730
|
|
|
621
731
|
Consolidation Report (in agent-council-reports/2026-11-18/22-46-15):
|
|
732
|
+
- pid 48390 anthropic / claude-sonnet-5-5
|
|
622
733
|
Ok Duration Agent In Cached Out Cost
|
|
623
734
|
✓ 00:00:17 anthropic / claude-sonnet-5-5 11.7k 0 2.2k $0.05
|
|
624
735
|
```
|
|
625
736
|
|
|
626
|
-
|
|
737
|
+
Each agent gets a line under `Started Agents:` as it starts, with its
|
|
738
|
+
process ID, and one under `Finished Agents:` as it finishes, with `✓` or
|
|
739
|
+
`✗`. Costs are the harness's
|
|
627
740
|
estimates and can be far off; see [How far to trust the
|
|
628
741
|
cost](#how-far-to-trust-the-cost). The files the run wrote are described
|
|
629
742
|
in [What you get](#what-you-get).
|
|
@@ -658,7 +771,9 @@ Ctrl-C (or SIGTERM, SIGHUP, or SIGQUIT) stops the run, keeping reports
|
|
|
658
771
|
already written:
|
|
659
772
|
|
|
660
773
|
- Running agents, the consolidator included, get SIGTERM (pi, Claude
|
|
661
|
-
Code, and Codex then also stop the commands they started
|
|
774
|
+
Code, and Codex then also stop the commands they started; OpenCode
|
|
775
|
+
doesn't, and didn't exit within the 5 seconds in a check with 1.19.6)
|
|
776
|
+
and a shared 5 seconds to exit before
|
|
662
777
|
they are killed. A killed agent can't stop the commands it started, so
|
|
663
778
|
those may keep running.
|
|
664
779
|
- A second SIGINT, SIGTERM, or SIGQUIT kills them at once; further SIGHUPs
|
|
@@ -676,7 +791,13 @@ agent-council has no time limit, so an agent that never finishes holds
|
|
|
676
791
|
up the run until you stop it. To stop a run automatically after a set
|
|
677
792
|
time, run it under the `timeout` command; [`RUNAWAY_AGENTS.md`](RUNAWAY_AGENTS.md)
|
|
678
793
|
explains how, the options to use and avoid, and why there's no
|
|
679
|
-
built-in limit yet.
|
|
794
|
+
built-in limit yet. It also explains how to [see what an agent is
|
|
795
|
+
doing](RUNAWAY_AGENTS.md#seeing-what-an-agent-is-doing) with
|
|
796
|
+
`agent-council-ps` (which the gem includes), including an example of
|
|
797
|
+
[asking a coding assistant to look
|
|
798
|
+
closer](RUNAWAY_AGENTS.md#asking-a-coding-assistant-to-look-closer),
|
|
799
|
+
and how to [stop one agent](RUNAWAY_AGENTS.md#stopping-one-agent) by
|
|
800
|
+
the process ID printed as it started, letting the others finish.
|
|
680
801
|
|
|
681
802
|
### Consolidating a finished run
|
|
682
803
|
|
|
@@ -833,7 +954,7 @@ agent-council-reports/
|
|
|
833
954
|
`<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,
|
|
834
955
|
and `<provider>` and `<model>` are sanitized like the query slug below,
|
|
835
956
|
but keep their case. `<harness>` is the agent's (or consolidator's)
|
|
836
|
-
`harness` config value, `pi`, `claude`, or `
|
|
957
|
+
`harness` config value, `pi`, `claude`, `codex`, or `opencode` (see
|
|
837
958
|
[Choosing a harness](#choosing-a-harness)).
|
|
838
959
|
`<agent-number>` is the agent's 1-based position in the config's
|
|
839
960
|
`agents` list (`01`, `02`, ...), so every report has a unique name even
|
|
@@ -894,12 +1015,15 @@ agent-council-reports/
|
|
|
894
1015
|
script's `models.classify` calls), as reported by the harness: `input` (excluding cached input),
|
|
895
1016
|
`cache_read`, `cache_write`, and `output` token counts, plus `cost` in
|
|
896
1017
|
US dollars when the harness could price the usage (pi uses its own price
|
|
897
|
-
table, so models missing from it have no cost;
|
|
1018
|
+
table, so models missing from it have no cost; OpenCode uses its own
|
|
1019
|
+
model catalog; Claude Code prices usage
|
|
898
1020
|
at Anthropic's API list prices; Codex prices nothing, so a Codex
|
|
899
1021
|
agent has no cost), recorded as the harness reports it,
|
|
900
1022
|
only rounded to six decimal places. It is an estimate, not what you're
|
|
901
1023
|
billed; see [How far to trust the cost](#how-far-to-trust-the-cost).
|
|
902
|
-
`usage` is `null` when the provider reports no usage.
|
|
1024
|
+
`usage` is `null` when the provider reports no usage. An OpenCode
|
|
1025
|
+
agent's `usage` leaves out its subagents' (see
|
|
1026
|
+
[Choosing a harness](#choosing-a-harness)).
|
|
903
1027
|
|
|
904
1028
|
`--consolidate` relies on the analysts' `prompt_file`, `config_file`,
|
|
905
1029
|
`run_stamp`, and `query`, and on `agent_index` to tell which configured
|
|
@@ -940,9 +1064,12 @@ agent-council-reports/
|
|
|
940
1064
|
Each run starts by printing its working directory (`Working Dir:`, which
|
|
941
1065
|
relative paths below are shown against), config, prompt, and run
|
|
942
1066
|
directory (`Run Dir: agent-council-reports/2026-09-03/09-14-02`), then
|
|
943
|
-
its agents under `Review Agents (N):` and, if
|
|
944
|
-
`Consolidator Agent:`; these labels also name the harness
|
|
945
|
-
(e.g. `#2 pi / openai / gpt-6.1-sol`).
|
|
1067
|
+
its agents under `Configured Review Agents (N):` and, if there is one,
|
|
1068
|
+
`Configured Consolidator Agent:`; these labels also name the harness
|
|
1069
|
+
(e.g. `#2 pi / openai / gpt-6.1-sol`). A line follows naming the
|
|
1070
|
+
`agent-council-ps` command, with the run's process ID, that shows what
|
|
1071
|
+
its agents are doing (see [Seeing what an agent is
|
|
1072
|
+
doing](RUNAWAY_AGENTS.md#seeing-what-an-agent-is-doing)).
|
|
946
1073
|
You can open the run dir while agents are still working, or after a
|
|
947
1074
|
Ctrl-C (see [Stopping a run](#stopping-a-run)). Other access patterns:
|
|
948
1075
|
|
|
@@ -955,11 +1082,16 @@ ls agent-council-reports/$(date +%F)/
|
|
|
955
1082
|
ls agent-council-reports/*/*/reviews/*codebase-review*
|
|
956
1083
|
```
|
|
957
1084
|
|
|
958
|
-
While the agents run, a `
|
|
959
|
-
agent as it
|
|
1085
|
+
While the agents run, a `Started Agents:` section prints a line per
|
|
1086
|
+
agent as it starts: `- pid`, its process ID (also the ID of its process
|
|
1087
|
+
group, so `kill -TERM -<pid>` stops that agent alone; see [Stopping one
|
|
1088
|
+
agent](RUNAWAY_AGENTS.md#stopping-one-agent)), and its label. A
|
|
1089
|
+
`Finished Agents:` section follows, with a line per agent as it
|
|
1090
|
+
finishes (held until every agent has started, so the sections don't
|
|
1091
|
+
mix): `✓` or `✗`, its duration, its label (e.g.
|
|
960
1092
|
`#2 openai / gpt-6.1-sol`) and, for a failure, the reason on the line
|
|
961
1093
|
below; any warnings about an agent (such as tool calls Claude Code
|
|
962
|
-
refused) follow as indented `Warning:` lines, under its
|
|
1094
|
+
refused) follow as indented `Warning:` lines, under its finish line or,
|
|
963
1095
|
for the consolidator, under its result row. When all reviews finish, a `Reviews` table shows which models
|
|
964
1096
|
succeeded, how long each took (`HH:MM:SS`) and their token usage in
|
|
965
1097
|
`In`, `Cached`, `Out`, and `Cost` columns (`In` counts cached input too;
|
|
@@ -973,8 +1105,8 @@ cost of the analysts whose cost is known follows, e.g. `; $0.12 for the 2 of 3 a
|
|
|
973
1105
|
a known cost`. The total notes `(from K of M agents)` when some reported no usage (as some
|
|
974
1106
|
providers don't). With a consolidator,
|
|
975
1107
|
the `Consolidation Report (in <run dir>):` heading (with
|
|
976
|
-
`--consolidate`, `(in <run dir>, from N review(s)):`) then prints
|
|
977
|
-
|
|
1108
|
+
`--consolidate`, `(in <run dir>, from N review(s)):`) then prints, then
|
|
1109
|
+
its `- pid` line as it starts, its result row when it finishes, and finally `--- Consolidation
|
|
978
1110
|
complete ---` (or `--- Consolidation error ---`). One model's failure
|
|
979
1111
|
does not affect the others. Exit status is 0 only if every analyst
|
|
980
1112
|
agent succeeded; the consolidator's result doesn't affect it.
|
|
@@ -994,22 +1126,27 @@ from per-token prices, not a bill, and it can be far off in either
|
|
|
994
1126
|
direction:
|
|
995
1127
|
|
|
996
1128
|
- **Subscriptions.** On a subscription or plan (a Claude Code login, a
|
|
997
|
-
Codex ChatGPT login, or a plan-based pi
|
|
1129
|
+
Codex ChatGPT login, or a plan-based pi or OpenCode provider such as
|
|
1130
|
+
`opencode-go`), the estimate is what the usage would cost
|
|
998
1131
|
at pay-per-token prices. What you actually pay for a run may be
|
|
999
1132
|
nothing extra, while the run uses up your plan's limits.
|
|
1000
1133
|
- **Price tables.** pi prices usage from its own price table, which may
|
|
1001
1134
|
not match what your provider charges (discounts, price changes, or
|
|
1002
1135
|
routing to a differently priced upstream), and a model missing from
|
|
1003
|
-
it gets no cost at all.
|
|
1136
|
+
it gets no cost at all. OpenCode likewise prices usage from its own
|
|
1137
|
+
model catalog. Claude Code prices usage at Anthropic's API
|
|
1004
1138
|
list prices. Codex prices nothing, so Codex agents have no cost, and
|
|
1005
1139
|
a run's total then has no cost; the console summary and `run.json`'s
|
|
1006
1140
|
`known_cost` give only the other agents' cost, and say how many those
|
|
1007
1141
|
are.
|
|
1008
|
-
- **Stopped agents.** An agent stopped by Ctrl-C (or another signal
|
|
1009
|
-
records no usage, though its provider still bills for
|
|
1010
|
-
and a run stopped before every analyst finished writes
|
|
1011
|
-
at all. A runaway agent stopped
|
|
1012
|
-
agent, is therefore missing from the totals
|
|
1142
|
+
- **Stopped agents.** An agent stopped by Ctrl-C (or another signal to
|
|
1143
|
+
agent-council) records no usage, though its provider still bills for
|
|
1144
|
+
what it used, and a run stopped before every analyst finished writes
|
|
1145
|
+
no `run.json` at all. A runaway agent stopped that way, the most
|
|
1146
|
+
expensive kind of agent, is therefore missing from the totals
|
|
1147
|
+
entirely. One stopped on its own (see [Stopping one
|
|
1148
|
+
agent](RUNAWAY_AGENTS.md#stopping-one-agent)) records only what its
|
|
1149
|
+
output had reported by then, which may be little or nothing.
|
|
1013
1150
|
- **Token counts.** Providers count tokens somewhat differently
|
|
1014
1151
|
(reasoning tokens, for example), so compare counts, and the costs
|
|
1015
1152
|
built on them, across providers only roughly.
|
|
@@ -1107,6 +1244,22 @@ usage page.
|
|
|
1107
1244
|
agent whose turn fails (say, a model your account can't use) is
|
|
1108
1245
|
reported with the reason Codex gives. [`DESIGN.md`](DESIGN.md) §13
|
|
1109
1246
|
has the details.
|
|
1247
|
+
- Under OpenCode, each agent runs as
|
|
1248
|
+
`opencode run --format json --agent build --model P/M`:
|
|
1249
|
+
- `OPENCODE_CONFIG_CONTENT`, merged over your config and the
|
|
1250
|
+
project's, adds the scaffolding as an `instructions` file and the
|
|
1251
|
+
settings listed under OpenCode in [Choosing a
|
|
1252
|
+
harness](#choosing-a-harness).
|
|
1253
|
+
- `OPENCODE_DB`, a database in the scratch directory, keeps agents
|
|
1254
|
+
independent: no session is added to your history.
|
|
1255
|
+
- No `--auto` is passed, so a tool call your permissions set to `ask`
|
|
1256
|
+
is refused, with a warning; `experimental.continue_loop_on_deny`
|
|
1257
|
+
lets the agent go on.
|
|
1258
|
+
- The final response is the text of the last message with text; an
|
|
1259
|
+
`error` event fails the agent, whatever the exit status, and so does
|
|
1260
|
+
a model request cut off or failed (by the token limit, a content
|
|
1261
|
+
filter, or an error) if it was the last one or the report's.
|
|
1262
|
+
[`DESIGN.md`](DESIGN.md) §13 has the details.
|
|
1110
1263
|
- The tool limits above are the only restrictions
|
|
1111
1264
|
agent-council enforces (see [Safety and
|
|
1112
1265
|
privacy](#safety-and-privacy)). A fixed scaffolding text appended to
|
|
@@ -1143,14 +1296,18 @@ Codex config's `sandbox_mode` sets, restricts Codex agents; see
|
|
|
1143
1296
|
Before running it, know that:
|
|
1144
1297
|
|
|
1145
1298
|
- **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
|
|
1299
|
+
shell tool (pi's and OpenCode's `bash`, Claude Code's `Bash`, or Codex's), running as you, in
|
|
1147
1300
|
the directory you run from, with your environment (including any API
|
|
1148
|
-
keys in it; agent-council only sets `TMPDIR
|
|
1149
|
-
|
|
1301
|
+
keys in it; agent-council only sets `TMPDIR`, to the agent's scratch
|
|
1302
|
+
directory, and, by harness, `CLAUDE_CODE_TMPDIR` (the same directory)
|
|
1303
|
+
or `OPENCODE_DB` and `OPENCODE_CONFIG_CONTENT`), your file
|
|
1304
|
+
permissions, and
|
|
1150
1305
|
your network access (for Claude Code agents, unless its sandbox
|
|
1151
1306
|
restricts writes and network access; for Codex agents, unless your
|
|
1152
1307
|
Codex config allows it, its sandbox blocks network access). Of pi's built-in tools, only
|
|
1153
1308
|
`edit` and `write` (and the Windows-only `powershell`) are withheld;
|
|
1309
|
+
of OpenCode's, the file-editing ones, unless your config or the
|
|
1310
|
+
project's allows them;
|
|
1154
1311
|
of Claude Code's, all but `Read`, `Grep`, `Glob`, and `Bash`; of
|
|
1155
1312
|
Codex's, none, so Codex agents also have its file-editing tool, and
|
|
1156
1313
|
only Codex's sandbox limits what they can write. The
|
|
@@ -1159,8 +1316,9 @@ Before running it, know that:
|
|
|
1159
1316
|
- **Agents get your MCP servers.** Every harness loads the MCP servers
|
|
1160
1317
|
it would load for you interactively, so agents can use their tools:
|
|
1161
1318
|
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
|
|
1319
|
+
if you trust the project; for Claude Code, those you've approved; for
|
|
1320
|
+
OpenCode, those its `opencode.json` names, without asking),
|
|
1321
|
+
those your pi extensions or your OpenCode, Claude Code, and Codex plugins
|
|
1164
1322
|
provide, and Codex's bundled apps connectors (GitHub and others). A
|
|
1165
1323
|
server that writes (posting to chat, commenting on an issue, changing a ticket or a database) is as
|
|
1166
1324
|
available to a pi agent as it is to you, and only the read-only
|
|
@@ -1171,10 +1329,11 @@ Before running it, know that:
|
|
|
1171
1329
|
an MCP tool only if your settings or config (or, for Claude Code, the
|
|
1172
1330
|
analyzed project's settings) already allow it, since
|
|
1173
1331
|
they can't ask (see [Choosing a harness](#choosing-a-harness)); pi
|
|
1174
|
-
agents can call any MCP tool pi gives them
|
|
1332
|
+
agents can call any MCP tool pi gives them, and OpenCode agents any
|
|
1333
|
+
that their permissions don't set to `ask` or `deny`. The read-only instructions
|
|
1175
1334
|
tell agents not to act outside the machine (post, comment, or change
|
|
1176
1335
|
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
|
|
1336
|
+
disable servers you don't want agents to have (in pi, OpenCode, Claude Code, or
|
|
1178
1337
|
Codex's own config, the analyzed project's, or the extension or
|
|
1179
1338
|
plugin that provides them; Codex's apps connectors are its `apps`
|
|
1180
1339
|
feature), or run in an environment without them.
|
|
@@ -1185,9 +1344,10 @@ Before running it, know that:
|
|
|
1185
1344
|
script passes it to any model pi has credentials for, billed to you
|
|
1186
1345
|
(its usage is counted in the agent's). The read-only instructions
|
|
1187
1346
|
don't limit it.
|
|
1188
|
-
- **Your pi extensions, your Claude Code hooks
|
|
1189
|
-
Codex skills, plugins, and trusted hooks, load.**
|
|
1190
|
-
Extensions you've installed load for every pi agent, as you
|
|
1347
|
+
- **Your pi extensions, your OpenCode plugins, your Claude Code hooks
|
|
1348
|
+
and plugins, and your Codex skills, plugins, and trusted hooks, load.**
|
|
1349
|
+
Extensions you've installed load for every pi agent, as you, and
|
|
1350
|
+
OpenCode plugins, yours and the project's, for every OpenCode agent.
|
|
1191
1351
|
Your Claude Code hooks and plugins run for every Claude Code agent, as
|
|
1192
1352
|
you, and so do hooks the analyzed repository's `.claude` settings
|
|
1193
1353
|
define (see the next item). Agents also get Claude Code's auto memory
|
|
@@ -1199,7 +1359,9 @@ Before running it, know that:
|
|
|
1199
1359
|
repository's files, and the harness loads the repository's context
|
|
1200
1360
|
files and settings: pi its context files (such as `AGENTS.md`) and, if
|
|
1201
1361
|
the project is trusted, its `.pi` resources; Codex its `AGENTS.md`
|
|
1202
|
-
files and, if you trust the project, its `.codex` config;
|
|
1362
|
+
files and, if you trust the project, its `.codex` config; OpenCode its
|
|
1363
|
+
`AGENTS.md` files and `opencode.json`, with no trust step (checked);
|
|
1364
|
+
Claude Code its
|
|
1203
1365
|
`CLAUDE.md` files and `.claude` settings, which apply without the
|
|
1204
1366
|
trust prompt an interactive session would show first (their hooks,
|
|
1205
1367
|
for one, run commands; checked). So the repository can direct what
|
|
@@ -1216,7 +1378,8 @@ Before running it, know that:
|
|
|
1216
1378
|
and the output of whatever it runs, is sent to that agent's provider
|
|
1217
1379
|
(for a Claude Code agent, wherever your `claude` sends it: Anthropic,
|
|
1218
1380
|
unless it is set up for another; for a Codex agent, wherever your
|
|
1219
|
-
`codex` sends it: OpenAI, unless its config names another provider
|
|
1381
|
+
`codex` sends it: OpenAI, unless its config names another provider;
|
|
1382
|
+
for an OpenCode agent, to its entry's provider). The
|
|
1220
1383
|
consolidator's provider receives the prompt and all reports, plus
|
|
1221
1384
|
anything the consolidator itself reads or runs. Check those providers'
|
|
1222
1385
|
data policies before analyzing private code.
|
|
@@ -1282,11 +1445,12 @@ checked; most apply on any platform, the last two were checked on Linux.
|
|
|
1282
1445
|
the environment you run agent-council from.
|
|
1283
1446
|
- **Commands ran unsandboxed** in a check where a socket path under the
|
|
1284
1447
|
temporary directory exceeded the Unix limit of about 108 bytes.
|
|
1285
|
-
agent-council sets each agent's `TMPDIR
|
|
1448
|
+
agent-council sets each agent's `TMPDIR`, and each Claude Code agent's
|
|
1449
|
+
`CLAUDE_CODE_TMPDIR`, to a
|
|
1286
1450
|
scratch directory inside your own temporary directory (from `TMPDIR`,
|
|
1287
1451
|
`TMP`, or `TEMP`, else `/tmp`), which adds about 36 bytes, so keep
|
|
1288
1452
|
yours short, e.g. `TMPDIR=/tmp agent-council ...`. A
|
|
1289
|
-
`CLAUDE_CODE_TMPDIR` of your own doesn't reach agents.
|
|
1453
|
+
`CLAUDE_CODE_TMPDIR` of your own doesn't reach Claude Code agents.
|
|
1290
1454
|
|
|
1291
1455
|
### Codex's sandbox
|
|
1292
1456
|
|
|
@@ -1322,7 +1486,8 @@ directory layout, and report front matter may change incompatibly before 1.0.
|
|
|
1322
1486
|
## Development
|
|
1323
1487
|
|
|
1324
1488
|
In a git checkout (the gemspec lists files with `git ls-files`),
|
|
1325
|
-
`./exe/agent-council
|
|
1489
|
+
`./exe/agent-council`, `./exe/agent-council-ps`, and `./exe/pi-models` are
|
|
1490
|
+
equivalent to the installed `agent-council`, `agent-council-ps`, and
|
|
1326
1491
|
`pi-models`. Agents analyze the working directory, so running
|
|
1327
1492
|
`./exe/agent-council` from the checkout analyzes agent-council itself; to
|
|
1328
1493
|
analyze another project, `cd` there and run the checkout's executable by
|