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