Comonad Agent for VS Code

A local-first, auditable coding agent inside VS Code. It runs a graph-orchestrated tool loop
against the model you choose — DeepSeek by default, or any OpenAI-compatible endpoint — journals every
file it writes, and asks before anything leaves the sandbox.
Why Comonad
- Local-first. Keys live in
SecretStorage; sessions, checkpoints and logs stay on the machine
that runs the agent.
- Auditable by construction. Typed graph events, a capability gate and an audit log; every tool
call carries a reconstructable decision trace (
/audit <call_id>), and file writes are journaled
per file, so nothing is silently overwritten.
- Extensible as a plugin tree. The kernel, tools, model adapters and UI are plugins on one
Cordis context. Turn a row off, configure it, or mount your
own.
- The agent loop is a graph. The turn's own loop, the tools it calls and the routes between them
are a named Mermaid graph. Set
comonad.graph to replace the shipped agent loop; plugins can
register nodes and routes beside it.
Install
From the Marketplace (recommended). Search for Comonad Agent in the Extensions view
(Cmd+Shift+X / Ctrl+Shift+X), or run:
code --install-extension zeroDtree.comonad
From a VSIX. Download comonad.vsix from the latest
release, then:
code --install-extension comonad.vsix
From source. Node.js 22 or newer and VS Code 1.137 or newer are required.
npm install
npm run compile
Press F5 to launch the Extension Development Host. To build an installable VSIX locally:
./scripts/reinstall.sh --build-only # writes comonad-0.3.2.vsix
code --install-extension comonad-0.3.2.vsix
Set up a model
Comonad ships with presets for the major API endpoints:
| Preset |
Default base URL |
Key |
| DeepSeek (default) |
https://api.deepseek.com |
DEEPSEEK_API_KEY |
| OpenAI |
https://api.openai.com/v1 |
saved in the setup flow |
| Anthropic |
https://api.anthropic.com |
saved in the setup flow |
| Google Gemini |
https://generativelanguage.googleapis.com/v1beta |
GEMINI_API_KEY / GOOGLE_API_KEY |
| OpenRouter |
https://openrouter.ai/api/v1 |
OPENROUTER_API_KEY |
| GLM (Zhipu) |
https://open.bigmodel.cn/api/paas/v4 |
ZAI_API_KEY / ZHIPUAI_API_KEY / GLM_API_KEY |
| Kimi (Moonshot) |
https://api.moonshot.cn/v1 |
MOONSHOT_API_KEY / KIMI_API_KEY |
| MiMo (Xiaomi) |
https://api.xiaomimimo.com/v1 |
MIMO_API_KEY |
| Qwen (DashScope) |
https://dashscope.aliyuncs.com/compatible-mode/v1 |
DASHSCOPE_API_KEY |
| OpenCode Go |
https://opencode.ai |
OPENCODE_API_KEY |
| Custom |
any OpenAI-compatible base URL |
saved in the setup flow |
Run Comonad: Configure Model Provider to pick a preset, override its base URL, or point the
custom preset at a local OpenAI-compatible server. Keys are stored in VS Code SecretStorage; the
environment variables above are fallbacks when no stored key exists. DEEPSEEK_API_KEY alone is
enough for the default provider.
Open the chat with Comonad: Open Chat (Cmd+Alt+C / Ctrl+Alt+C).
First five minutes
- Open the chat from the Secondary Side Bar.
- Ask a question, or describe a change.
- Approvals appear inline: Allow once, Always allow, or Deny.
- Shell and file changes are tool cards; click one to see the command and output.
- Review pending files above the composer with Keep, Undo, or Review.
Documentation
The full guide is at https://blog.zerodtree.com/comonad-vscode-extension/ (also available in
中文 at /zh/). The source lives in
docs/.
| Start |
What it covers |
| Chat |
Sessions, composer, transcript, tool cards, @ references |
| Safety |
Modes, approval policies, rules, sandboxing, secrets |
| Decision trace |
/audit <call_id> and the record behind each tool call |
| Context |
Window budget and proactive compaction |
| Graphs and orchestration |
Graph routes, the Orchestrator, 14 roles, task DAG, acceptance |
| Checkpoints and review |
Journal, Keep/Undo, restore points |
| Extending |
Plugins, hooks, skills, subagent roles, MCP |
| Remote and containers |
Remote SSH, WSL and Dev Containers |
| Reference |
Commands, tools and settings |
Development
npm run watch # typecheck + bundle in watch mode
npm run check-types
npm run lint
npm test # full VS Code test host
npm run package # production bundle (typecheck + lint + esbuild)
npm run package builds the production bundle. To package and install the extension, use
./scripts/reinstall.sh:
./scripts/reinstall.sh # build, package and install
./scripts/reinstall.sh --build-only
The docs site is VitePress:
cd docs
npm install
npm run dev
See CONTRIBUTING.md
for the development setup, checks and documentation style.
License
Comonad Agent for VS Code is licensed under AGPL-3.0-only. See
LICENSE.
Third-party components and their licenses are listed in
THIRD_PARTY_NOTICES.md;
provenance notes are in
NOTICE.