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/DESIGN.md CHANGED
@@ -4,11 +4,11 @@
4
4
 
5
5
  The long-term goal is to collect genuinely different viewpoints on the same question from multiple harness/model instances, and, because every instance gets the identical task, to compare those instances against each other on speed, token usage, cost, and quality.
6
6
 
7
- This repository is the first step: it varies the models and, per agent, the harness, which is Pi (for any provider's models), Claude Code (for Anthropic's), or Codex (for OpenAI's). More harnesses may follow (§18).
7
+ This repository is the first step: it varies the models and, per agent, the harness, which is Pi or OpenCode (for any provider's models), Claude Code (for Anthropic's), Codex (for OpenAI's), or Google Antigravity (for models served through `agy`, including Gemini, Claude, and GPT models). More harnesses may follow (§18).
8
8
 
9
9
  It is packaged as a gem for easy installation, but it is intentionally not a general-purpose framework.
10
10
 
11
- agent-council is a small Ruby CLI that runs the **same prompt** through several AI harness/provider/model combinations, under the Pi, Claude Code, or Codex coding-agent harness, and saves each final response to a deterministic Markdown file.
11
+ agent-council is a small Ruby CLI that runs the **same prompt** through several AI harness/provider/model combinations, under the Pi, OpenCode, Claude Code, Codex, or Antigravity coding-agent harness, and saves each final response to a deterministic Markdown file.
12
12
 
13
13
  The objective is utility, not completeness. Given a config (§5), one command:
14
14
 
@@ -62,9 +62,9 @@ For example:
62
62
 
63
63
  ## 4. Architecture
64
64
 
65
- There are three harnesses, pi, Claude Code, and Codex, and the orchestration is harness-agnostic: it looks up each agent's harness module by its config entry's `harness` key (§5) in `AgentCouncil::Harnesses::BY_NAME` (`lib/agent_council/harnesses.rb`), so another harness is another such module, added there. Every config entry names its harness (§5); reports and `run.json` entries always record theirs, and one that gives none (hand-edited, or older than 0.1.0, when every agent ran under pi) is read as pi's. Each module is a plain namespace with the same functions (`NAME`, `argv`, `usage`, `error_message`, `exit_detail`, `warnings`, `final_response`, `assistant_messages`); `NAME` is both the config value and the executable that `argv` runs, which the startup check looks for on `PATH`, and goes into filenames unsanitized, so it must be filename-safe. Claude Code and Codex take no provider argument, so their entries' provider only labels the agent. The scaffolding text (§10) is shared.
65
+ There are five harnesses, pi, Claude Code, Codex, OpenCode, and Antigravity, and the orchestration is harness-agnostic: it looks up each agent's harness class by its config entry's `harness` key (§5) in `AgentCouncil::Harnesses::BY_NAME` (`lib/agent_council/harnesses.rb`), so another harness is another such class, added there. Every config entry names its harness (§5); reports and `run.json` entries always record theirs, and one that gives none (hand-edited, or older than 0.1.0, when every agent ran under pi) is read as pi's. Each is a subclass of `AgentCouncil::Harnesses::Harness` (`lib/agent_council/harnesses/harness.rb`), used through class methods, never instantiated: it defines `NAME`, `argv`, `usage`, `error_message`, `final_response`, and `assistant_messages`, and inherits defaults for `env`, `stdin_data`, `exit_detail`, and `warnings` unless it overrides them, and for `model_label`, which reads an agent's provider and model back from its command line for `agent-council-ps`; `NAME` is both the config value and the executable that `argv` runs, which the startup check looks for on `PATH`, and goes into filenames unsanitized, so it must be filename-safe. In `Harness`, the methods a harness must define raise `NoMethodError`, as calling a missing method would, so a harness missing one fails only its agents, not the whole run. `env` gives the variables an agent's process needs beyond its `TMPDIR` (Claude Code's `CLAUDE_CODE_TMPDIR`, OpenCode's database and injected config, §11), each a String, and may write files into the scratch dir. `stdin_data` transforms the prompt bytes piped to stdin (by default unchanged; Antigravity wraps the prompt with the scaffolding as an NDJSON user message, §11). Claude Code, Codex, and Antigravity take no provider argument, so their entries' provider only labels the agent. The scaffolding text (§10) is shared.
66
66
 
67
- **Labels.** The short labels (`#1 provider / model`) don't show the harness. They appear in progress lines, result tables, the consolidation prompt, and a consolidated report's `### Sources` table and `sources` front matter. The startup agent list, each report's byline table, and the findings file's legend (`#1 pi / provider / model`) do show it. Short labels don't need the harness to stay unique: the only ones used as lookup keys are the analysts', which match reports to their `run.json` entries and to the configured agents, and each carries its agent number. Nor does the consolidator need it in the labels, since each report it reads states its harness in its byline (§12). So they stay as they are, and a mixed run's output reads the same as before.
67
+ **Labels.** The short labels (`#1 provider / model`) don't show the harness. They appear in the lines printed as agents start and finish, result tables, the consolidation prompt, and a consolidated report's `### Sources` table and `sources` front matter. The startup agent list, each report's byline table, and the findings file's legend (`#1 pi / provider / model`) do show it. Short labels don't need the harness to stay unique: the only ones used as lookup keys are the analysts', which match reports to their `run.json` entries and to the configured agents, and each carries its agent number. Nor does the consolidator need it in the labels, since each report it reads states its harness in its byline (§12). So they stay as they are, and a mixed run's output reads the same as before.
68
68
 
69
69
  The Ruby program owns orchestration and invokes the harness once per configured agent.
70
70
 
@@ -75,6 +75,8 @@ Ruby CLI
75
75
  +-- Pi + model B
76
76
  +-- Claude Code + model C
77
77
  +-- Codex + model D
78
+ +-- OpenCode + model E
79
+ +-- Antigravity + model F
78
80
  ```
79
81
 
80
82
  ---
@@ -113,9 +115,9 @@ consolidator: # optional; synthesizes the agents' reports (§12)
113
115
  model: MODEL_ID_HERE
114
116
  ```
115
117
 
116
- Every entry gives `harness`, `provider`, and `model`, each a nonblank string; there are no defaults, and no `defaults:` section supplying them (one was considered and rejected). A default harness or provider would go stale as harnesses change (pi is the right default only as long as it is), and a `defaults:` section's provider would apply across harnesses whose providers differ. `harness` is `pi`, `claude`, or `codex`; an unknown one is rejected at startup (with `--consolidate`, only the consolidator's, since no analysts run). A `claude` entry's provider is not passed to Claude Code (§4) and only labels the agent (e.g. `bedrock`, for a `claude` set up to use it); likewise a `codex` entry's, since Codex uses the `model_provider` its config names. A config error lists every bad entry, each named by its key (`'agents' entry #2`, `'consolidator'`) with every problem it has, so one edit fixes them all; when an entry gives no harness, a line saying what every entry needs follows, and, if no entry gives one (as in a 0.1.0 config, which ran everything under pi), a hint to add `harness: pi`. A run made by 0.1.0, when every entry ran under pi, has a config copy without `harness`; `--consolidate` rejects its consolidator like any other entry, with a hint to add `harness: pi`, while its reports and `run.json` are still read as pi's.
118
+ Every entry gives `harness`, `provider`, and `model`, each a nonblank string; there are no defaults, and no `defaults:` section supplying them (one was considered and rejected). A default harness or provider would go stale as harnesses change (pi is the right default only as long as it is), and a `defaults:` section's provider would apply across harnesses whose providers differ. `harness` is `pi`, `claude`, `codex`, `opencode`, or `agy`; an unknown one is rejected at startup (with `--consolidate`, only the consolidator's, since no analysts run). A `claude` entry's provider is not passed to Claude Code (§4) and only labels the agent (e.g. `bedrock`, for a `claude` set up to use it); likewise a `codex` entry's (since Codex uses the `model_provider` its config names) and an `agy` entry's. A config error lists every bad entry, each named by its key (`'agents' entry #2`, `'consolidator'`) with every problem it has, so one edit fixes them all; when an entry gives no harness, a line saying what every entry needs follows, and, if no entry gives one (as in a 0.1.0 config, which ran everything under pi), a hint to add `harness: pi`. A run made by 0.1.0, when every entry ran under pi, has a config copy without `harness`; `--consolidate` rejects its consolidator like any other entry, with a hint to add `harness: pi`, while its reports and `run.json` are still read as pi's.
117
119
 
