The official MothX client for Visual Studio Code. Sessions live in the sidebar; chat opens in the editor next to your code. ACP is the transport — the product is MothX.
- Editor chat: New Chat / a session opens a chat tab beside your code
- Sessions sidebar: current and previous mothx sessions, without a multi-agent marketplace
- Editor actions: Explain / Fix / Tests from the editor context menu
- @ files: type
@in chat to attach a workspace file as an ACP resource link - Mode-aware permissions: follow mothx
plan / agent / yolo / osunless you override it - Session Config Options: Provider / Model / Mode / Thinking (and boolean switches mothx advertises) live in the editor Chat header, not the input bar; the status bar shows the same summary
- Interactive Chat: built-in chat panel with Markdown rendering, inline tool call display, and collapsible tool sections
- Thinking Display: see agent reasoning in a collapsible block with streaming animation and elapsed time
- Slash Commands: autocomplete popup for agent-provided commands and skills
- File System Integration: MothX can read and write files in your workspace
- Terminal Execution: MothX can run commands with terminal output display
- Permission Management: configurable auto-approve policies for agent actions
- Protocol Traffic Logging: inspect all ACP JSON-RPC messages with request/response/notification labels
- Chat Persistence: conversations are preserved when switching panels
- Install the mothx CLI and this extension
- Open a workspace in VS Code
- Click the MothX icon — the sidebar lists sessions
- Click New Chat — chat opens on the right
- Use editor context menu MothX: Explain / Fix / Tests on a selection
- Node.js 18+
- The
mothxCLI installed and on yourPATH - VS Code 1.85+
This client talks to local mothx:
| Setting | Default |
|---|---|
mothx.cliPath |
empty (use PATH) |
mothx.acpArgs |
acp --mode yolo |
mothx.autoStart |
true |
mothx.permissions |
followMode |
Extra ACP agents stay behind mothx.experimental.extraAgents and are not shown in the default UI.
| Command | Description |
|---|---|
MothX: New Chat |
Create a new mothx session |
MothX: Open Chat |
Focus the editor chat panel |
MothX: Explain / Fix / Tests |
Send the current file or selection |
MothX: Start |
Start mothx if it is not running |
MothX: Doctor |
Run mothx doctor (ACP or mothx doctor --json) |
MothX: Inline Chat |
Ask about the current selection in a comment thread |
MothX: Open Settings |
Open mothx client settings |
| Shortcut | Action |
|---|---|
Ctrl+Shift+A (Cmd+Shift+A on Mac) |
Open Chat Panel |
Escape (when a turn is in progress) |
Cancel Current Turn |
- Node.js 18+
- VS Code 1.85+
npm installnpm run compile # One-time build
npm run watch # Watch mode for development
npm run dev # Launch a VS Code Extension Development Host with the MothX extension loaded (auto-recompiles on save)You can also open a specific workspace in the dev host:
npm run dev -- /path/to/your/projectAlternatively, open the project in VS Code and press F5 to launch the Extension Development Host (this uses the bundled .vscode/launch.json and also starts the webpack watch task).
npm run pretest # Compile tests + lint
npm test # Run testsnpm run package # Production build
npx @vscode/vsce package # Create .vsixThe extension follows a modular architecture:
- Core:
AgentManager,ConnectionManager,SessionManager,AcpClientImpl,SessionHistoryStore - Handlers:
FileSystemHandler,TerminalHandler,PermissionHandler,QuestionHandler,SessionUpdateHandler - UI:
SessionTreeProvider,ChatWebviewProvider(media/chat/),InlineChatController,MothxChatParticipant,StatusBarManager - Config:
AgentConfig,WorkspaceMcp,WorkspaceRoots - Utils:
Logger,StreamAdapter, mothx protocol / doctor / serve / workspace cwd
Communication with agents uses the ACP protocol (JSON-RPC 2.0 over stdio).
MIT — see LICENSE for details.