Skip to content

VS Code

The extension in editors/vscode puts malac in the activity bar (the pig), next to the other agents you may use there. It has a native chat panel, the daemon’s workspaces, jobs and sessions, and a usage view, and it follows the editor’s light, dark and high-contrast themes.

It is a client of the daemon, so agents you start in the editor also appear in the terminal UI and the browser, and they keep running when the window closes.

The extension is a .vsix file attached to each release, and the same file works in VS Code–compatible editors such as Cursor, Windsurf and VSCodium. It is not on the Visual Studio Marketplace yet.

  1. Download malac-vscode-1.1.0.vsix from the v1.1.0 release.

  2. Install it, from a terminal:

    code --install-extension malac-vscode-1.1.0.vsix

    or in the editor: Extensions view → … (Views and More Actions) → Install from VSIX…, then pick the file.

  3. Reload the window if the editor asks, then click the pig in the activity bar, or run malac: Focus Chat (⌘⌥M, or Ctrl+Alt+M).

malac itself must be installed and configured with a provider. The extension finds malac on your PATH, in ~/.local/bin, ~/.cargo/bin or Homebrew; set malac.path if it is elsewhere.

  • Streaming transcript. Answers stream in as Markdown, thinking folds away, and every tool call is a card with its command, diff or output. Subagents get a card that follows them live and opens their own transcript.
  • Approvals inline. A tool call that needs permission shows Allow, Always (for the rest of the session) and Deny on its card. Requests from subagents appear above the composer.
  • Composer. Enter sends, Shift+Enter starts a new line, ↑ recalls earlier prompts, and Esc stops a running agent. The model picker sets the agent’s model, the mode button switches the tab between Ask, Edits and Autopilot (Shift+Tab cycles), and Stop cancels the turn.
  • Current file. A chip shows the active editor’s file, README.md, or with a selection README.md:12-30. A saved file goes with the next message as an attachment; selected lines, or a file with unsaved changes, go inline with their path and line numbers. Click the chip to leave the file out; it stays off until you turn it on again.
  • Files and images. Type @ to pick workspace files. Drop files from the Explorer (hold Shift while dragging into the panel; VS Code wants that) or from Finder, and they are attached by path. Drop or paste screenshots and images (PNG, JPEG, GIF, WebP), and they go with the message as images.
  • Agents and tabs. The header switches between the tab’s agents, subagents indented, and other tabs; + starts a new agent.
View What it shows
Workspaces Workspaces → tabs → agents and their subagents, with their status (running, awaiting approval, done, failed, saved). Click to open one in the chat; the context menu stops or closes agents, starts one, or closes a tab. The badge counts waiting approvals.
Jobs Background jobs the agents started, with the elapsed time or exit status. Click for the log, refreshed while it runs; kill one from the context menu.
Sessions Saved sessions by day, for this folder or all folders. Click one to continue it in a tab.
Usage Tokens and cost today, over the last seven days and per model, from the daemon’s session transcripts

The status bar shows how many agents run and how many approvals wait, and warns when the daemon runs another malac version than the one installed; click it to open the chat. When the chat is hidden or shows another tab, approval requests also appear as notifications with Allow, Always and Deny.

Command What it does
malac: Focus Chat (⌘⌥M / Ctrl+Alt+M) Opens the chat and focuses the composer
malac: Ask About Selection Opens the chat with the selection as context. Also in the editor’s context menu.
malac: Add File to Context (⌘⌥K / Ctrl+Alt+K) Attaches the active file, or the files selected in the Explorer
malac: New Agent The next message starts a new agent in the chat’s tab
malac: New Tab for This Folder Opens a tab for the folder, the repository root, or another folder
malac: Stop Agent Stops the chat’s agent, or picks a running one
malac: Open Full UI The whole web UI in an editor panel
malac: Restart Daemon malac daemon restart, for example after updating malac; asks first when agents or jobs run
malac: Reconnect to Daemon, Show Log, Run in Terminal Reconnect, the extension’s log, and the terminal UI in the workspace folder

The extension connects to the daemon named in ~/.malac/daemon.json when one runs. When none does, it starts one the first time you open malac or run one of its commands, with malac web --port 0 --json-ready --cwd <folder>. It reconnects when the connection drops, finds a daemon that restarted on another port, and starts it again if it crashed. A daemon you stopped on purpose stays stopped until you click Start daemon in the chat.

When the workspace folder has no tab, the chat offers to open one. If the folder sits inside a larger git repository, it suggests the repository root instead, so agents can work across the stack (see Monorepos). The choice is remembered per workspace; malac.folderTab sets the default.

On macOS, a daemon the editor starts runs the control service as the editor’s, so desktop control needs its permissions granted to the editor; see macOS permissions.

In remote windows (SSH, containers), the extension runs next to the remote extension host, so it uses the daemon on that machine.

Setting Default Meaning
malac.path malac The malac binary. With the default it is looked up on PATH, then in ~/.local/bin, ~/.cargo/bin and Homebrew.
malac.extraArgs [] Extra arguments for malac web, for example ["-y"] or ["--profile", "fast"]
malac.home empty The malac home; empty means $MALAC_HOME, else ~/.malac
malac.startDaemonOnStartup false Start the daemon when the editor starts instead of on first use
malac.folderTab ask ask, folder, repositoryRoot or never: what to do when the folder has no tab
malac.approvalNotifications true Approval notifications when the chat cannot show them
malac.chat.includeCurrentFile true Whether the current-file chip starts out on
malac.connection local Which daemon. Only local works for now; saved connections to other machines are planned.

To work on the extension, open editors/vscode from the malac repository in VS Code and press F5, or:

cd editors/vscode && npm install && npm test \
&& code --extensionDevelopmentPath="$PWD" /path/to/project

npm run package builds the .vsix.

malac is created by lobirus and released under the MIT license. About malac