Agent tools

The insilode MCP server

Claude Code over /ide only shows its model the getDiagnostics tool, so Insilode ships its own small MCP server, insilode, that lets an agent work with the editor. Every tool is marked read-only (readOnlyHint), and here that means one thing: a tool never writes a file. It may still change what Insilode shows (a board, a tour, the canvas, an opened file or diff). Paths must lie inside an open workspace folder, and folders in flow.exclude are left out of the answers (see languages.md). Tool descriptions stay under 600 characters (a test checks it); the rules and examples live in the MCP prompts and the server instructions.

Tool What it does
open Opens a file at a line or range, without taking focus
open_diff Opens git changes (modified, staged, deleted, new) in the multi-file diff view, optionally also on the flow canvas; base picks what they are measured against: uncommitted (HEAD), the whole branch, the last commit, a commit or branch you name (ref), or where the calling agent session started (session; only for agents started from the Agents dock, otherwise use branch or ref; only the repository the session ran in is compared)
get_diagnostics The errors and warnings the language servers report now, for a file or the whole workspace
find_symbol Searches classes, methods, functions and fields by name
go_to_definition, find_references Where a symbol is defined (with its signature), and every place that uses it
find_entry_points Free-text search over endpoints and jobs ("delete user" finds DELETE /users/{id})
show_flow, flow_text Opens the flow canvas, or returns the call chain as compact text (files, call lines, tables touched; ~table after a database line means the table name is a guess)
impact Who calls a method, and which entry points reach it (through interfaces, mediators and, as a guess, HTTP calls and messages between services). With table or entity instead of a method: the endpoints that write that table and the endpoints that read it, each with the method and database card it goes through, a guess marked ~table?, and a "not checked" line (see Tables and entities). A migration file or an entity file alone (file without method or line) answers the same for the tables it changes, with what a migration adds and drops and the code that may still use a dropped column
get_context Active file, selection, flow on the canvas, open tabs, git changes, diagnostics, boards
draw_board, update_board, read_board The agent draws a flow, plan, class, ER, sequence, architecture, state or canvas board (format and lint: boards.md), explains it with steps, and ticks its steps off as it works. A canvas board answers with a picture of itself and the box of every element; update_board patches its elements, read_board returns the spec, the boxes and what the user moved or noted
board_from_code Generates a board from the index instead of the agent drawing it: sequence (the calls of an endpoint or method, in order, between classes; HTTP, topic, mediator and name-only hops are dotted and marked ?), er (tables with columns, PK/FK, relations and cardinality from the entity and migration readers), architecture (modules or packages and their dependencies; C4 container level with several services), state (an enum and its transitions, only where a method assigns a value and checks the previous one; otherwise it answers with the reason it drew nothing). Takes a scope per kind and optional title, description and notes (never nodes or edges). Every node carries its symbol and file:line; boards are capped (8 lifelines and 30 messages, 20 tables, 30 boxes) and the result lists what was cut or guessed. The command Insilode: Board from Code… does the same from the canvas
tour, tour_control The agent walks the user through code on the flow canvas: a cursor moves from card to card, the rest dims, the lines it names light up and its caption says why. The tool returns at once with each step marked ok, moved, offflow (not on the drawn flow: shown as a side card) or missing (with the closest names); the user steps through it by hand. tour_control answers the user's questions (note, go, edit, resume) or closes the tour
check_skeleton Skeleton first (opt-in, insilode.skeletonFirst.enabled). Called once after a plan that adds types is approved: says the mode is off (implement as usual), or asks for the design as a class/ER board and a stop; later returns the developer's skeleton against that design, each planned type and member matches, MISSING or DIFFERS with what the code has. Read-only. See skeleton-first.md
search_sessions Searches this workspace's past Claude Code (~/.claude/projects/<folder>/*.jsonl, CLAUDE_CONFIG_DIR) and Codex (~/.codex/sessions, archived_sessions, CODEX_HOME; only sessions whose cwd is the workspace) conversations: all words of query in one prompt or answer, tool output excluded. Returns per session the agent, id, date, first prompt and a snippet; limit (10, at most 50) and agent narrow it. Answers "was this done before?" Prompt and reply text comes back verbatim, so anything pasted into a past session reaches the MCP client; the tool's description says so ("it can contain secrets you typed"). Obvious secrets are blanked first (src/mcp/redact.ts): API keys and tokens (sk-, ghp_, xox*-, AKIA, JWTs), Bearer tokens, password, token, secret and api_key values in key=value, key: value and JSON forms, a long hex or base64 run after a key or token word, and private key blocks. The key name stays and the value reads [redacted]. This is a net for the obvious: a password in plain prose is not caught, and text past 1,000,000 characters is cut. A transcript counts only when its recorded cwd is a workspace folder, and one call reads at most 8 MB per transcript and 200 MB in all (the answer says when that cut the search short).
  • Agents started from the Agents dock get the server automatically (flow.agents.mcp, on by default; it adds --mcp-config and keeps your own MCP servers).
  • Bypass permissions is off in terminal Claude sessions unless you turn on flow.agents.claude.allowBypassPermissions (machine scope: a workspace's settings cannot set it). The menu beside the Claude button in the Agents dock (and More on the Agents page) has Allow bypass permissions mode…: it shows a warning and, once you confirm, turns the setting on for your user; with the setting on the same item reads "offered (turn off)" and turns it off without a warning. It applies to sessions started afterwards, since a running Claude cannot gain the flag. Sessions then start with --allow-dangerously-skip-permissions, so Claude Code's own bypass-permissions mode can be chosen with Shift+Tab; sessions still do not start in it.
  • Codex never asks is off unless you turn on flow.agents.codex.neverAsk (machine scope, like the Claude one). Codex has no flag that offers a mode without enabling it, so with the setting on, Codex sessions start with --ask-for-approval never --sandbox workspace-write: Codex stops asking before it edits files and runs commands, but stays inside its workspace sandbox. Insilode never passes --dangerously-bypass-approvals-and-sandbox or danger-full-access. The menu beside the Codex button in the Agents dock has Start Codex without asking… (a warning, then the setting is turned on for your user; with it on, the item reads "turn off" and turns it off without a warning), and the launcher's Permissions row on the Agents page offers Ask each time or Never ask (sandboxed) for Codex. It applies to sessions started or resumed afterwards.
  • A claude you start yourself gets it after the command Insilode: Connect Claude Code Tools (MCP). It shows the exact claude mcp add it will run and changes your Claude Code user configuration only when you confirm; Disconnect removes it.
  • Each Insilode window lists itself in ~/.insilode/bridge/<pid>.json (loopback port and token); the server picks the window whose workspace folder contains its working directory.
  • In plan mode, the plan an agent submits is drawn as a board (flow.agents.planBoard), its steps move to doing and done as files are edited, and when a turn ends the Agents dock lists the flows it touched (flow.agents.turnImpact), and the table, with its endpoint count, when an edit landed in an entity. That list follows the methods the turn's edits landed in, and names them on hover; an edit outside every method (an import, a field) counts its whole file. Boards open as a Markdown preview with a Mermaid diagram; Insilode: Show Board… lists them.

Guided tours. The server instructions, the tour description and the tour_guide prompt tell an agent to explain code by showing it: "walk me through how X works", "explain this flow" or "anlat" should end in a tour call, not a text-only answer (show_flow and flow_text point there too). The agent also writes a 3 to 5 line summary of the answer in chat, so a reader without the canvas still gets the answer. To explain code, an agent calls tour with 3 to 12 steps in the order the code runs. A step names its code by file + method (it survives edits) with a line hint, and lines for the few lines the caption talks about; table points at a database card; a step with only a caption is an intro or an outro. flow says which canvas to play on: an entry point id, a file with method, or {"changes": true} for the git changes; left out, the tour plays on the canvas the user has open. Limits: 30 steps, captions of 600 characters in plain text (code in backticks is shown as code), 3 highlighted ranges of 80 lines, one tour at a time (a new one replaces it). A path outside the workspace, a field the tool does not know or a limit that is exceeded is an error that names it. The MCP prompt tour_guide (in Claude Code: /mcp__insilode__tour_guide) holds the advice for writing good tours. A tour file played from the command palette (Insilode: Play Tour from File…) uses the same format and checks; see editor/extensions/flow-view/test/tour-fixtures.

Marks, hands-on steps, follow-ups and edits. A tour step may carry up to 6 pen marks drawn over its card as its caption is read: ring, underline and strike mark lines, check and cross sit beside a line, badge shows the order number n, and connect draws a curved arrow to the code at to (file + method) with a label. Each mark appears with the caption sentence named by sentence (default 1); a mark that cannot be placed is dropped and the tool answer says so next to the step's state. A step with wait is hands-on: the tour does not go on until the reader clicks the step's card (click), presses its button (command: the host runs that command only when it is on a short explicit allowlist and reads the id from its own copy of the tour, never from the page) or presses Continue (continue). followUps (at most 3, 120 characters each) are shown as chips after the last step and asked like a typed question. tour_control edit fixes or extends a playing tour: steps with replace (a 1-based step) or insert (a 1-based position), accepted only while the reader is paused or waiting for the answer; the reader stays on their step and notes on unchanged steps stay.

Asking during a tour. The tour bar has an ask box (/ focuses it; a tour of your own changes has none). A question pauses the tour on its step and goes, as a prompt that quotes it as the user's own words, to the agent that made the tour: agents started from the Agents dock tell the insilode server their session (INSILODE_SESSION, one MCP config file per session), and a tour of an agent Insilode did not start has a plain pointer and sends the question to the agent chosen for questions. The agent answers with tour_control note (pinned to the step's card and shown under its caption until the tour ends, up to 10 per step), may go to a step that answers it better, and then resume; the user may also press play. go is accepted only while the tour is paused or waiting for an answer. The cursor takes the agent's name and colour from the dock.

