CoAgent8 lets the coding agent you work with ask another one. It is an MCP
server that puts Codex, Claude Code and Antigravity (agy, which runs Gemini and
other models) behind the same six tools: your agent requests a second opinion or
an independent review of your Git changes, and gets the other agent's answer
back in the chat. The other agent runs in a read-only profile, on your own
installed and signed-in CLI.
Contents: Status | Quick start | Features | Tools | Skills | VS Code extension | Configuration | Known limitations | Reporting problems | Contributing
0.6.0 is the first release for testers. Every version below 1.0.0 is a
preview: a GitHub pre-release, a VS Code pre-release and npm
coagent8@next, all with the same version number.
What works today: consultations and reviews by another agent in a read-only profile, model selection by price with your approval for expensive models, continuable sessions with history, diagnostics, skills and the VS Code extension. Not yet available: letting the other agent write changes, run checks or coordinate several agents. These are the next steps in the roadmap.
You need Node.js 24 or later and at least one of these CLIs, installed and signed in:
| CLI | Notes |
|---|---|
| Codex CLI | Also found inside the OpenAI VS Code extension |
| Claude Code | 2.1.289 or later; subscription login or API key |
Antigravity CLI (agy) |
Also installed by the Google Antigravity VS Code extension (~/.gemini/bin) |
Install CoAgent8 (okidev.coagent8-mcp) as a pre-release from the
VS Code Marketplace,
or download coagent8-mcp-0.6.0.vsix from the
GitHub release
and run Extensions: Install from VSIX.... Then:
To use CoAgent8 also inside the CLIs' own chats, choose Add CoAgent8 to All CLI Chats (or Add CoAgent8 to Its Chat in one CLI's menu) in CoAgent8: Manage Coding CLIs.
One command registers CoAgent8 in the chats of the CLIs you choose and installs its skills:
npx -y coagent8@next setup --clients=codex,claude,agy
Setup copies the server to ~/.coagent8/runtime/, so the registration does
not depend on the npx cache, and keeps a private backup of every file it
changes. status checks the CLIs. repair checks the registrations and updates the
ones setup wrote and you did not change; an entry you edited is kept.
cleanup shows what it would remove; run it again with the
--apply=<token> it prints to remove the registrations and skills setup added.
npm runs no script on uninstall, so run cleanup before npm uninstall -g coagent8.
Add a stdio server to the host's MCP configuration:
{
"mcpServers": {
"coagent8": {
"command": "npx",
"args": ["-y", "coagent8@next"]
}
}
}
On Windows, a host that starts commands without a shell may need
"command": "cmd" and "args": ["/c", "npx", "-y", "coagent8@next"]. Both
coagent8 and coagent8-mcp start the server when run without arguments;
coagent8@0.6.0 pins a version. Plain coagent8 (npm latest) is not a
supported channel before 1.0.0.
A host with its own tool deadline can stop a long review early. For Codex, set
tool_timeout_sec = 1800 in [mcp_servers.coagent8] (setup does this). Continue
supports stdio MCP in Agent mode through the same definition, following
Continue's MCP guide.
consult answers a question;
review checks Git changes and derives a READY or BLOCKED verdict itself
instead of trusting the model's word.doctor lists models, efforts and prices and checks
installation, sign-in and quota; issue prepares a sanitized bug report.| Backend | Execution profile |
|---|---|
| Codex | app-server with sandbox_mode="read-only" and approval_policy="never"; the thread's read-only state is verified, every inherited MCP server is disabled and verified per thread, server approval requests are rejected, interrupt via turn/interrupt |
| Claude Code (2.1.289+) | -p --restricted --tools Read,Glob,Grep --permission-mode dontAsk, hooks disabled, strict empty MCP configuration; startup tools, MCP and permission mode verified before any content; native session resume and control interrupt |
Antigravity (agy) |
Headless --sandbox --output-format stream-json, prompt on stdin, explicit model, native --conversation resume; inherits your agy MCP servers and plugins (see known limitations), recursion into CoAgent8 refused |
backend: auto (default), codex, claude, agy or smart_quota.
A model name alone also chooses its backend.config.json can fix a default backend or select the smart_quota strategy,
limited by allowedBackends.auto uses the configured default backend when it is eligible. Otherwise it
skips backends with an observed rate limit, prefers a CLI other than the one
calling, and ranks the rest by measured quota headroom. A measurement
older than 15 minutes counts as unmeasured; doctor with scope: "health"
refreshes it.model, then the session's model, then
backends.<id>.defaultModel, then the CLI's own default. CoAgent8 itself
names no model.reasoning_effort: none, minimal, low, medium, high, xhigh or
max, checked against the model's accepted efforts where the CLI lists them.coagent8_PRICES_URL. They decide whether to ask; they are not a bill.governance.models come first: deny never runs a model,
ask asks before every turn, allow runs it without asking (deny wins over
ask, ask over allow). Any other model asks when its price is unknown or
approximate, at or above governance.askAbovePrice (default 20 USD per
million output tokens), or at least governance.priceMultiplier (default 2)
times the backend's default.[P1|P2|P3] file:line, and the checks it ran.[P1] or [P2] finding, or a failed
check makes it BLOCKED (reason).session_handle keeps the session's model and effort.coagent8://sessions and coagent8://sessions/{id}/history show the
connection's workspace only.coagent8_HISTORY=off turns archive files off. Private reasoning and raw tool
output are never archived or returned.shell: false; prompts go through stdin, at most 4 MiB.timeout_ms from 100 ms to 30 minutes (default 15 minutes) covers Git,
preparation, approval, the turn and teardown, with progress notifications.CLI_NOT_FOUND, AUTH_REQUIRED, MODEL_UNAVAILABLE, RATE_LIMITED,
TIMEOUT, POLICY_DENIED or PRICE_LIMIT.| Tool | Purpose |
|---|---|
consult |
A second opinion on a question, design, plan or bug; optional architecture, debugging or implementation analysis |
review |
An independent review of Git changes with a verdict CoAgent8 derives |
doctor |
Models, efforts, output prices, defaults and approval per backend; scope: "health" checks installation, versions, sign-in and quota; detail: "full" returns data |
session |
List sessions, page a session's history or close a session |
cancel |
Cancel the running turn of a session |
issue |
Prepare a sanitized bug report and a prefilled GitHub issue link |
A consultation can be as small as:
{
"proposal": "Is this retry loop safe with concurrent writers? <code>",
"backend": "codex"
}
context_files passes paths for the other agent to read, not file contents.
Results are Markdown: the answer or a typed error, then the backend, model,
duration and session_handle=<handle> (<state>). Pass that handle for a
follow-up on the same topic; a call without it starts a fresh agent that
rereads everything. review adds its verdict.
The deprecated analyze, debug and implement aliases and the run gateway
still work but are not listed. Every client receives the same six tools.
The approval is a form CoAgent8 sends through MCP elicitation; your client must
show it to you. Clients that cannot show MCP forms cancel it: headless clients,
Codex 0.160.1 and the Antigravity chat did so when measured. CoAgent8 never
accepts an approval relayed by the calling agent, so there the turn fails with
POLICY_DENIED. To use such a model anyway, allow it with CoAgent8: Manage
Model Approvals in VS Code or in governance.models.allow, or call it from a
client that shows MCP forms.
Pass the user's limit as output_price_below, in USD per million output
tokens. It is strict: 5 means below 5. Without model, CoAgent8 chooses the
backend's default if it qualifies, otherwise the highest-priced qualifying
model:
{
"proposal": "Calculate 17 * 23. Reply only with the result.",
"output_price_below": 5
}
Only an exact price from a list younger than seven days qualifies. If no model
qualifies, the call fails with PRICE_LIMIT and each backend's reason instead
of running another model; an explicit model over the limit is never replaced.
The footer states the price, its list and date. A model within the limit may
still need your approval.
To choose yourself, call doctor: it lists each backend's models with their
accepted efforts, output price (~ approximate, ? unknown), default and
approval tag (ask: <rule>, deny or allow). coagent8 models prints the
same list in a terminal. Then name the model and an accepted effort:
{
"proposal": "Calculate 17 * 23. Reply only with the result.",
"model": "<model ID from doctor>",
"reasoning_effort": "low",
"output_price_below": 5
}
Setup and the VS Code extension install one skill per function into each CLI
where CoAgent8 is registered. Codex lists them in /skills and runs them as
$coagent8-review; Claude Code and the Antigravity CLI offer them as
/coagent8-review commands.
| Skill | Use it to |
|---|---|
coagent8-consult |
Ask another agent for a second opinion on a question, design, plan or bug |
coagent8-review |
Have another agent review Git changes and read the verdict |
coagent8-doctor |
See models, efforts and prices, apply a price limit, check backend health |
coagent8-session |
List, read, continue, cancel or close sessions |
coagent8-issue |
Prepare a sanitized CoAgent8 bug report |
coagent8-loop |
Plan, get the plan reviewed, implement, run checks and get an independent review |
| Client | Skill directory |
|---|---|
| Claude Code | ~/.claude/skills/ |
| Codex | ~/.agents/skills/ |
| Antigravity | ~/.gemini/config/skills/ |
CoAgent8: Manage Skills in VS Code and coagent8 skills in a terminal
install, update, uninstall, enable or disable one or all skills per client.
Your choices are kept, so repair does not bring back a skill you removed.
Disabled skills move to ~/.coagent8/disabled-skills/<client>/. A skill you
edited is never overwritten. Start a new chat to see changes. VS Code chat also
reads ~/.claude/skills/ and ~/.agents/skills/, so with both Claude Code and
Codex set up it lists each skill twice.
coagent8 skills status --clients=agy
coagent8 skills install --clients=agy --skills=coagent8-review
Changes are shown as a preview first; repeat the command for one client with
--apply=<token> to apply them.
Press F1 (or Ctrl+Shift+P, Cmd+Shift+P on macOS), type CoAgent8 and
choose a command:
| Command | What it does |
|---|---|
CoAgent8: Manage Coding CLIs |
Shows each CLI's state and chat entry. Installs a CLI (VS Code extension or official standalone), signs in, chooses the installation CoAgent8 uses, adds, updates or removes CoAgent8 in a CLI's chat, manages its skills, and removes what CoAgent8 installed |
CoAgent8: Manage Model Approvals |
Allows, asks for or denies individual models, and sets the price rules for asking |
CoAgent8: Manage Skills |
Installs, updates, uninstalls, enables or disables skills per client |
CoAgent8: Open Settings |
Opens CoAgent8's backend, model, configuration path and Node.js settings |
CoAgent8: Open Configuration (config.json) |
Opens the configuration file (~/.coagent8/config.json unless coagent8.configPath or coagent8_CONFIG names another), creating it with defaults if missing, with completion and validation (a file in another location needs a $schema entry, which new files get) |
CoAgent8: Reset Configuration (config.json) |
Replaces the file with the defaults after a confirmation, keeping the previous one as config.json.backup |
CoAgent8: Show MCP Servers |
Opens MCP: List Servers, where VS Code starts, stops and restarts CoAgent8 and shows its output |
The extension changes only what you choose, keeps private backups of the CLIs'
configuration files, and removes only entries it wrote and that you did not
change. When VS Code offers Restart Extensions after an install, update or
chat change, use it. VS Code restarts the CoAgent8 server by itself when its
settings or bundle change. Settings you save in VS Code take precedence over
config.json, except an empty model, which keeps the file's model; the CLIs
and other hosts read only the file.
Uninstalling the extension removes what it added: its chat entries, skills,
runtime copies and storage, including its sessions and history. Your shared
~/.coagent8/config.json, credentials and the CLIs stay.
~/.coagent8/config.json is shared by every host, the CLI and the VS Code
extension. Without the file the defaults apply. An unreadable or invalid file
stops execution with POLICY_DENIED while doctor keeps working.
{
"schemaVersion": 1,
"defaultBackend": null,
"routing": {
"strategy": "fixed",
"allowedBackends": ["codex", "claude", "agy"]
},
"backends": {
"agy": { "executable": "vscode-extension", "defaultModel": "<model the first doctor recorded>" }
},
"governance": {
"priceMultiplier": 2,
"askAbovePrice": 20,
"models": { "allow": [], "ask": [], "deny": [] }
}
}
A backend's CLI is backends.<id>.executable when it is set (an absolute
path, ~/..., or vscode-extension for the vendor extension's copy); a
configured CLI that is missing fails instead of falling back. Without it, the
CLI is found on PATH, then in the vendor's VS Code extension. The workspace comes from
workspace_path, the client's roots, or the server's working directory.
| Variable | Effect |
|---|---|
coagent8_CONFIG |
Configuration file path |
coagent8_DIR |
Storage root for sessions, history and caches (default ~/.coagent8) |
coagent8_HISTORY |
off turns archive files off |
coagent8_PRICES_URL |
Price list URL or local file instead of OpenRouter |
coagent8_QUOTA_CACHE |
Quota cache file |
CODEX_PATH, CLAUDE_PATH, AGY_PATH |
Backend executables; they override backends.<id>.executable |
CODEX_HOME, CODEX_CONFIG_PATH, CLAUDE_CONFIG_DIR, GEMINI_CLI_HOME |
Backend configuration locations; setup and cleanup support only the defaults |
The architecture states every contract, bound and error.
doctor lists them. Calls back
into CoAgent8 are refused.Ask your agent to run the issue tool: it prepares a sanitized report with
your OS, Node and CLI versions and a link that opens a new GitHub issue with it.
Add the steps and what you expected, and check the text for private data
before you submit it. You can also use the
bug-report form
directly.
Building from source needs Node.js 24.11+ or 26+:
npm ci
npm run build
The server is then node <checkout>/dist/index.cjs; npm pack produces the
installable package. A checkout of develop is a development build, not a
release. Restart a running MCP server after rebuilding.
| Need | Document |
|---|---|
| Priorities and acceptance | Roadmap |
| Contracts, limitations and design | Architecture |
| Current work and evidence | Handoff |
| Contributor rules | AGENTS.md |
| Branches, pull requests and releases | Git workflow |
| Checks by scope | Quality gate |
| Release history | Changelog |
| API reference | oktawianwybieralski.github.io/coagent8 |
The npm package does not include docs/ or the contributor rules; these links
work in the repository.
Copyright (c) 2026 Oktawian Wybieralski (oki.dev).
Licensed under the GNU General Public License, version 3 only
(GPL-3.0-only). Distributed derivative works must comply with GPLv3 and its
source-distribution requirements. See LICENSE for the full terms and warranty
disclaimer. Copies previously distributed under MIT retain those terms.
Created by Oktawian Wybieralski ยท GitHub repository