118
- Exact provider and model identifiers must be verified against the installed harness: `pi --list-models` for pi, the names and aliases `claude --model` accepts for Claude Code, and the names `codex --model` accepts for Codex.
120
+ Exact provider and model identifiers must be verified against the installed harness: `pi --list-models` for pi, the names and aliases `claude --model` accepts for Claude Code, the names `codex --model` accepts for Codex (`codex debug models` lists those of its own catalog, not a custom `model_provider`'s), `opencode models` for OpenCode (whose `provider/model` names give an entry's `provider` before the first `/` and `model` after it; the harness joins them again for `--model`), and `agy models` for Antigravity (whose slugs already encode reasoning effort).
119
121
 
120
122
  They belong in configuration because available models and names change frequently.
121
123
 
@@ -144,6 +146,15 @@ document the arguments, options, and `AGENT_COUNCIL_OPTS`. The command:
144
146
  consolidation of a finished run, using the run dir's own prompt and
145
147
  config copies, found through its reports' front matter (§12).
146
148
 
149
+ `agent-council-ps` is a separate, read-only command for a run in
150
+ progress: it lists each running agent-council, its agents, and the
151
+ commands they are running, read from `ps` (and on Linux, `/proc`). It
152
+ runs outside agent-council and needs nothing from it beyond the process
153
+ tree (each agent is a child leading its own process group, §7), so it
154
+ can't see agents' event streams, and it doesn't try to find a run's run
155
+ dir. See
156
+ [RUNAWAY_AGENTS.md](RUNAWAY_AGENTS.md#seeing-what-an-agent-is-doing).
157
+
147
158
  ---
148
159
 
149
160
  ## 7. Parallel Execution
@@ -152,11 +163,12 @@ Agents run concurrently, one Ruby thread per agent, each driving one harness pro
152
163
 
153
164
  `AgentCouncil::WorkerPool` (`lib/agent_council/worker_pool.rb`) also handles signals, keeping the main thread free to take them. The README's [Stopping a run](README.md#stopping-a-run) section describes what Ctrl-C and the other signals do; the reasons behind that behavior are:
154
165
 
155
- - **Each agent leads its own process group**, so the terminal's signals reach only agent-council, which then stops the agents itself, in an orderly way, and Ctrl-Z suspends agent-council without suspending the agents under it.
156
- - **Agents get SIGTERM and a shared grace period before being killed**, so the harness can stop the commands it started (pi, Claude Code, and Codex do; checked for Codex 0.167.0: a running `sleep` was gone after `codex` got SIGTERM; checked for Claude Code 2.1.325: a command its Bash tool was running, in the foreground or with `run_in_background`, ran in a process group of its own, which agent-council's SIGTERM to the agent's group doesn't reach, and ended when `claude` got SIGTERM); a second signal skips the wait for a user who doesn't want to.
166
+ - **Each agent leads its own process group**, so the terminal's signals reach only agent-council, which then stops the agents itself, in an orderly way, and Ctrl-Z suspends agent-council without suspending the agents under it. It also lets the user stop one agent, by the pid printed as it starts (its group's ID), while the others go on: an agent so stopped is an ordinary failure, reported with the signal that stopped it (see [RUNAWAY_AGENTS.md](RUNAWAY_AGENTS.md#stopping-one-agent)).
167
+ - **Agents get SIGTERM and a shared grace period before being killed**, so the harness can stop the commands it started (pi, Claude Code, Codex, and Antigravity do; OpenCode doesn't: checked for 1.19.6, a running `sleep`, in a process group of its own, survived SIGTERM to the agent's group, and `opencode` was still running 5 seconds later, so it is killed and its command left running; checked for Codex 0.167.0: a running `sleep` was gone after `codex` got SIGTERM; checked for Claude Code 2.1.325: a command its Bash tool was running, in the foreground or with `run_in_background`, ran in a process group of its own, which agent-council's SIGTERM to the agent's group doesn't reach, and ended when `claude` got SIGTERM; checked for Antigravity 1.5.22: a running `sleep 60` ended when `agy` got SIGTERM, and `agy` emitted a terminal `result` event with `status: "ERROR"`, `error: "interrupted"`, and its token usage before exiting 1); a second signal skips the wait for a user who doesn't want to.
157
168
  - **agent-council then dies by the signal** rather than exiting normally, so a shell (e.g. one running it in a loop) sees it was killed and stops too. SIGQUIT exits 131 instead, since a core dump is no use here.
158
169
  - **Extra SIGHUPs are ignored**, since a closing terminal can send them in pairs, and **signals agent-council was started ignoring stay ignored**, so `nohup` works.
159
170
  - **SIGQUIT isn't trapped under JRuby**, where the JVM reserves it for thread dumps.
171
+ - **A stdout that can't be written doesn't end the run.** `main` sets `$stdout` to a `SafeStdout`, which discards output from the first write or flush that fails (a pipe whose reader has gone, as with `| head`, or a hung-up terminal). Dying would lose `run.json` and the consolidation and leave the agents running. Every write goes through it: MRI buffers, so it fails on a later flush (including the one it makes before spawning each agent), while JRuby fails on the write itself.
160
172
 
161
173
  There is no job system, daemon, async framework, or workflow engine.
162
174
 
@@ -171,7 +183,7 @@ agent-council does not:
171
183
  - ask models to identify themselves;
172
184
  - add model-specific output instructions.
173
185
 
174
- Execution metadata stays outside the substantive prompt: the scratch dir is referred to only as `$TMPDIR` in the system-prompt scaffolding, which is identical for every agent, and model identity is in the report's front matter.
186
+ Execution metadata stays outside the substantive prompt: the scratch dir is referred to only as `$TMPDIR` in the shared scaffolding (appended to the system prompt, or prepended to the user message for Antigravity, §11), which is identical for every agent, and model identity is in the report's front matter.
175
187
 
176
188
  ---
177
189
 
@@ -194,12 +206,12 @@ The harness is started with an argv array, not through a shell.
194
206
 
195
207
  Agents are analyzers, not modifiers.
196
208
 
197
- The scaffolding appended to each agent's system prompt (`Harnesses.scaffold_text` in `lib/agent_council/harnesses/scaffold.rb`, shared by every harness) states the rules agents get, and the README's [How it works](README.md#how-it-works-and-what-the-agents-are-told) section summarizes them. They are instructions, not enforced restrictions: each harness's tool limit (pi's `--tools` allowlist, which activates only the built-in, extension, and custom tools it lists, and the MCP tools that `codemode`, `tool_search`, and `mcp__*` reach, §11; Claude Code's `--tools`; Codex has none, §11) is the only restriction agent-council enforces (Claude Code's own sandbox can also restrict Claude Code agents if Claude Code's settings enable it, and the analyzed repository's settings can enable or disable it; Codex's sandbox restricts Codex agents as the user's Codex config sets it; §11), and the shell tool remains a full shell running as the user (see the README's [Safety and privacy](README.md#safety-and-privacy)). A shell is kept because investigation (`git log`, dependency inspection, running a documented command) is much of what makes an analysis useful.
209
+ The scaffolding appended to each agent's system prompt (or prepended to the user message for Antigravity, §11; `Harnesses.scaffold_text` in `lib/agent_council/harnesses/scaffold.rb`, shared by every harness) states the rules agents get, and the README's [How it works](README.md#how-it-works-and-what-the-agents-are-told) section summarizes them. They are instructions, not enforced restrictions: each harness's tool limit (pi's `--tools` allowlist, which activates only the built-in, extension, and custom tools it lists, and the MCP tools that `codemode`, `tool_search`, and `mcp__*` reach, §11; Claude Code's `--tools`; OpenCode's denied edit permission; Antigravity's `--settings` permission denials for `write_file(*)`, `execute_url(*)`, and `download_url(*)`; Codex has none, §11) is the only restriction agent-council enforces (Claude Code's own sandbox can also restrict Claude Code agents if Claude Code's settings enable it, and the analyzed repository's settings can enable or disable it; Codex's sandbox restricts Codex agents as the user's Codex config sets it; Antigravity's terminal sandbox restricts Antigravity shell commands if enabled in the user's `agy` config — `agent-council` does not pass `--sandbox`; §11), and the shell tool remains a full shell running as the user (see [CAUTIONS.md](CAUTIONS.md) and the README's [Safety and privacy](README.md#safety-and-privacy)). A shell is kept because investigation (`git log`, dependency inspection, running a documented command) is much of what makes an analysis useful.
198
210
 
199
211
  The rules follow from agents running concurrently in the user's own working tree:
200
212
 
201
213
  - **No modifying project files, git state, software, or configuration, and no persistent services**, since the agents analyze the user's real repository and environment, not a copy. If testing a proposed change would need a modified file, the agent should describe the experiment instead (this follows from the rule; the scaffolding doesn't state it separately).
202
- - **Each agent gets its own disposable scratch directory** (its `TMPDIR`, which the scaffolding names rather than giving a path: under Claude Code's sandbox the dir itself is read-only and `TMPDIR` is a writable dir inside it, §11; under Codex's `read-only` sandbox nothing is writable, `TMPDIR` included, so Codex agents then have no scratch space), so agents that need temporary files don't collide with each other or leave files in the project.
214
+ - **Each agent gets its own disposable scratch directory** (its `TMPDIR`, which the scaffolding names rather than giving a path: under Claude Code's sandbox the dir itself is read-only and `TMPDIR` is a writable dir inside it, §11; under Codex's `read-only` sandbox nothing is writable, `TMPDIR` included, so Codex agents then have no scratch space; OpenCode agents' database and scaffolding file go there too, §11), so agents that need temporary files don't collide with each other or leave files in the project.
203
215
  - **No acting outside the machine** (posting, commenting, sending messages, or changing issues, tickets, or other remote data), with any tool, since agents get the user's MCP servers (§11), some of which write, and a council would do it once per agent. Reading remote information stays allowed.
204
216
  - **No test suites, builds, coverage tools, application servers, or database tasks unless the prompt permits them**, since such commands can collide through shared resources a per-agent scratch directory doesn't isolate: shared databases, Redis, fixed ports, Docker resources, hard-coded temporary paths, or other process-global state. Running tests and reproducing defects can make an analysis much stronger, so a prompt may lift the rule (as `examples/prompts/review-latest-commit-prompt.md` does for tests and linters); agents then still skip commands needing shared services. Where a command is not permitted but would help, the agent describes what it would run and why.
205
217
 
@@ -244,7 +256,7 @@ claude -p --output-format stream-json --verbose
244
256
  The flags were checked with Claude Code 2.1.325, and again with 2.1.327 and 2.1.329 (and, for the comparison with pi's allowlist, pi 1.5.2):
245
257
 
246
258
  - `--tools` limits the built-in tools as pi's allowlist does: Edit and Write are absent, not merely refused.
247
- - `--allowedTools` is required. Without it, Bash commands Claude Code doesn't consider read-only (`git log` and `ls` are; `ruby -e ...` isn't) are refused, since `-p` mode can't ask, and the agent still ends as a success, with the refusal recorded only in the `result` event's `permission_denials`. With it, a call can still be refused, by a `permissions.deny` rule in the user's or the analyzed project's settings (checked: a project rule denying `Bash(cat:*)` was recorded the same way). A nonempty `permission_denials` is reported as a warning naming the refused calls (`ClaudeCodeHarness.warnings`), printed under the agent's progress line, shown in the report's byline table (which the consolidator reads, and which its template asks it to take into account), and recorded in its `run.json` entry, not a failure: the report is kept, but may lack what the call would have found. An agent that fails anyway (say, by running out of turns after refusals) gets the warning too, since the refusals may be why; it follows the failure reason on the console, in `run.json`, and in the reason the consolidation prompt gives for the missing report.
259
+ - `--allowedTools` is required. Without it, Bash commands Claude Code doesn't consider read-only (`git log` and `ls` are; `ruby -e ...` isn't) are refused, since `-p` mode can't ask, and the agent still ends as a success, with the refusal recorded only in the `result` event's `permission_denials`. With it, a call can still be refused, by a `permissions.deny` rule in the user's or the analyzed project's settings (checked: a project rule denying `Bash(cat:*)` was recorded the same way). A nonempty `permission_denials` is reported as a warning naming the refused calls (`ClaudeCodeHarness.warnings`), printed under the agent's finish line, shown in the report's byline table (which the consolidator reads, and which its template asks it to take into account), and recorded in its `run.json` entry, not a failure: the report is kept, but may lack what the call would have found. An agent that fails anyway (say, by running out of turns after refusals) gets the warning too, since the refusals may be why; it follows the failure reason on the console, in `run.json`, and in the reason the consolidation prompt gives for the missing report.
248
260
  - `--permission-mode manual` makes the outcome the same for every user; without it the user's own `defaultMode` (e.g. `auto`, or `plan`, which would run nothing) applies (checked: with `defaultMode` set to `plan`, the `init` event reports `plan` without the flag and `default` with it). `manual` is the name `claude --help` lists for the mode the stream reports as `default`; `default` is still accepted but no longer listed, so it isn't used.
249
261
 
250
262
  **Context.** Claude Code behaves as in an interactive session started in the analyzed repository, as pi does (above): it loads `CLAUDE.md` (and whatever it imports, such as `@AGENTS.md`), user and project settings, hooks, and plugins, and its auto memory for the project. Auto memory is kept deliberately (checked: the system prompt names the project's memory directory, shows its `MEMORY.md` index, and says to write memory files there; `CLAUDE_CODE_DISABLE_AUTO_MEMORY=1` removes all of it): the notes are context an interactive session would have, and leaving them out would make agents worse at the user's project. An agent may still write a memory file with `Bash`, as an interactive session may (the scaffolding's "strictly read-only" rules argue against it, but don't name memory); that is accepted, and the README says so. `--bare` is not used: it skips `CLAUDE.md` and permits only API-key authentication. Nor is `--safe-mode`, which keeps subscription authentication but also skips `CLAUDE.md`, along with skills, plugins, hooks, and other customizations (permission rules and admin-managed settings still apply); nor is `--restricted`, which ignores the user, project, and local settings files altogether, permission rules included, and so would drop both the user's own setup and a project's deny rules (untested); a user who wants that can set `CLAUDE_CODE_SAFE_MODE=1` (its environment form) when running agent-council, and the README's Safety section says so (checked: with it, a project's hooks didn't run and a subscription login still worked). So the user's hooks and plugins run for every Claude Code agent, and so do hooks in the analyzed repository's own `.claude` settings: `-p` mode skips the trust prompt an interactive session shows first in a new folder (checked: a never-trusted repository's `SessionStart` and `PreToolUse` hooks ran). The README's Safety section says so.
@@ -258,7 +270,7 @@ The flags were checked with Claude Code 2.1.325, and again with 2.1.327 and 2.1.
258
270
  - Checked with 2.1.327, with agent-council's argv and the sandbox enabled: inside the sandbox `TMPDIR` is `<scratch>/claude-<uid>`, which is writable, while a write to the scratch path itself fails with "read-only file system". So the scaffolding names the scratch dir as `$TMPDIR`, not by path; `$TMPDIR` is the scratch dir itself for pi and unsandboxed Claude Code, and a dir inside it under the sandbox, so cleanup covers both. The sandbox makes that dir under `CLAUDE_CODE_TMPDIR` if set, so agent-council sets it to the scratch dir too; otherwise a user's own setting would put the dir outside, shared between agents and never removed (checked: with both set, the sandboxed `TMPDIR` was `<scratch>/claude-<uid>`). (`--add-dir` with the scratch path was the alternative; it would widen what Claude Code allows, and wasn't tried.) An unsandboxed retry (`dangerouslyDisableSandbox: true`) of a blocked home-directory write was refused ("Run outside of the sandbox") and reported in `permission_denials`, so agent-council warns of it, although the docs say an allow rule matching a command approves such a retry. Why agent-council's `--allowedTools Read,Grep,Glob,Bash` didn't approve it isn't known.
259
271
  - agent-council doesn't detect other sandbox trouble: `ClaudeCodeHarness.warnings` reads only `permission_denials`.
260
272
 
261
- **Billing.** agent-council leaves authentication and billing entirely to Claude Code: it passes no option and sets no environment variable for them (the only variables it sets for an agent are `TMPDIR` and `CLAUDE_CODE_TMPDIR`, both to its scratch dir, §10). An agent bills however `claude` would at the user's terminal: a subscription login, or an API key if one is configured. One caveat, which the README gives: interactive Claude Code asks before using an `ANTHROPIC_API_KEY` found in the environment, but `-p` mode doesn't ask, so a key exported for another tool may bill council runs to the API. Subscription runs also share the user's usage limits with their interactive work; a limit hit while an agent is working is expected to end it as an ordinary agent failure, but that hasn't been observed (§13). The reported cost is recorded unadjusted (only rounded to six decimal places); like other subscription providers' figures it is notional (the stream gives its `costBasis` as `list`). Telling billing sources apart in `run.json` is not built (§18); the sources for it are the `init` event's `apiKeySource` (`none` for a login), `claude auth status --json` (`subscriptionType`, e.g. `pro`), and the stream's `rate_limit_event`s, which give the plan's utilization of its 5-hour and weekly windows.
273
+ **Billing.** agent-council leaves authentication and billing entirely to Claude Code: it passes no option and sets no environment variable for them (the only variables it sets for a Claude Code agent are `TMPDIR` and `CLAUDE_CODE_TMPDIR`, both to its scratch dir, §10). An agent bills however `claude` would at the user's terminal: a subscription login, or an API key if one is configured. One caveat, which the README gives: interactive Claude Code asks before using an `ANTHROPIC_API_KEY` found in the environment, but `-p` mode doesn't ask, so a key exported for another tool may bill council runs to the API. Subscription runs also share the user's usage limits with their interactive work; a limit hit while an agent is working is expected to end it as an ordinary agent failure, but that hasn't been observed (§13). The reported cost is recorded unadjusted (only rounded to six decimal places); like other subscription providers' figures it is notional (the stream gives its `costBasis` as `list`). Telling billing sources apart in `run.json` is not built (§18); the sources for it are the `init` event's `apiKeySource` (`none` for a login), `claude auth status --json` (`subscriptionType`, e.g. `pro`), and the stream's `rate_limit_event`s, which give the plan's utilization of its 5-hour and weekly windows.
262
274
 
263
275
  ### Codex
264
276
 
@@ -274,7 +286,7 @@ codex exec --json --ephemeral --skip-git-repo-check --color never
274
286
  Checked with codex-cli 0.167.0:
275
287
 
276
288
  - `-c developer_instructions=...` adds the scaffolding to the system prompt (checked: an instruction given this way was followed). It replaces any `developer_instructions` the user's config sets; Codex has no option that appends.
277
- - `--skip-git-repo-check` is needed outside a git repository Codex trusts: without it Codex refuses ("Not inside a trusted directory"), while pi and Claude Code agents run anywhere.
289
+ - `--skip-git-repo-check` is needed outside a git repository Codex trusts: without it Codex refuses ("Not inside a trusted directory"), while pi, Claude Code, OpenCode, and Antigravity agents run anywhere (OpenCode and Antigravity checked).
278
290
  - Codex's `read-only` and `workspace-write` sandboxes also block network access unless the user's config allows it (checked with `codex sandbox`: `curl` couldn't resolve a host under either, and worked unsandboxed).
279
291
  - No `--sandbox` or approval option is passed: the user's `sandbox_mode` applies, as in an interactive session (§11's premise). The user's `approval_policy` doesn't: `codex exec` never asks, so a command that needs approval is refused (checked: an agent told `approval_policy="on-request"` reported `never`, and `"untrusted"` made `codex exec` exit with "no longer supported"). Under `read-only`, Codex's default, commands can write nothing, `$TMPDIR` included (checked: "read-only file system"), so agents get no scratch space although the scaffolding offers it; under `workspace-write`, `$TMPDIR` is writable (checked), and so is the analyzed repository. Forcing `read-only` was tried and dropped: it overrode the user's setting, and the scaffolding would have needed a variant without scratch space.
280
292
  - No tool is withheld: this Codex version has no option for it. Codex agents keep `apply_patch` (file editing) and the subagent tools (`spawn_agent` and others); `--disable multi_agent`, `-c features.multi_agent=false`, and `-c include_apply_patch_tool=false` each left them in the rendered prompt (`codex debug prompt-input`). The README says so. The subagent tools fail, though: under `--ephemeral`, `spawn_agent` fails with "collab spawn failed: ... no rollout found for thread id" (on stderr; the stream shows only the agent's `wait`), and the agent carries on alone (checked with codex-cli 0.167.0). That also keeps usage whole: without `--ephemeral`, a subagent ran, and its tokens (31,708 input in its own session) were not in its parent's `turn.completed`, which matched the parent's session alone. If a Codex version lets `--ephemeral` agents spawn, usage will undercount them.
@@ -284,18 +296,74 @@ Checked with codex-cli 0.167.0:
284
296
 
285
297
  **Billing.** agent-council leaves authentication and billing to Codex: a ChatGPT login or an API key, however `codex` would bill at the user's terminal. The entry's provider only labels the agent; Codex uses the `model_provider` its config names.
286
298
 
299
+ ### OpenCode
300
+
301
+ **Invocation.** One `opencode run` process per agent, the prompt on stdin, started from an argv array (§9), with variables set by `OpenCodeHarness.env`:
302
+
303
+ ```text
304
+ opencode run --format json --agent build --model PROVIDER/MODEL
305
+ OPENCODE_DB=<scratch>/opencode.db
306
+ OPENCODE_CONFIG_CONTENT={"instructions":["<scratch>/agent-council-scaffold.md"],
307
+ "permission":{"edit":"deny"},
308
+ "agent":{"build":{"permission":{"edit":"deny",
309
+ "external_directory":{"<scratch>/*":"allow"}}},
310
+ "title":{"disable":true}},
311
+ "snapshot":false,"experimental":{"continue_loop_on_deny":true}}
312
+ ```
313
+
314
+ `OPENCODE_CONFIG_CONTENT` is merged over the user's and the project's config (a user's own value for it is replaced). What each setting is for (checked with opencode 1.19.6):
315
+
316
+ - `instructions`: the scaffolding, as a file in the scratch dir, since OpenCode has no option that appends to the system prompt.
317
+ - `permission.edit: deny`, globally and for `build`: withholds the file-editing tools by default, as the other harnesses withhold theirs (repeated for `build` because a per-agent permission comes after the global one). It is a default, not a guarantee: a user's or project's config can allow editing again, for `build` or a subagent it defines, and `bash` can write files anyway (checked: the model fell back to it). That is the same position as Codex, whose editing tool can't be withheld at all; see `REVIEW_NOTES.md`.
318
+ - `--agent build` pins the agent whatever `default_agent` a config names.
319
+ - `external_directory` allowed for the scratch dir, on `build`: OpenCode's default asks for files outside the project, which `opencode run` refuses, so `$TMPDIR` would be unusable with OpenCode's own tools. Per agent, since a global map would replace a user's scalar `external_directory` value.
320
+ - `experimental.continue_loop_on_deny`: `opencode run` refuses every `ask` (no `--auto` is passed, as `codex exec` refuses approvals), and by default a refusal ends the session, leaving the model's lead-in as the report. With this, the agent sees the refusal and goes on.
321
+ - `agent.title.disable`: the title agent's request isn't in the stream, so its usage wouldn't be counted.
322
+ - `snapshot: false`: snapshots (for undo) copy the project's files, untracked ones included, into OpenCode's data dir, kept after the run.
323
+ - `OPENCODE_DB` in the scratch dir: the session is deleted with the scratch dir when the agent finishes, so it isn't kept (pi, Claude Code, and Codex save none either; Antigravity is the exception), and concurrent agents don't share one SQLite database. opencode 1.2.4 ignored it.
324
+
325
+ **Context.** OpenCode behaves as in an interactive session started in the analyzed repository: the user's config and plugins apply, and so do the project's `AGENTS.md` files and `opencode.json`, with no trust step. If the project has a `.opencode` directory, OpenCode writes a `.gitignore` there. An inherited `OPENCODE_PERMISSION` is left alone.
326
+
327
+ **Billing.** agent-council leaves authentication and billing to OpenCode: an agent uses the credentials `opencode auth login` saved. Unlike Claude Code's and Codex's, the entry's provider is passed, as the `provider/` part of `--model`.
328
+
329
+ **Subagents.** The `task` tool's subagents run, but their usage isn't in the parent's stream, so it isn't counted.
330
+
331
+ ### Antigravity
332
+
333
+ **Invocation.** One `agy` process per agent, started from an argv array (§9), with the prompt wrapped as one NDJSON user message on stdin (`AntigravityHarness.stdin_data`):
334
+
335
+ ```text
336
+ agy --input-format stream-json --output-format stream-json --disable-slash-commands \
337
+ --model MODEL --settings '{"permissions":{"deny":["write_file(*)","execute_url(*)","download_url(*)"]}}'
338
+ ```
339
+
340
+ - `--input-format stream-json` is used instead of `-p`: `agy -p` takes its prompt as a string argv value rather than reading stdin, whereas `--input-format stream-json` reads one NDJSON user message per line from stdin and exits cleanly on EOF (checked with `agy` 1.5.22).
341
+ - `--disable-slash-commands` disables slash command and prompt-level skill expansion in print mode.
342
+ - `agy` has no system-prompt flag or settings key, so `AntigravityHarness.stdin_data` prepends `Harnesses.scaffold_text` to the user message (for `agy` only, rather than appending to the system prompt).
343
+ - `--settings` merges `permissions` over `~/.gemini/antigravity-cli/settings.json` for the session without saving it (checked with `agy` 1.5.22: `agy` started cleanly with all three deny rules, `write_file(*)` blocked `write_file` and `edit_file`, and user `permissions.allow` rules for MCP remained active; whether user `permissions.deny` rules also merge and whether every write-ish, browser, or download tool maps to these actions are not exhaustively verified). `agent-council` does not pass `--sandbox` or `--mode`, so shell commands stay governed by the user's `agy` settings (`$TMPDIR` is writable from the shell, while file tools are read-only because `write_file(*)` is denied).
344
+ - **Sessions persist on disk.** `agy` 1.5.22 has no `--no-session` or `--ephemeral` flag, so each agent saves a conversation database under `~/.gemini/antigravity-cli/conversations/` (`agy conversations clean` removes old ones).
345
+
346
+ **Context.** Antigravity behaves as in an interactive session started in the analyzed repository: workspace rules (`AGENTS.md`, `GEMINI.md`, `.agents/rules/`), hooks (`.agents/hooks.json`), skills (prompt-level skill expansion is disabled by `--disable-slash-commands`), plugins, and MCP servers load subject to `agy`'s workspace trust rules.
347
+
348
+ **Billing.** agent-council leaves authentication and billing to `agy`: an agent uses whatever account or provider `agy` would at the user's terminal (Google AI subscription, Gemini API key when `modelProvider: "gemini"`, or Vertex AI). The entry's provider only labels the agent.
349
+
350
+ **Subagents.** Subagent tools cannot be disabled via CLI flags; as with OpenCode, their token usage may not appear in the parent's `result.usage`.
351
+
287
352
  ### MCP servers load, in every harness
288
353
 
289
- Agents get the MCP servers the user has configured for their harness, as an interactive session would: pi's (`~/.pi/agent/mcp.json`, a trusted project's, and extensions'), Claude Code's (the user's, plugins', and the project's approved ones), and Codex's (`config.toml`, plugins, the apps connectors, and a trusted project's). agent-council passes no MCP option. Leaving them out would make agents worse at the user's own work (a coverage server, an issue tracker, internal docs), which matters more here than isolation (§11's premise).
354
+ Agents get the MCP servers the user has configured for their harness, as an interactive session would: pi's (`~/.pi/agent/mcp.json`, a trusted project's, and extensions'), Claude Code's (the user's, plugins', and the project's approved ones), Codex's (`config.toml`, plugins, the apps connectors, and a trusted project's), OpenCode's (the user's config, plugins', and the project's `opencode.json`), and Antigravity's (`~/.gemini/config/mcp_config.json` and `<workspace>/.agents/mcp_config.json`). agent-council passes no MCP option. Leaving them out would make agents worse at the user's own work (a coverage server, an issue tracker, internal docs), which matters more here than isolation (§11's premise).
290
355
 
291
- The cost is risk, which the README's Safety section states prominently. A server that writes (posting to chat, commenting on an issue, changing a ticket) is available to every agent, held back only by the scaffolding's read-only instructions, and a council would do it once per agent; and each agent starts every server it loads, so a server that acts merely by starting acts once per agent. The user's remedy is their own config (remove or disable the server), or an environment without it.
356
+ The cost is risk, which [CAUTIONS.md](CAUTIONS.md) and the README's Safety section state prominently. A server that writes (posting to chat, commenting on an issue, changing a ticket) is available to every agent, held back only by the scaffolding's read-only instructions, and a council would do it once per agent; and each agent starts every server it loads, so a server that acts merely by starting acts once per agent. The user's remedy is their own config (remove or disable the server), or an environment without it.
292
357
 
293
- How each harness exposes the tools (checked with pi 1.5.2, Claude Code 2.1.329, and codex-cli 0.167.0, calling a `version` tool on a local stdio server):
358
+ How each harness exposes the tools (checked with pi 1.5.2, Claude Code 2.1.329, codex-cli 0.167.0, opencode 1.19.6, and agy 1.5.22, calling a `version` tool on a local stdio server):
294
359
 
295
- - **pi** exposes MCP tools through its `codemode` tool by default, so `codemode` is in the `--tools` allowlist (checked: without it, agents had no MCP access). A server with direct exposure has its tools activated only if `--tools` names them, so `mcp__*` is listed too (checked: without it, a direct server's tool was unavailable). A server with deferred exposure has its tools loaded by `tool_search`, so that is listed as well; it loads only MCP tools (checked: `tool_search` for `write` and `edit` found nothing). Since naming an `mcp__` entry makes `--tools` filter MCP tools by name, pi's resource tools (`list_mcp_resources`, `list_mcp_resource_templates`, `read_mcp_resource`) are listed too. A `codemode` script can call only the allowlisted tools and MCP tools (checked: its `tools` object had them and the resource tools, and no `write`), plus pi's `models` API (`models.classify`, `models.generateImages`), which calls models itself; pi reports that usage on the `codemode` tool result, so `PiHarness.usage` counts tool results' usage along with assistant messages'. `tool_search` is listed for deferred exposure but also finds codemode-exposed tools, which `codemode` reaches anyway. Listing `codemode` activates it even when the user's pi settings set `autoEnableCodemode` to false; agents can't otherwise reach MCP tools with the default exposure. pi doesn't ask before a tool runs, so pi agents can call any MCP tool they get. A failed MCP call reaches a pi agent as a tool result marked `isError`, which the agent can read; agent-council doesn't warn of it (`PiHarness.warnings` returns none), unlike Claude Code's and Codex's refused calls, since a pi failure is an ordinary tool error, not a refusal, and pi reports a server that fails to start only in its interactive UI. Unlisted extension tools stay out of reach even with `codemode` and `tool_search`: pi drops tools the allowlist doesn't match before registering them, and both reach only registered tools (pi 1.5.2's `_refreshToolRegistry`, `_getCallableTools`).
360
+ - **pi** exposes MCP tools through its `codemode` tool by default, so `codemode` is in the `--tools` allowlist (checked: without it, agents had no MCP access). A server with direct exposure has its tools activated only if `--tools` names them, so `mcp__*` is listed too (checked: without it, a direct server's tool was unavailable). A server with deferred exposure has its tools loaded by `tool_search`, so that is listed as well; it loads only MCP tools (checked: `tool_search` for `write` and `edit` found nothing). Since naming an `mcp__` entry makes `--tools` filter MCP tools by name, pi's resource tools (`list_mcp_resources`, `list_mcp_resource_templates`, `read_mcp_resource`) are listed too. A `codemode` script can call only the allowlisted tools and MCP tools (checked: its `tools` object had them and the resource tools, and no `write`), plus pi's `models` API (`models.classify`, `models.generateImages`), which calls models itself; pi reports that usage on the `codemode` tool result, so `PiHarness.usage` counts tool results' usage along with assistant messages'. `tool_search` is listed for deferred exposure but also finds codemode-exposed tools, which `codemode` reaches anyway. Listing `codemode` activates it even when the user's pi settings set `autoEnableCodemode` to false; agents can't otherwise reach MCP tools with the default exposure. pi doesn't ask before a tool runs, so pi agents can call any MCP tool they get. A failed MCP call reaches a pi agent as a tool result marked `isError`, which the agent can read; agent-council doesn't warn of it (`PiHarness.warnings` returns none), unlike Claude Code's, Codex's, and OpenCode's refused calls, since a pi failure is an ordinary tool error, not a refusal, and pi reports a server that fails to start only in its interactive UI. Unlisted extension tools stay out of reach even with `codemode` and `tool_search`: pi drops tools the allowlist doesn't match before registering them, and both reach only registered tools (pi 1.5.2's `_refreshToolRegistry`, `_getCallableTools`).
296
361
  - **Claude Code** loads the servers, but `-p` can't ask permission, so an MCP call goes through only if a permission rule allows it (e.g. `mcp__server` in `permissions.allow`); otherwise it is refused and lands in `permission_denials`, which `ClaudeCodeHarness.warnings` reports. MCP tools are not added to `--allowedTools`: that would give agents more than an interactive session has without the user's approval.
297
362
  - **Codex** loads the servers, but `codex exec` never asks for approval, so an MCP call goes through only if the user's config approves the tool in advance (`default_tools_approval_mode = "approve"` on a server, or `approval_mode = "approve"` on one of its tools); otherwise the `mcp_tool_call` item fails with "MCP tool call requires approval, but approval policy is never", which `CodexHarness.warnings` reports.
298
363
 
364
+ - **OpenCode** loads the servers, and MCP tools need no permission by default, so an agent can call them unless the user's permissions set them to `ask` (then refused, with a warning) or `deny` (checked with opencode 1.19.6).
365
+ - **Antigravity** loads the servers, and MCP tools default to `ask`, so in headless mode an MCP call goes through only if a `permissions.allow` rule covers it (e.g. `mcp(server/*)`); otherwise it is soft-denied and reported in `result.denied_actions`, which `AntigravityHarness.warnings` surfaces (checked with `agy` 1.5.22).
366
+
299
367
  0.2.0 and the Codex harness's first version turned MCP off instead (pi's `--no-mcp`, Claude Code's `--strict-mcp-config`, and for Codex a per-server `enabled=false` table built from `codex mcp list`, plus `--disable apps`). That was reversed: it crippled agents relative to the user's setup, and Codex's version was fragile (a plugin's server in the listing made the override fail with "invalid transport", failing every agent). `pi-models` still passes `--no-mcp`, since it only lists models and runs no agent.
300
368
 
301
369
  ---
@@ -356,7 +424,7 @@ agent-council reads Claude Code's `stream-json` output. The stream's final `resu
356
424
  - the failure's reason is the `result` event's `errors`, if any (e.g. "Reached maximum number of turns (1)", with an empty `result`), otherwise its `result` text (e.g. "Not logged in · Please run /login"). Stderr was empty in all but one case, so unlike pi's, a nonzero exit is explained from the stream, with stderr only as a fallback;
357
425
  - usage is read from the `result` event alone, which totals the agent's whole session; the per-message `assistant` events carry partial snapshots that undercount output (in one recorded case, 16 output tokens where the `result` event gave 184). So an agent that ends without a `result` event, as when its `claude` is killed, reports no usage rather than a misleading partial count, unlike a pi agent, whose completed messages each report their full usage. It maps `input_tokens`, `output_tokens`, `cache_read_input_tokens`, and `cache_creation_input_tokens` to `input`, `output`, `cache_read`, and `cache_write` (as with pi, `input` excludes cache reads and writes), and `total_cost_usd` to `cost`.
358
426
 
359
- So `exit_detail`, which explains a nonzero exit, reads the stream first for Claude Code (and Codex, below) and stderr for pi. The parser and the invocation live in `AgentCouncil::Harnesses::ClaudeCodeHarness` (`lib/agent_council/harnesses/claude_code_harness.rb`). The specs read streams recorded from real `claude` invocations (`spec/fixtures/claude_code/`), trimmed to a few event types and fields, with local paths, tool call IDs, and commit hashes replaced by placeholders; the spec's header says how each was recorded.
427
+ So `exit_detail`, which explains a nonzero exit, reads the stream first for Claude Code (and Codex and OpenCode, below) and stderr for pi. The parser and the invocation live in `AgentCouncil::Harnesses::ClaudeCodeHarness` (`lib/agent_council/harnesses/claude_code_harness.rb`). The specs read streams recorded from real `claude` invocations (`spec/fixtures/claude_code/`), trimmed to a few event types and fields, with local paths, tool call IDs, and commit hashes replaced by placeholders; the spec's header says how each was recorded.
360
428
 
361
429
  Not yet observed for Claude Code: an agent that hits a usage limit, and one billed to an API key.
362
430
 
@@ -373,6 +441,33 @@ The parser and the invocation live in `AgentCouncil::Harnesses::CodexHarness` (`
373
441
 
374
442
  Not yet observed for Codex: an agent that hits a usage limit, and one billed to an API key.
375
443
 
444
+ ### OpenCode
445
+
446
+ agent-council reads `opencode run --format json`'s event stream, one event per line (`step_start`, `tool_use`, `text`, `step_finish`, and `error`), each with a `part` (or, for `error`, an `error`):
447
+
448
+ - the report is the text of the last assistant message with text: its nonblank `text` parts, grouped by `messageID` and joined, skipping those OpenCode marks `synthetic` or `ignored`;
449
+ - the agent failed if there is an `error` event (opencode 1.2.4 exited 0 after one, so the event decides, not the exit status); if the last `step_finish`, or the report message's, has a `reason` of `length`, `content-filter`, or `error` (cut off or failed; other reasons, `unknown` included, are accepted); if the last `step_finish` has reason `tool-calls`, meaning the session stopped after a tool call; or if there is no text. The reason given is the `error` event's `data.message`, else its `name`; a nonzero exit is explained from the stream, with stderr as a fallback;
450
+ - a tool call OpenCode refused for want of permission (its `tool_use` part's `state.error` begins "The user rejected permission") is a warning, one for all of them, with their count and tools;
451
+ - usage is summed over the `step_finish` parts: `tokens.input` (which excludes cached input), `output` plus `reasoning`, `cache.read`, `cache.write`, and `cost`, OpenCode's estimate from its model catalog.
452
+
453
+ The parser and the invocation live in `AgentCouncil::Harnesses::OpenCodeHarness` (`lib/agent_council/harnesses/opencode_harness.rb`). The specs read streams recorded from this harness's argv and env (`spec/fixtures/opencode/`), with the session ID zeroed and tool output replaced by a placeholder.
454
+
455
+ Not yet observed for OpenCode: an agent that hits a usage limit or a context overflow, and the stderr of a nonzero exit without an `error` event.
456
+
457
+ ### Antigravity
458
+
459
+ agent-council reads `agy --output-format stream-json`'s event stream, one JSON object per line, keyed by `event` (`init`, `step_update`, `result`), with each payload under a key of the same name:
460
+
461
+ - the report is the terminal `result` event's `response` when `status == "SUCCESS"` and nonblank;
462
+ - `assistant_messages` groups `step_update` events with `step_type == "agent_response"` by `step_index` and joins their streamed `text_delta` fragments;
463
+ - the agent failed if there is no `result` event, if `status != "SUCCESS"` (the reason is `result.error`, else `finished_reason`), if `finished_reason` is `print_timeout`, `interrupted`, `error`, `length`, `content-filter`, or `max_tokens`, or if `response` is blank (noting any refused actions); a nonzero exit is explained from `result.error` first, then any `AGY_ERROR` line on stderr or stdout (extracting `short_error`/`message`/`error` from JSON when present), then stderr's first line;
464
+ - soft-denied tool calls (actions that required interactive approval in headless mode) appear in `result.denied_actions` (`display_name` / `action`), which `AntigravityHarness.warnings` reports;
465
+ - usage comes from the terminal `result.usage` only: `input_tokens` (which excludes cached input), `output_tokens` (which includes `thinking_tokens`), `cache_read_tokens`, `cache_write` as `0`, and no `cost` (so `known_cost` treats it as unknown, like Codex).
466
+
467
+ The parser and the invocation live in `AgentCouncil::Harnesses::AntigravityHarness` (`lib/agent_council/harnesses/antigravity_harness.rb`). The specs read streams recorded from `agy` 1.5.22 (`spec/fixtures/antigravity/`), with local paths replaced by `/repo` and conversation IDs renumbered.
468
+
469
+ Not yet observed in live `agy` runs: expired/missing auth, quota-exhaustion responses, live `AGY_ERROR` stderr lines (parsed from the binary's `short_error` JSON format), and whether user `permissions.deny` rules survive `--settings` merging.
470
+
376
471
  ---
377
472
 
378
473
  ## 14. Output Directory
@@ -416,16 +511,20 @@ There are no retries of agent-council's own (the harnesses may retry transient p
416
511
 
417
512
  ```text
418
513
  README.md
514
+ CAUTIONS.md
419
515
  INSTALL.md
420
516
  USE_CASES.md
421
517
  DESIGN.md
518
+ RUNAWAY_AGENTS.md
422
519
  RELEASE_NOTES.md
423
520
  LICENSE.txt
424
521
  REVIEW_NOTES.md # settled review findings; not shipped in the gem
425
522
  CONTRIBUTING.md # contribution process; not shipped in the gem
523
+ RELEASING.md # release checklist; not shipped in the gem
426
524
  agent-council.gemspec
427
- exe/ # executable entry points; nearly all code lives in lib/
525
+ exe/ # executable entry points; each calls a main in lib/
428
526
  agent-council
527
+ agent-council-ps # helper: list running councils, their agents, and their commands
429
528
  pi-models # helper: list models available to pi
430
529
  lib/
431
530
  agent_council.rb # harness-agnostic orchestration (AgentCouncil)
@@ -433,13 +532,20 @@ lib/
433
532
  version.rb
434
533
  platform.rb # windows? and the native-Windows abort (WSL is required)
435
534
  pi_models.rb # backs exe/pi-models
535
+ ps.rb # backs exe/agent-council-ps
436
536
  worker_pool.rb # worker threads, agent processes, and Ctrl-C handling
537
+ progress_printer.rb # the Started Agents and Finished Agents output
538
+ safe_stdout.rb # the $stdout that discards output it can't write
539
+ plain_line.rb # AgentCouncil.plain_line: text made safe to print on one line
437
540
  harnesses.rb # harnesses by name (AgentCouncil::Harnesses)
438
541
  harnesses/
439
- scaffold.rb # the read-only scaffolding every harness appends
542
+ harness.rb # the base class every harness subclasses (Harness)
543
+ scaffold.rb # the read-only scaffolding every harness gives agents
440
544
  pi_harness.rb # pi-specific behavior (AgentCouncil::Harnesses::PiHarness)
441
545
  claude_code_harness.rb # Claude Code-specific behavior (ClaudeCodeHarness)
442
546
  codex_harness.rb # Codex-specific behavior (CodexHarness)
547
+ opencode_harness.rb # OpenCode-specific behavior (OpenCodeHarness)
548
+ antigravity_harness.rb # Antigravity-specific behavior (AntigravityHarness)
443
549
  templates/ # runtime data files (resolved via __dir__, shipped in the gem)
444
550
  consolidate_prompt.md # instructions template for the consolidator
445
551
  analyst_format.md # report-format addendum for analysts
@@ -458,14 +564,15 @@ examples/ # pure, non-runtime samples (prompts/ and configs/ ship
458
564
  single.yml
459
565
  consolidated.yml
460
566
  mixed-harness.yml
567
+ antigravity.yml
461
568
  results/ # sample output; not shipped in the gem
462
569
 
463
570
  agent-council-reports/ # created on demand; gitignored in this repository
464
571
  ```
465
572
 
466
573
  Dev-only files (Gemfile, Rakefile, lint configs, CI workflows, `bin/setup`,
467
- `bin/setup-hooks`, `hooks/pre-commit`) are omitted above. The gemspec's
468
- `spec.files` is the authority on what ships.
574
+ `bin/setup-hooks`, `bin/pre-release-check`, `scripts/release/`, `hooks/pre-commit`)
575
+ are omitted above. The gemspec's `spec.files` is the authority on what ships.
469
576
 
470
577
  `lib/` stays shallow, without namespaces deeper than `harnesses/`
471
578
  (such as `lib/agent_council/services/...`) unless the project grows enough to
@@ -476,7 +583,10 @@ framework.
476
583
 
477
584
  ## 17. Dependencies
478
585
 
479
- The tool itself uses only the Ruby standard library (`yaml`, `json`, `open3`, `optparse`, `fileutils`, `tmpdir`, `shellwords`, ...); tests use RSpec.
586
+ The tool itself uses only the Ruby standard library (`yaml`, `json`, `open3`, `optparse`, `fileutils`, `tmpdir`, `shellwords`, ...); tests use RSpec. Beyond the harnesses, it runs only standard system
587
+ commands: `agent-council-ps` reads `ps`, and on Linux, `/proc` for
588
+ processes' exact arguments, CPU time, and working directories, or on
589
+ macOS, which has no `/proc`, `lsof` for a process's working directory.
480
590
 
481
591
  New gems are added only if they solve a meaningful problem that would otherwise require substantial code.
482
592
 
@@ -484,7 +594,9 @@ New gems are added only if they solve a meaningful problem that would otherwise
484
594
 
485
595
  ## 18. Status and Future Work
486
596
 
487
- agent-council is at an early stage (0.x), so it does only what its core job needs. Features we hope to add include support for more harnesses and telling a Claude Code agent's billing source (subscription or API key) apart in `run.json` (§11). A missing feature is usually just not built yet.
597
+ agent-council is at an early stage (0.x), so it does only what its core job needs. Features we hope to add include support for more harnesses and telling a Claude Code or Antigravity agent's billing source (subscription or API key) apart in `run.json` (§11). A missing feature is usually just not built yet.
598
+
599
+ Worth considering, not decided: an option to keep agents' sessions. Four harnesses now run agents without keeping their sessions (pi's `--no-session`, Claude Code's `--no-session-persistence`, and Codex's `--ephemeral` save none; OpenCode's goes to `OPENCODE_DB` in the scratch dir, deleted when the agent finishes), so a council doesn't flood the user's history and concurrent OpenCode agents don't share a database. Antigravity (`agy` 1.5.22) is the exception: it has no ephemeral flag and always persists conversations under `~/.gemini/antigravity-cli/conversations/`. A user might still want a session, to see what an agent did beyond its report or to recover usage the stream leaves out (OpenCode's subagents). An option for it would apply to every harness, and for OpenCode would keep each agent's own database (in the run directory, say) rather than use the user's.
488
600
 
489
601
  `REVIEW_NOTES.md` separately tracks review findings that were considered and don't need to be re-raised: accepted risks and non-issues.
490
602
 
data/INSTALL.md CHANGED
@@ -3,14 +3,14 @@
3
3
  This guide is for developers comfortable with the command line who have
4
4
  never used Ruby. It takes you from a bare machine to a working
5
5
  `agent-council` command. Already have Ruby 3.3+ (or JRuby 10+) and
6
- a harness CLI (`pi`, Claude Code, or Codex)? Just run `gem install agent-council`; see the
6
+ a harness CLI (`pi`, OpenCode, Claude Code, Codex, or Antigravity)? Just run `gem install agent-council`; see the
7
7
  [README](README.md#quick-start).
8
8
 
9
9
  ## 1. Prepare your system
10
10
 
11
11
  - **macOS and Linux:** any terminal works. Linux needs `curl` installed.
12
12
  - **Windows:** native Windows is **not supported**. Everything, including
13
- Ruby, the harness CLIs you use (Pi, Claude Code, Codex, or any mix), and
13
+ Ruby, the harness CLIs you use (Pi, OpenCode, Claude Code, Codex, Antigravity, or any mix), and
14
14
  agent-council, must be installed and run inside
15
15
  [WSL](https://learn.microsoft.com/windows/wsl/install) with Ubuntu. In
16
16
  an administrator PowerShell, run `wsl --install -d Ubuntu`, restart if
@@ -74,7 +74,7 @@ For other install methods and details, see the
74
74
  [Mise documentation](https://mise.jdx.dev/getting-started.html) and its
75
75
  [Ruby page](https://mise.jdx.dev/lang/ruby.html).
76
76
 
77
- ## 3. Install a harness: Pi, Claude Code, Codex, or several
77
+ ## 3. Install a harness: Pi, OpenCode, Claude Code, Codex, Antigravity, or several
78
78
 
79
79
  agent-council drives AI models through a coding-agent harness, which
80
80
  each config entry names. Most samples use the
@@ -89,9 +89,12 @@ Agents can also run under [Claude Code](https://code.claude.com/docs)
89
89
  (see the README's [Choosing a harness](README.md#choosing-a-harness)).
90
90
  For those, install the `claude` CLI and log in (under WSL, inside WSL).
91
91
  Likewise for [Codex](https://developers.openai.com/codex/cli): install
92
- the `codex` CLI and log in. A config needs each harness only if some
93
- agent, or the consolidator, runs under it (`harness: pi`, `claude`, or
94
- `codex`).
92
+ the `codex` CLI and log in, for [OpenCode](https://opencode.ai/docs/cli):
93
+ install the `opencode` CLI and add provider credentials with
94
+ `opencode auth login`, and for [Google Antigravity](https://antigravity.google/docs/getting-started):
95
+ install the `agy` CLI and sign in interactively (under WSL, inside WSL). A
96
+ config needs each harness only if some agent, or the consolidator, runs under
97
+ it (`harness: pi`, `claude`, `codex`, `opencode`, or `agy`).
95
98
 
96
99
  ## 4. Install agent-council
97
100
 
@@ -104,6 +107,8 @@ If the help text appears, you're done.
104
107
 
105
108
  ## Next steps
106
109
 
107
- Continue with the README's [Quick start](README.md#quick-start) to list
108
- your models, write a config, and do your first run. You've already done its
109
- steps for installing the prerequisites and the gem.
110
+ Before your first run, read [`CAUTIONS.md`](CAUTIONS.md) for security,
111
+ privacy, and cost caveats. Then continue with the README's
112
+ [Quick start](README.md#quick-start) to list your models, write a
113
+ config, and do your first run. You've already done its steps for
114
+ installing the prerequisites and the gem.