Point and ask. On any card, the ? tool in its header, Alt+click, or ? with lines selected in its code opens a small box at the card; the selection (or the whole method) is what is asked about. The question goes to the agent chosen for questions with the code, the lines and the flow, and the agent answers by playing a short tour on the same canvas; the question is that tour's first note. An agent without the insilode tools answers in text.

Skeleton first. Each agent's row in the Agents dock has one Skeleton button (pressed when on; its tooltip says what it does). It lets the developer write the structure of a change themselves, for that agent only; the setting insilode.skeletonFirst.enabled (off by default) is the starting value for agents not switched by hand. Before its first edit for a request or an approved plan that adds or changes types (plan mode or not), the agent calls check_skeleton, draws its design with draw_board (every new or changed type with the members to write), stops, and tells the developer which types are new, which existing types get which members, and what to say next. The rest is a conversation: the board colours each planned type and member from the type index after every save (matches green, missing grey, differs amber, and types that already existed neutral, with only the members the change adds to them coloured); "check" makes the agent explain each difference without fixing it; "hand over" (check_skeleton step handover) has it fill the bodies and close with a tour; "just do it" skips the whole thing. A declaration the agent then changes shows on the board and in the agent's reply, with the before and after text; "keep it" accepts it, and "revert" (or the command Insilode: Revert an Agent's Change to Your Declaration) puts the developer's declaration back, body untouched. Nothing is scored and nothing leaves the machine; the MCP prompt skeleton_first holds the agent's side of the flow.

Explain this. When an agent has finished a turn in which it edited a file, its row in the Agents dock offers Explain this. It types a prompt into that same session (the author explains its own change; never into a session that is working or asking a question) that names what the turn touched, taken from the turn-end check (the methods, the tables, the endpoints; or, when there is none, the files), and asks for a tour on the git changes: one step per changed method in the order a request runs through them, a step for each changed table, captions on why it changed and what could break, and a last step on the risks. The same request is the MCP prompt explain_change (in Claude Code: /mcp__insilode__explain_change). It explains the latest turn only.

Changes in flow. Ask an agent to "show what you did in flow" (it calls open_diff with flow: true), or run Insilode: Show Git Changes in Flow from the command palette, the Source Control title or a diff editor. Either way one canvas shows the whole change set: every endpoint flow the changed files reach, cut down to the paths that lead to a changed method, plus the changed methods no endpoint reaches. Changed cards show added lines in green and removed lines in red. Pick what to compare with:

  • Uncommitted changes: against HEAD. Cards offer Undo and Keep.
  • This branch: everything since the branch left main or master, committed or not. On main itself, the commits not pushed yet.
  • Last commit: the last commit plus anything uncommitted on top.
  • A commit or branch: everything since the one you name, committed or not.
  • An agent session: everything since that session started (committed along the way or not). Uncommitted work that was already in the same files before it started shows up too. Agents started from the Agents dock only.

A branch or last-commit card says "Changed since main" and has no Undo, because Insilode does not undo commits.

Test files (unless flow.showTests is on) and hunks that only change comments or whitespace are left out, and the root card says how many files were hidden. A real change is never hidden: when Insilode cannot tell a comment from code (a language it does not read, or a literal it does not understand), every hunk is shown. Comments are recognised in Java, Kotlin, C#, Go and Python. In JavaScript and TypeScript only whitespace-only changes are left out for now: their grammar needs a parser to tell a comment from JSX text or a regular expression. On the canvas, the Changes rail lists the changed methods by file with their + and − counts and a viewed tick. Outside a tour, j, n or ] go to the next change and k, p or [ to the previous, v marks the card viewed and goes to the next one not viewed, and f or / finds a card by method or class name (Enter and Shift+Enter cycle, Esc closes).

Home's prompt and Ask about this flow send the question to the agent you choose. The first time, a picker offers the running sessions that are waiting at their prompt (Claude Code, Codex, or a custom agent marked acceptsInput), a new Claude Code, Codex or custom session, the chat panel when a chat provider is installed, and the clipboard. Later questions go to the same place without asking; a note in the status bar says where each one went, and clicking it (or Insilode: Change Agent for Questions…, or change under Home's prompt) picks again. If the session you chose has closed, the question goes to another waiting session of the same CLI, else a new one. Text is only typed into a session that is at its prompt, never into one that is working or waiting on a permission question: then the question goes to the clipboard. The setting flow.agents.askTarget makes it ask every time, or fixes it to claude, codex, custom:<name>, chat or clipboard. Insilode: Pin Flow as Board keeps the flow on the canvas as a board, so boards do not need an agent.

