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.
data/RELEASE_NOTES.md CHANGED
@@ -1,5 +1,71 @@
1
1
  # Release Notes
2
2
 
3
+ ## 0.4.0 (2026-12-02)
4
+
5
+ - **A new command, `agent-council-ps`, shows what a run's agents are
6
+ doing.** Run it in another terminal when an agent is taking longer
7
+ than expected. It lists each running agent-council, then its agents,
8
+ identified by the process IDs it printed, with each agent's harness
9
+ (and model, except for pi), how long it has run, its CPU use, its
10
+ memory, and the commands it is running. `-w` refreshes it until
11
+ Ctrl-C. Runs started directly (including under RVM), from a checkout,
12
+ or with `bundle exec`, under MRI or JRuby, are listed. Each run (and
13
+ `--consolidate`) prints the command, with its process ID, before its
14
+ agents start. See "Seeing what an agent is doing" in
15
+ `RUNAWAY_AGENTS.md`, which also says which runs aren't listed and
16
+ shows a coding assistant diagnosing a slow agent from its output.
17
+ - **Agents' process IDs are printed as they start, and several headings
18
+ are renamed.** Each process ID goes on a `- pid` line under a new
19
+ `Started Agents:` heading (or, for the consolidator, under its
20
+ `Consolidation Report` heading), so a running agent can be found, or
21
+ stopped while the others go on: see "Stopping one agent" in
22
+ `RUNAWAY_AGENTS.md`. The lines printed as agents finish, once under
23
+ `Review Progress:`, now come under `Finished Agents:`, and the
24
+ configured agents are listed under `Configured Review Agents (N):`
25
+ and `Configured Consolidator Agent:`, not `Review Agents (N):` and
26
+ `Consolidator Agent:`.
27
+ - **A clearer message when a signal stops an agent.** It now reads,
28
+ e.g., `pi was stopped by SIGTERM`, not `pi exited : …`.
29
+ - **The lines printed while agents run now show at once when output
30
+ goes to a file or a pipe.** And if the pipe closes (e.g. `| head`),
31
+ the run goes on, discarding the rest of its output, rather than
32
+ ending and leaving its agents running.
33
+ - **A fourth harness: OpenCode.** An entry with `harness: opencode` runs
34
+ under the OpenCode CLI (`opencode run`, tested with 1.19.6), with the
35
+ provider and model the entry names and the credentials
36
+ `opencode auth login` saved. Like pi, it reaches many providers, so a
37
+ council can compare a model under both. See "Choosing a harness" in
38
+ the README.
39
+ - OpenCode agents run as an interactive session would: your OpenCode
40
+ config, plugins, and MCP servers apply, and so do the project's
41
+ `AGENTS.md` files and `opencode.json`. Through
42
+ `OPENCODE_CONFIG_CONTENT`, agent-council adds the read-only rules as
43
+ an `instructions` file, denies the edit permission (a default your
44
+ config or the project's can override), lets agents go on after a
45
+ refused tool call, and turns off snapshots; `OPENCODE_DB` keeps each
46
+ agent's session out of your history.
47
+ - Token usage and cost (OpenCode's estimate) are recorded, but
48
+ subagents' usage is missing from them.
49
+ - On Ctrl-C, OpenCode agents don't stop the commands they started
50
+ within the grace period, so those may keep running.
51
+ - **The review-latest-commit and review-pull-request sample prompts ask
52
+ agents to keep their test runs light**: the tests relevant to the
53
+ change rather than the whole suite, under one language version or
54
+ interpreter, not several, since several agents run at once on one
55
+ machine.
56
+ - **The review-latest-commit sample prompt respects `REVIEW_NOTES.md`.**
57
+ It tells agents not to report what that file, if the repository has
58
+ one, records as an accepted risk or non-issue, unless the
59
+ changes make it worse or its reasoning no longer holds.
60
+ - **The test-coverage-analysis sample prompt prefers the cov-loupe MCP
61
+ server**, now that agents get your MCP servers, and falls back to the
62
+ CLI when the server is unavailable or its calls are refused. It no
63
+ longer depends on a cov-loupe version: it describes each check by what
64
+ it shows and has the agent take cov-loupe's option and field names from
65
+ its help, tool schemas, and output. It's now based on cov-loupe's own
66
+ copy of the prompt; agents still give the report as their final
67
+ message.
68
+
3
69
  ## 0.3.0 (2026-11-20)
4
70
 
5
71
  - **Check before upgrading: agents now get your MCP servers.** Agents in
@@ -23,10 +89,10 @@
23
89
  `pi-models` still passes `--no-mcp`.
24
90
  - Claude Code agents' refused MCP calls are warnings, as other
25
91
  refused calls already were.
26
- - A third harness: an entry with `harness: codex` runs under the OpenAI
27
- Codex CLI (`codex exec`, tested with 0.167.0), billed however your
28
- `codex` login is (a ChatGPT plan or an API key). See "Choosing a
29
- harness" in the README.
92
+ - **A third harness: Codex.** An entry with `harness: codex` runs under
93
+ the OpenAI Codex CLI (`codex exec`, tested with 0.167.0), billed
94
+ however your `codex` login is (a ChatGPT plan or an API key). See
95
+ "Choosing a harness" in the README.
30
96
  - Codex agents run as an interactive session would: your Codex config
31
97
  applies, its `sandbox_mode` included, and so do the project's
32
98
  `AGENTS.md` files. `codex exec` never asks for approval, whatever
@@ -51,106 +117,117 @@
51
117
  total cost (`total_usage`'s `cost` in `run.json`) is left out when a
52
118
  Codex agent reported usage; see the known-cost item below.
53
119
  - `mixed-harness.yml` gains a Codex analyst.
54
- - `codemode`, which every pi agent now gets, MCP servers or not, gives
120
+ - **pi agents can call other models, and those calls are counted.**
121
+ `codemode`, which every pi agent now gets, MCP servers or not, gives
55
122
  scripts pi's `models` API (`models.classify`,
56
123
  `models.generateImages`), which can send what a script passes it to
57
124
  any model pi has credentials for, billed to you. pi agents' usage now
58
- includes what their tools report, so such calls are counted. See "pi
59
- agents can call other models" in the README's Safety section.
60
- - A run that mixes agents with and without a known cost (such as Codex
61
- agents, which have none) now shows the cost of the analysts whose
62
- cost is known in the console summary ("$1.00 for the 2 of 3 agents
63
- with a known cost"), and `run.json` records the same for every entry,
64
- consolidations included, as `known_cost` and `known_cost_runs`.
65
- - The scaffolding gains a rule: agents must not act outside the machine
66
- (post, comment, send messages, or change remote data) with any tool,
67
- MCP tools included. Reading remote information is still allowed.
125
+ includes what their tools report. See "pi agents can call other
126
+ models" in the README's Safety section.
127
+ - **Runs that mix agents with and without a known cost now show a
128
+ partial cost.** The console summary gives the cost of the analysts
129
+ whose cost is known, leaving out those, such as Codex agents, that
130
+ report none ("$1.00 for the 2 of 3 agents with a known cost"), and
131
+ `run.json` records the same for every entry, consolidations included,
132
+ as `known_cost` and `known_cost_runs`.
133
+ - **The scaffolding now tells agents not to act outside the machine**:
134
+ not to post, comment, send messages, or change remote data with any
135
+ tool, MCP tools included. Reading remote
136
+ information is still allowed.
68
137
 
69
138
  ## 0.2.0 (2026-11-19)
70
139
 
71
- - `--gem-dir` prints the root directory of the agent-council application,
72
- which holds its documentation and examples, and exits.
73
- - `--project-url` prints the project's GitHub URL and exits.
74
- - `code-review-agents.md`, a sample code-review ensemble, is removed;
75
- model offerings change too often to keep it current. To get a current
140
+ - **A new option, `--gem-dir`, prints the root directory of the
141
+ agent-council application and exits.** That directory holds its
142
+ documentation and examples.
143
+ - **A new option, `--project-url`, prints the project's GitHub URL and
144
+ exits.**
145
+ - **The sample code-review ensemble is removed.** Model offerings change
146
+ too often to keep `code-review-agents.md` current. To get a current
76
147
  recommendation, run `examples/prompts/recommend-model-ensemble-prompt.md`.
77
- - `USE_CASES.md`, a catalog of what agent-council can be used for, is
78
- added, and the README gains a "What makes a good fit" section.
79
- - Costs are now described as estimates (for pi agents, from pi's price
80
- table), not what you're billed. A new README section, "How far to
81
- trust the cost", says why they can be far off: subscription pricing,
82
- price tables, stopped agents recording no usage, and token counting.
83
- - A README section, "Claude Code's sandbox", covers Claude Code's own
84
- Bash sandbox, which Claude Code's settings turn on, and which the
85
- analyzed repository's settings can turn on or off: it leaves the
86
- repository writable, commands in `sandbox.excludedCommands` run
87
- outside it, an agent's request to run a command outside it was refused
88
- in a check, and agent-council doesn't notice other sandbox trouble. On
89
- Linux, a `bwrap` blocked by AppArmor makes every command fail (an
90
- alias can't fix it for agents), and a `TMPDIR` too long for the
91
- sandbox to start leaves commands unsandboxed by default.
92
- - The scaffolding tells agents to use `$TMPDIR` for scratch space
93
- instead of giving the scratch directory's path, which Claude Code's
94
- sandbox makes read-only (`$TMPDIR` is a writable directory inside it).
95
- The scaffolding is now identical for every agent. agent-council also
96
- sets each agent's `CLAUDE_CODE_TMPDIR` to its scratch directory, so
97
- the sandbox's `$TMPDIR` stays inside it, whatever your own setting.
98
- - The state-of-the-codebase and test-coverage-analysis sample prompts
99
- no longer tell agents to write their report to a file in the project;
100
- like the other samples, they deliver it as the final message, which
101
- agent-council saves. The state-of-the-codebase prompt no longer
102
- compares with earlier reports.
103
- - pi is now run with `--no-mcp`, both for agents and by `pi-models`, so
104
- the MCP servers configured for pi's built-in MCP support no longer
105
- start. Their tools were already unavailable to agents; a server that
106
- did something merely by starting no longer does it. An extension that
107
- provides its own MCP support isn't affected. This requires pi 1.0.4 or
108
- later.
109
- - The test-coverage-analysis sample prompt uses only the cov-loupe CLI,
110
- since agents have no MCP tools.
111
- - Agents and the consolidator can run under Claude Code, alongside pi
112
- agents in the same config: each entry's `harness` value names its
113
- harness, `pi` or `claude`, and an unknown name is rejected at startup
114
- (with `--consolidate`, only the consolidator's, since no analysts run).
115
- A Claude Code entry's `provider` only labels the agent. Claude Code
116
- agents bill however `claude` does at your terminal, to a subscription
117
- login or an API key; agent-council sets nothing for billing. Of Claude
118
- Code's built-in tools, agents get only `Read`, `Grep`, `Glob`, and
119
- `Bash`; they get no MCP servers, and they load `CLAUDE.md`, settings,
120
- hooks, plugins, and auto memory as an interactive session would,
121
- including the analyzed repository's own hooks. A tool call Claude Code
122
- refuses (e.g. under a `permissions.deny` rule) is reported as a warning,
123
- also shown in the report's metadata table (where the consolidator sees
124
- it) and recorded in `run.json`; the report is kept, and an agent that
125
- fails anyway still gets the warning. Only configs that use Claude Code
126
- need the `claude` CLI.
127
- - **Breaking:** every agent and consolidator entry must give `harness`,
128
- `provider`, and `model`; there are no defaults. To update a 0.1.0
129
- config, add `harness: pi` to each entry. To `--consolidate` a run made
130
- by 0.1.0, add `harness: pi` to the consolidator in the run's config
131
- copy; its reports and `run.json` are still read as pi's.
132
- - Config errors list every bad entry at once, each named by its key
133
- (e.g. `'agents' entry #2` or `'consolidator'`) with every problem it
134
- has (missing or blank keys, values that aren't strings, an unknown
135
- harness), and say what a misshapen `agents` list or entry is instead
136
- (e.g. a consolidator given as a list).
137
- - The startup header of a run and of `--consolidate` now begins with a
138
- `Working Dir:` line giving the working directory, which the relative
139
- paths after it are shown against. The labels after it are realigned to
140
- match.
141
- - `RUNAWAY_AGENTS.md` is added. agent-council has no time limit, and
142
- this explains why there isn't a built-in one yet and how to limit a
143
- whole run with the `timeout` command (with a shell function that
144
- wraps it), including its pitfalls: Ctrl-C needs `--foreground`, a
145
- limit that runs out too soon throws away work, and whether time asleep
146
- counts depends on the `timeout` you have.
147
- - The README shows a sample run's console output, in a new "What a run
148
- prints" section.
149
- - The review-latest-commit sample prompt has agents begin their report
150
- with the full hash and subject of the commit reviewed.
151
- - The docs and messages use "run" only for a whole agent-council run,
152
- and "agent" for one agent's part in it; e.g. a failure now reads
153
- "… exited 0 but the agent failed". `run.json` is unchanged.
148
+ - **A new catalog of use cases.** `USE_CASES.md` lists what
149
+ agent-council can be used for, and the README gains a "What makes a
150
+ good fit" section.
151
+ - **Costs are now described as estimates, not what you're billed.** For
152
+ pi agents, they come from pi's price table. A new README section, "How
153
+ far to trust the cost", says why they can be far off: subscription
154
+ pricing, price tables, stopped agents recording no usage, and token
155
+ counting.
156
+ - **A new README section, "Claude Code's sandbox".** It covers
157
+ Claude Code's own Bash sandbox, which Claude Code's settings turn on,
158
+ and which the analyzed repository's settings can turn on or off: it
159
+ leaves the repository writable, commands in
160
+ `sandbox.excludedCommands` run outside it, an agent's request to run
161
+ a command outside it was refused in a check, and agent-council
162
+ doesn't notice other sandbox trouble. On Linux, a `bwrap` blocked by
163
+ AppArmor makes every command fail (an alias can't fix it for agents),
164
+ and a `TMPDIR` too long for the sandbox to start leaves commands
165
+ unsandboxed by default.
166
+ - **Agents are told to use `$TMPDIR` for scratch space, not the scratch
167
+ directory's path, which Claude Code's sandbox makes read-only.**
168
+ Under that sandbox, `$TMPDIR` is a writable directory inside the
169
+ scratch directory; elsewhere, it is the scratch directory itself. The
170
+ scaffolding is now identical for every agent. agent-council also sets
171
+ each agent's `CLAUDE_CODE_TMPDIR` to its scratch directory, so the
172
+ sandbox's `$TMPDIR` stays inside it, whatever your own setting.
173
+ - **Two sample prompts no longer tell agents to write a report file
174
+ into the project, and one no longer compares with earlier reports.**
175
+ Like the other samples, the state-of-the-codebase and
176
+ test-coverage-analysis prompts now have agents deliver their report
177
+ as the final message, which agent-council saves. The comparison with
178
+ earlier reports is dropped from the state-of-the-codebase prompt.
179
+ - **pi is now run with `--no-mcp`, both for agents and by
180
+ `pi-models`.** The MCP servers configured for pi's built-in MCP
181
+ support therefore no longer start. Their tools were already
182
+ unavailable to agents; a server that did something merely by starting
183
+ no longer does it. An extension that provides its own MCP support
184
+ isn't affected. This requires pi 1.0.4 or later.
185
+ - **The test-coverage-analysis sample prompt uses only the cov-loupe
186
+ CLI**, since agents have no MCP tools.
187
+ - **A second harness: Claude Code.** Agents and the consolidator can run
188
+ under Claude Code, alongside pi agents in the same config: each
189
+ entry's `harness` value names its harness, `pi` or `claude`, and an
190
+ unknown name is rejected at startup (with `--consolidate`, only the
191
+ consolidator's, since no analysts run). A Claude Code entry's
192
+ `provider` only labels the agent. Claude Code agents bill however
193
+ `claude` does at your terminal, to a subscription login or an API key;
194
+ agent-council sets nothing for billing. Of Claude Code's built-in
195
+ tools, agents get only `Read`, `Grep`, `Glob`, and `Bash`; they get no
196
+ MCP servers, and they load `CLAUDE.md`, settings, hooks, plugins, and
197
+ auto memory as an interactive session would, including the analyzed
198
+ repository's own hooks. A tool call Claude Code refuses (e.g. under a
199
+ `permissions.deny` rule) is reported as a warning, also shown in the
200
+ report's metadata table (where the consolidator sees it) and recorded
201
+ in `run.json`; the report is kept, and an agent that fails anyway
202
+ still gets the warning. Only configs that use Claude Code need the
203
+ `claude` CLI.
204
+ - **Breaking: a 0.1.0 config needs `harness: pi` added to each
205
+ entry.** Every agent and consolidator entry must give `harness`,
206
+ `provider`, and `model`; there are no defaults. To `--consolidate` a
207
+ run made by 0.1.0, add `harness: pi` to the consolidator in the run's
208
+ config copy; its reports and `run.json` are still read as pi's.
209
+ - **Config errors are all reported at once.** They list every bad entry,
210
+ each named by its key (e.g. `'agents' entry #2` or `'consolidator'`)
211
+ with every problem it has (missing or blank keys, values that aren't
212
+ strings, an unknown harness), and say what a misshapen `agents` list
213
+ or entry is instead (e.g. a consolidator given as a list).
214
+ - **The startup header shows the working directory.** The header of a
215
+ run and of `--consolidate` now begins with a `Working Dir:` line, and
216
+ the relative paths after it are shown against that directory. The
217
+ labels after it are realigned to match.
218
+ - **A new guide to runaway agents.** agent-council has no time limit,
219
+ and `RUNAWAY_AGENTS.md` explains why there isn't a built-in one yet
220
+ and how to limit a whole run with the `timeout` command (with a shell
221
+ function that wraps it), including its pitfalls: Ctrl-C needs
222
+ `--foreground`, a limit that runs out too soon throws away work, and
223
+ whether time asleep counts depends on the `timeout` you have.
224
+ - **The README shows what a run prints.** A new section, "What a run
225
+ prints", gives a sample run's console output.
226
+ - **The review-latest-commit sample prompt has agents begin their
227
+ report with the full hash and subject of the commit reviewed.**
228
+ - **"Run" now means only a whole agent-council run.** The docs and
229
+ messages use "agent" for one agent's part in it; e.g. a failure now
230
+ reads "… exited 0 but the agent failed". `run.json` is unchanged.
154
231
 
155
232
  ## 0.1.0 (2026-11-09)
156
233
 
@@ -176,14 +253,15 @@ The console shows token usage per agent and in total.
176
253
 
177
254
  ### Usage
178
255
 
179
- - Runs go under `./agent-council-reports`, or under the directory given
180
- with `-o` / `--output-dir`.
181
- - `--consolidate RUN_DIR` runs just the consolidation of a finished run,
182
- writing into that run directory.
183
- - `AGENT_COUNCIL_OPTS` holds arguments inserted before the command-line
184
- ones.
185
- - Sample prompts and configs are included under `examples/`.
186
- - The `pi-models` helper lists the provider/model pairs available to pi.
256
+ - **Runs go under `./agent-council-reports`**, or under the directory
257
+ given with `-o` / `--output-dir`.
258
+ - **`--consolidate RUN_DIR`** runs just the consolidation of a finished
259
+ run, writing into that run directory.
260
+ - **`AGENT_COUNCIL_OPTS`** holds arguments inserted before the
261
+ command-line ones.
262
+ - **Sample prompts and configs** are included under `examples/`.
263
+ - **The `pi-models` helper** lists the provider/model pairs available to
264
+ pi.
187
265
 
188
266
  ### Safety
189
267
 
@@ -193,11 +271,11 @@ the README before running it.
193
271
 
194
272
  ### Requirements
195
273
 
196
- - Ruby 3.3 or later, or JRuby 10 or later (where SIGQUIT is left to the
197
- JVM, so it doesn't stop a run).
198
- - The [pi](https://github.com/earendil-works/pi) CLI.
199
- - Native Windows is not supported; on Windows, run agent-council inside
200
- WSL.
274
+ - **Ruby 3.3 or later, or JRuby 10 or later** (where SIGQUIT is left to
275
+ the JVM, so it doesn't stop a run).
276
+ - **The [pi](https://github.com/earendil-works/pi) CLI.**
277
+ - **Native Windows is not supported**; on Windows, run agent-council
278
+ inside WSL.
201
279
 
202
280
  Install with `gem install agent-council`. New to Ruby? See
203
281
  [Install agent-council from scratch](INSTALL.md).
data/RUNAWAY_AGENTS.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  agent-council has no time limit of its own: a run lasts until every
4
4
  agent finishes. This document explains why, what can go wrong without
5
- one, and how to put a limit on a run yourself with the `timeout`
6
- command.
5
+ one, how to stop a runaway agent yourself, and how to put a limit on a
6
+ run with the `timeout` command.
7
7
 
8
8
  ## The problem
9
9
 
@@ -11,8 +11,8 @@ Now and then an agent doesn't finish. Its siblings finish in minutes,
11
11
  and it goes on for an hour or more, holding up the run (the
12
12
  consolidator starts only after every review agent has finished) and,
13
13
  on pay-per-token providers, running up cost. Its tokens and cost
14
- aren't in the run's totals if you stop it, since an interrupted agent
15
- records no usage (see [How far to trust the
14
+ aren't in the run's totals if you stop the run, since an interrupted
15
+ agent records no usage (see [How far to trust the
16
16
  cost](README.md#how-far-to-trust-the-cost)).
17
17
 
18
18
  The cause may be the particular model or provider: if one entry in
@@ -52,11 +52,189 @@ A limit is easy to write; a good default is not:
52
52
  wakes. Whether it counts depends on the clock the timer uses, which
53
53
  differs by operating system and, for the `timeout` command, by
54
54
  implementation (see below).
55
- - **Stopping one agent is more than ending a process.** The useful
56
- version would stop only the runaway, let the others finish, record
57
- the stopped agent as failed in `run.json`, and still consolidate.
58
- That's a real feature, worth building once it's clear what limit
59
- people actually need.
55
+
56
+ ## Seeing what an agent is doing
57
+
58
+ Before stopping an agent that is taking longer than expected, you can
59
+ check what it is doing with `agent-council-ps`, which the gem
60
+ installs next to `agent-council`. Run it in another terminal (each
61
+ run prints the command to use, with its process ID, before its agents
62
+ start); its list comes after a second, the time it measures CPU use
63
+ over:
64
+
65
+ ```
66
+ $ agent-council-ps
67
+ agent-council pid 48200, running 01:02:13, in /home/me/project
68
+ - pid 48211 pi running 01:02:10 cpu 00:03:12 (2% now) 210 MB
69
+ - pid 48212 pi running 01:02:10 cpu 00:01:40 (0% now) 190 MB
70
+ 48390 00:41:07 /bin/bash -c npm test
71
+ 48391 00:41:07 node node_modules/.bin/jest
72
+ ```
73
+
74
+ For each running agent-council, it shows the agent-council process's
75
+ ID, how long it has been running, and its working directory. Under that
76
+ it lists the agents the process is running, each by the process ID
77
+ agent-council printed when the agent started (under `Started Agents:`,
78
+ or for the consolidator, under its `Consolidation Report` heading).
79
+ For each agent it shows:
80
+
81
+ - its harness and, where the harness's command line shows it, its
82
+ model. pi replaces its command line with plain `pi`, so a pi agent's
83
+ line shows no model; match its process ID to the `Started Agents:`
84
+ line to see which agent it is.
85
+ - how long it has been running, its CPU time, its CPU use over the
86
+ last second (in watch mode, since the last refresh), and its memory.
87
+ - the processes it started that are still running, such as the
88
+ commands it runs and any MCP servers its harness started, with how
89
+ long each has been running.
90
+
91
+ Above, agent #2 has been waiting 41 minutes for a test run to finish.
92
+
93
+ - `-w` or `--watch` refreshes the list every 5 seconds until Ctrl-C.
94
+ To choose the interval, attach it: `-w30` or `--watch=30`. In
95
+ `-w 30`, 30 is taken for a process ID.
96
+ - Process IDs limit the list to the runs that have those IDs, or that
97
+ have agents with those IDs: `agent-council-ps 48212`.
98
+ - Several runs, including runs in the same directory, are listed
99
+ separately, each with its own agents. `agent-council-ps` doesn't show
100
+ each run's run dir, which can't be told reliably from outside the
101
+ process. The `Run Dir:` line that the run printed when it started
102
+ gives it.
103
+ - A run is recognized by its command: Ruby (MRI or JRuby) running a
104
+ script named exactly `agent-council`, or a process whose command
105
+ starts with that script, as Bundler retitles one. The installed
106
+ command (including under RVM, whose wrapper runs it, and under MRI
107
+ retitles it `ruby`, the script, and its arguments), a checkout's
108
+ `exe/agent-council`, and `bundle exec agent-council` all qualify. A
109
+ run started some other way, such as through a copy of the script
110
+ under another name, isn't listed.
111
+ - A run whose script's path has a space in it is listed only on Linux,
112
+ and not if it was retitled under MRI, by `bundle exec` or by RVM's
113
+ wrapper. (Installed gems' paths normally have none.)
114
+ - A process whose command's first word (split at spaces) is a path
115
+ whose last part is `agent-council` is taken for a run that Bundler
116
+ retitled. On Linux, that path must name an existing file; a relative
117
+ one is looked up from the run's working directory, which can't be
118
+ read for another user's run, so such a run isn't listed. On macOS,
119
+ where it would take an `lsof` to check, it needn't. So, say, a script
120
+ named `agent-council backup`, or a program in a directory named
121
+ `agent-council work`, is listed as a run on macOS, and on Linux too if
122
+ a file named `agent-council` is also in that directory.
123
+
124
+ What it can't show: it reads only what the operating system shows
125
+ (through `ps`, plus `/proc` on Linux and `lsof` on macOS), so it can't
126
+ see an agent's conversation with its model. Low CPU use is normal for
127
+ an agent waiting on its model. An agent that has no long-running
128
+ command, and whose sibling agents finished long ago, may be stuck in a
129
+ loop with its model, and only stopping it will end that; or it may be
130
+ working, only slowly. A coding assistant can help tell which.
131
+
132
+ ### Asking a coding assistant to look closer
133
+
134
+ `agent-council-ps` tells you which process to look at. A coding
135
+ assistant that can run shell commands, such as Claude Code, Codex,
136
+ OpenCode, or pi, can look further: paste that output and ask. For
137
+ example, one OpenCode agent reviewing a commit was still running after
138
+ 37 minutes, long after the others had finished:
139
+
140
+ ```
141
+ agent-council pid 2115363, running 00:37:28, in /home/me/project
142
+ - pid 2115386 opencode opencode-go / minimax-m3.1-flash running 00:37:28 cpu 00:00:59 (1% now) 487 MB
143
+ ```
144
+
145
+ Asked "What do you think is happening with this process?", Claude Code
146
+ ran six shell commands and answered (abridged):
147
+
148
+ > It isn't hung. It's working, just slowly, and the slowdown will get
149
+ > worse the longer it runs.
150
+ >
151
+ > - **No tool is running.** opencode has no child processes. It has one
152
+ > open HTTPS connection and is waiting on it. It's 27 turns into the
153
+ > session, and the latest model request started about 75 seconds
154
+ > before I checked. Low CPU is expected while it waits for the
155
+ > model's reply.
156
+ > - **Each turn is taking longer.** The first few turns took 3-12
157
+ > seconds each. They now take 2-2.5 minutes. The reason is shown in
158
+ > the token totals per turn:
159
+ >
160
+ > | step | total tokens | reasoning tokens |
161
+ > |------|--------------|------------------|
162
+ > | 1 | 11.7k | 0 |
163
+ > | 10 | 77k | 4.5k |
164
+ > | 20 | 187k | 14.4k |
165
+ > | 27 | 275k | 11.6k |
166
+ >
167
+ > The model re-reads all its previous turns (about 262k tokens,
168
+ > mostly cached) on every request. It also writes 10-17k tokens of
169
+ > reasoning [in each of the later turns], and most of the wait is
170
+ > that output being generated.
171
+ > - **It's reviewing in small steps.** It's running one-off commands
172
+ > like `rg -n "harness\." lib/agent_council.rb | head -20`. [...]
173
+ > each check costs a 2-minute turn.
174
+ > - [...]
175
+ >
176
+ > **Prognosis:** there's no sign it's close to done, and I can't tell
177
+ > how many more steps it will take. If you let it run, it will
178
+ > probably finish, but each new turn will be slower than the last.
179
+ > [...] This model, minimax-m3.1-flash, seems to suit this review
180
+ > prompt poorly. It has cost about $0.01 per step so far, so it's
181
+ > wasting time more than money.
182
+
183
+ An assistant can see the process, its children, and its connections
184
+ from the operating system, as for any agent. The turn-by-turn figures
185
+ are in the agent's session: while the agent runs, OpenCode keeps it in
186
+ a database in the agent's scratch directory, which is deleted when the
187
+ agent finishes. An assistant can find the database's path in the agent
188
+ process's environment, as `OPENCODE_DB`. (OpenCode 1.2.4 ignored
189
+ `OPENCODE_DB`, saving sessions to your history instead.) pi, Claude
190
+ Code, and Codex agents save no session, so for them an assistant can
191
+ see the process and the commands it runs, but not the conversation.
192
+
193
+ Having seen the diagnosis, you can stop the agent yourself (see
194
+ [Stopping one agent](#stopping-one-agent)) or ask the assistant to.
195
+
196
+ ## Stopping one agent
197
+
198
+ Each agent's process ID is printed under `Started Agents:` as it
199
+ starts (and `agent-council-ps` lists the running ones; see [Seeing what
200
+ an agent is doing](#seeing-what-an-agent-is-doing)):
201
+
202
+ ```
203
+ Started Agents:
204
+ - pid 48211 #1 deepseek / deepseek-flash
205
+ - pid 48212 #2 deepseek / deepseek-flash
206
+ ```
207
+
208
+ Each agent leads a process group with that ID, so this stops agent #2,
209
+ and the commands it started that are in its group, while the others go
210
+ on:
211
+
212
+ ```bash
213
+ kill -TERM -48212
214
+ ```
215
+
216
+ The stopped agent is listed under `Finished Agents:` as failed, with a
217
+ reason such as `pi was stopped by SIGTERM`, and the run goes on as
218
+ usual: it's recorded as failed in `run.json`, and the consolidator
219
+ still runs on the other agents' reports. Its usage is what its output
220
+ had reported by then, which may be little or nothing.
221
+
222
+ - **The commands it started.** pi, Claude Code, and Codex stop them on
223
+ SIGTERM. OpenCode doesn't, and may not exit at all (it didn't within
224
+ 5 seconds in a check with 1.19.6); `kill -KILL -48212` then stops it,
225
+ but not its commands, which run in process groups of their own and
226
+ are left running.
227
+ - **Its output.** agent-council waits for the agent's output to close,
228
+ so a process the agent started that kept it open keeps the run
229
+ waiting until that process exits too.
230
+ - **The consolidator.** Its process ID is printed under the
231
+ `Consolidation Report` heading as it starts, and it can be stopped the
232
+ same way. That fails the consolidation, which is recorded in
233
+ `run.json`. In a run that also ran the analysts, the exit status
234
+ doesn't change, since only the analysts decide it; under
235
+ `--consolidate`, where the consolidation is the run, it becomes 1.
236
+ `agent-council --consolidate RUN_DIR` runs it again (see
237
+ [Consolidating a finished run](README.md#consolidating-a-finished-run)).
60
238
 
61
239
  ## Limiting a run with `timeout`
62
240
 
data/USE_CASES.md CHANGED
@@ -110,7 +110,7 @@ saved.
110
110
  - Comparing providers serving the same model, on latency, price, and
111
111
  reliability.
112
112
  - Comparing harnesses running the same model (say, pi and Claude Code,
113
- or pi and Codex), on
113
+ pi and Codex, or pi and OpenCode, which can also share a provider), on
114
114
  speed, cost, and what they find.
115
115
  - Finding out which listed models your plan actually covers.
116
116
 
@@ -1,9 +1,10 @@
1
- # Sample mixed-harness ensemble: Claude Code and Codex analysts alongside pi
2
- # analysts, with a Claude Code consolidator. Claude Code and Codex entries run
3
- # under your own `claude` and `codex` setups and bill however they do (see
4
- # "Choosing a harness" in the README); pi entries need credentials for their
5
- # providers (see `pi --list-models`). Replace any provider or model you don't
6
- # have.
1
+ # Sample mixed-harness ensemble: Claude Code, Codex, and OpenCode analysts
2
+ # alongside pi analysts, with a Claude Code consolidator. Claude Code and Codex
3
+ # entries run under your own `claude` and `codex` setups and bill however they
4
+ # do (see "Choosing a harness" in the README); pi and OpenCode entries need
5
+ # credentials for their providers. Replace any provider or model you
6
+ # don't have; "Discovering and configuring models" in the README says
7
+ # how to find each harness's models.
7
8
  agents:
8
9
  - harness: claude
9
10
  provider: anthropic
@@ -17,10 +18,16 @@ agents:
17
18
  - harness: pi
18
19
  provider: openrouter
19
20
  model: z-ai/glm-5.3-flash
20
- # The same model under the other harness, to compare harnesses:
21
+ - harness: opencode
22
+ provider: opencode-go
23
+ model: glm-5.3
24
+ # The same models under another harness, to compare harnesses:
21
25
  - harness: pi
22
26
  provider: anthropic
23
27
  model: claude-opus-5-5
28
+ - harness: pi
29
+ provider: opencode-go
30
+ model: glm-5.3
24
31
 
25
32
  consolidator:
26
33
  harness: claude