Code & sub-agents
Work on a code project in the Midium IDE, or let Cursor, Claude Code, Codex and other agents hand work to Midium's Reader and Browser sub-agents.
For everyone
What Code is for#
Code is where Midium works on software projects. It has two views, switched at the top of the page:
- Midium IDE: Code chats. A Code chat is tied to one project folder (or a Project that spans several). The model reads and searches the code, edits files, runs commands and dev servers, and can write a plan for you to approve first.
- Sub-Agents: Midium's helpers for other coding agents. Cursor, Claude Code, Codex and other MCP clients can hand reading and browsing work to models on your Mac.
Midium reopens the view you used last.
Start a Code chat#
- Click Code in the sidebar and choose Midium IDE, or hover Code and click + (New IDE chat).
- Click Open a folder…. Go into your project folder with
cd, then click Use this folder. - Type what you want done.
The chat stays on that folder. Until a folder is picked, the model has no file tools. In the sidebar, Code chats are grouped by folder.
The IDE#
- Header: the folder (or project) button, the git branch, and a Background processes chip when something is running. Open the chip to see output or stop a process.
- File tree: All files shows the folder. Changed lists the files this chat changed.
- Editor: tabs for open files, with changed lines marked. Your own edits save automatically and can be undone like the model's. A file the chat changed shows a bar with Show changes and Undo this file.
- Terminal and browser: toggles in the window's title bar open a terminal and a browser beside the chat. The terminal is yours; the model runs its own commands separately.
- Files beside the chat or in the side pane: the arrow button in the files header (Move to side pane) moves the file tree and editor into the window's side pane, as a Files tab next to the browser and terminal, so the chat gets the page. Open files and unsaved edits come along. Put back beside chat moves them back. Midium remembers where you left them. In the side pane you can stack Files above the browser or terminal with the stack button. ⇧⌘E shows or hides Files wherever they are.
What the model can do#
- Read and search the project, and navigate code: find definitions, real uses, callers and call paths.
- Create, edit and delete files and folders.
- Run commands such as tests, builds, git and package installs. File changes made by commands are recorded, so the turn can still be undone.
- Start dev servers, watchers and long builds in the background, read their output and stop them.
- Search your vaults. When the project folder is inside a vault, the chat is grounded in that vault automatically.
- Look at images in the project, ask you questions with buttons, hand a long job to a background task, and browse a page (your running app, documentation) and report back.
Plan mode#
Click the clipboard button in the message box to turn on plan mode. The model explores the code read-only and writes a plan with a summary and steps. The plan opens in an approval dialog:
- Approve: the model starts working through the steps.
- Edit: change the plan, then Save & approve.
- Reject: give a reason so the model can revise it.
Once approved, a checklist above the message box shows each step's progress.
Changes and approvals#
Code changes your real files directly. After each turn, a card under the reply lists every file the turn changed, with Undo to put them all back. Undo this file in the editor undoes one file. Every change is also listed in Settings → Changes.
The approvals menu (Ask before writing, Ask for risky actions or Auto) works as in Chat. Commands that can't be undone, such as git push or publishing a package, ask first unless the chat is on Auto. A change outside the project folder offers Trust that folder (Code can change files there from now on, with undo), Allow once or Don't allow. See Trusted folders.
Pick the model under the message box. Settings → Agent sets the default model, the default thinking level for Code (High unless you change it) and the default approval level.
Sub-Agents: Midium's helpers in other agents#
The Sub-Agents view lets another coding agent hand work to two helpers that run on your Mac's models:
- Reader: reads and searches the project and the web, and searches the vaults you've opened to external agents. Your agent gets back only the Reader's answer, not everything it read.
- Browser: opens pages, clicks and reads them.
Your agent makes the code changes itself.
Connect an agent#
Under Connect your agents:
- Cursor, Claude Code and Codex: one click adds Midium's sub-agents and your vaults over MCP.
- Hermes Agent, OpenClaw and OpenBot: Midium becomes the agent's model provider.
- Any other MCP client: Copy URL, or Manual config for the full setup.
Midium must stay open while an agent uses it. The same agents are in Settings → Connectors. See Connectors & agent apps.
Set up the helpers#
- Default model: the model helpers on Default use. Choose one so your agent can use them.
- Per helper: Model (its own model, or Default) and Max steps (tool calls before it reports back).
- Browser helper: choose Browser pane (drives Midium's own Browser pane, so you can watch it) or Agent Browser (Midium's bundled Chrome for Testing; it runs in its own Chrome, so you won't see it in the Browser pane, and installs once). The Midium IDE always uses the Browser pane.
Live activity shows what the helpers are doing.
Something here wrong or out of date? Tell us.