The Agents page

The Agents button in the title bar opens a terminal workspace (editor/extensions/flow-agent/src/agentsPage.ts; the layout rules are paneLayout.ts, the terminals are xterm.js). The list on the left holds every project the agents have worked in, this window's included, each with its sessions and its earlier ones (with a search through their conversations). Projects with a live session come first, then the most recently active; each project's header has one small + that opens the launcher on its folder. Every session is one kind of row: a state dot on the left (working, needs you, idle or done, or a hollow ring once it has ended), the name, the harness's mark on the right and a muted line with where it runs and its state ("Claude desktop · working", "Claude Code · ended 1h ago"). Each row can be dragged: onto a pane's middle to open it there, onto an edge to split that side, onto the empty workspace to open the first pane. A click or Enter opens it in the focused pane. A pane's header drags too (onto another pane's middle the two swap, onto an edge it moves), a double-click maximizes it, and the gutters between panes drag or take the arrow keys. Panes keep a usable minimum size: a split that would leave one too small is refused with a note. At most 16 panes.

  • Its own window. On the desktop the page opens in a window of its own (flow.agents.page.location, window by default; tab makes it an editor tab, and the web UI, which has no second window, always does). The window shows only the page: no editor tabs, breadcrumbs, status bar, command centre or menus, just a title bar to drag. It is a compact auxiliary window that VS Code's core makes for the page (_insilode.agents.openWindow, editor/patches/flow-core.patch), so the page is created in it directly, with no tab flashing in the main window. Nothing else is meant to be in it: a file or board opened from the Harness panel or from "show changes" opens in the main window, a tab dropped on it is refused, an editor that still arrives is moved to the main window, and the compact toggle is not offered. Opening the page again brings the window to the front; closing the window closes the page (the agents keep running in their terminals). The window is not saved with the workspace, so a restart does not bring it back empty; it remembers its size and position for the next time it opens. It recognises the page by its view type: if the window finds no page within a few seconds it closes itself, and a page that opens in another group meanwhile is moved into it.

  • Agents only. The editor window is optional while the Agents window is open. Start with the Agents window alone by running insilode --agents-only or the Insilode Agents shortcut the Windows installer adds to the Start menu; on a running Insilode the same flag brings its Agents window to the front. The editor window is created hidden and never shows during that start. Closing the editor window (the X button, File > Close Window) then hides it instead: Insilode, its extension host and every agent keep running. Quit is not turned into a hide, and it asks nothing. The window comes back (shown and focused) when an editor opens in it (Open in IDE, quick open, Show in Flow), with Insilode: Show IDE Window from the command palette, when you start insilode again without the flag, after a reload or a renderer crash, on macOS when you click the Dock icon, and, when it must ask about unsaved files, on Quit or Close. A click on an agent in the status island opens that agent in the Agents window and brings it forward, and a window that merely stops responding stays hidden. While it is hidden, quick open, the command palette, notifications and dialogs show in the Agents window. Closing the Agents window (its X button, Ctrl+W on its tab) while the editor window is hidden ends the agents, so with at least one agent running it asks "N agents running, close?" (Close or Cancel), and on Close the hidden editor window closes with it (the app quits when that was the last window; on macOS it stays in the Dock). With no agent running it closes without asking, and with the editor window visible it closes without asking too: the agents then keep running in the editor window. Agents still end when the Agents window closes while the editor window is hidden. Behaviour only a desktop build has: none of it exists in the web UI.

  • Starting a session. + New session in the toolbar opens one popover: the harness (Claude Code, Codex, your own agents), the folder it starts in (the focused pane's project, else this window's; Change… offers the projects the list knows and Other folder…, which opens a folder dialog), Worktree, Permissions and Start, with Resume a session… and Start an Agent… as links. A worktree and your own agents start in this window's project only, because the editor's commands for them take no folder. Permissions shows the setting of the chosen agent: Claude's bypass setting (flow.agents.claude.allowBypassPermissions), which applies to every Claude session you start afterwards and still starts asking, or Codex's flow.agents.codex.neverAsk (Ask each time / Never ask (sandboxed)); flipping either to its permissive side asks for confirmation. Next to the button the toolbar counts the sessions by state (working, needs you, done; a count of zero is not shown), this computer's other programs' sessions included.

  • Terminals. A session of this window shows its real terminal, mirrored: what you type goes to the agent. Closing a pane does not stop the session. An earlier session, or one of another project, is resumed in its folder (Insilode asks no question of its own about a folder: the agent's CLI asks its own trust question. A folder outside this window's project starts only if you have run an agent there before (it is in the sidebar's list), chose it with Change… > Other folder… in this window, or trusted it under an earlier version; anything else is refused with a sentence telling you to choose the folder first. Forget Folders Chosen for Agents takes back the last two kinds). A session that ends shows Session ended with Resume. A session running in another Insilode window opens as a read-only pane with Go to that window.

  • Running elsewhere. A session that another program on this computer runs (Claude Code in a terminal app, the Claude desktop app, another editor) is a row of its project like any other, with its status dot, the program in the muted line ("Claude desktop · working") and the toolbar's counts, and sorts to the top of its project. Claude Code lists its running sessions in ~/.claude/sessions (or $CLAUDE_CONFIG_DIR/sessions); Insilode reads that, and drops entries whose process is gone. Opening one gives a read-only pane (the tail of its transcript, refreshed every few seconds while it runs) with the banner Running in — read-only here; once it stops, Resume here starts it in a terminal. A session that something still runs is not resumed here unless you insist, because two processes on one conversation corrupt it: every way of resuming (the page, the command palette, a click on an ended agent) ends in one check of the registry, made at the moment of the click and again after any folder question. The command palette and clicks show a modal naming where the session runs, with Resume anyway; the page's pane shows the sentence with Retry and Resume anyway, and that button only asks the editor, which shows the same modal itself before it goes on. A stale file whose pid another process has taken since (macOS and Linux: one ps for that process's start time, asked only on a resume) is ignored. A pid that belongs to another user does not count as running (on Windows such a pid does: Claude may have been started from an elevated terminal), and the registry is read whole, so stale files of dead processes cannot hide a live one. Codex keeps no list of running sessions, so a Codex session whose transcript changed in the last two minutes is only marked active recently, an estimate, and resuming it asks for a second thought (Resume here anyway).

  • Pane header and changes. A pane of a session of this window shows the skeleton-first switch as a bone icon button (the dock's wording in its tooltip) and, when the agent is in it, the steps Design › Skeleton › Handover with the current one emphasised and a skipped badge. After a turn that changed files a slim strip under the header says how many files changed, the flows they affect (up to three chips, then +N) and Open in flow.

  • Needs you. A strip above the panes lists every session that waits for you: this window's, other Insilode windows' and, when Claude Code says it is waiting for you, other programs'. A chip focuses the pane when it is open, otherwise opens the session in the focused pane (another window's goes to that window). The count is also the toolbar's needs you. The strip is not there when nothing waits.

  • Views. Board and List stay as overviews; opening an agent from them switches to the workspace.

  • Layouts. The workspace is remembered per project and comes back when the page opens: a pane whose session still runs attaches again, any other waits with Resume; nothing starts on its own. The ⋯ menu keeps up to 20 named layouts (16 panes each) that every project can apply, next to Keyboard shortcuts.

  • Keys (they work inside a terminal too, and are not sent to the agent). The modifier is Ctrl+Option on a Mac (it types nothing there) and Alt+Shift on Windows and Linux (Ctrl+Alt is AltGr on many layouts). Letters are matched by the physical key, so they are the same on a Turkish Q keyboard as on a US one: modifier + the arrow keys focus the pane in that direction (by where the panes sit), R splits right and D splits down with the selected session in the list, W closes the pane, M maximizes or restores it, PageUp / PageDown swap the pane with the previous or next one, S the session list, N the next session that needs you, H the Harness panel. ⋯ → Keyboard shortcuts in the toolbar lists them, with the modifier of your platform, and the buttons name theirs in their tooltips. Everything on the page is reachable without a mouse.

  • Harness panel. The header's Harness button (or the H key) opens a panel on the right with the harness of the project of the focused pane (its folder; with no pane, this window's folder): the instructions files (CLAUDE.md, AGENTS.md, rules) with their size, the hooks (event → command, and whether the user's, the project's or your local settings define them), the permission rules (allow / ask / deny, with the default mode), the MCP servers (transport, scope), the skills, subagents and slash commands, and the harness lint's findings, the same ones npm run harness:lint prints (harness-lint.md). A click opens the file, at the line. It is read-only and kept to a size: lists are capped, a command, rule or server line is shown with anything that looks like a credential hidden (FOO=***, --token ***, URL user info, Authorization header values), and no file's contents are sent to the page. The page can only ask about folders it was given (this window's, its sessions' and the projects of the sessions list) and can only open files the summary named. Whether it is open, and how wide, is remembered with the layout. On a narrow window it covers the panes instead of squeezing them. Open Harness and Hooks studio open this window's own harness views.

How agent status works

Insilode starts claude with --settings <file> that adds observe-only hooks on top of your own settings (your hooks still run). Each hook runs a small Node script that posts the event to the Insilode window. The hooks never answer a permission question: Claude Code keeps asking you itself. The one thing a hook hands back is context for the agent to read: while Skeleton first is on for that agent, the hooks remind Claude to call check_skeleton before its first edit for a change that adds types: with each prompt (UserPromptSubmit, so it works outside plan mode) and when a plan is approved (PostToolUse on ExitPlanMode).

Codex reads hooks only from its config layers, so Insilode writes its own profile, $CODEX_HOME/insilode.config.toml, the first time it starts Codex, and starts it with codex -p insilode; your config.toml is not changed, and a codex you start yourself does not see these hooks. Codex runs a hook only after you trust it: run /hooks in Codex once and trust Insilode's. Until then the dock shows a hint instead of a status. An older Codex that cannot take -p insilode is started as before, without status. Turn it off with flow.agents.codexHooks.

Custom agents (any other CLI) are listed without status.

This page is docs/agent-tools.md in the repository. Suggest a change.