Code view
The code view is where you review what an agent changed. It shows diffs and files of the session’s worktree in code tabs, lets you edit and save them on the host, and connects to Claude Code the way VS Code does.

Open the code view
Section titled “Open the code view”The code view lives in the code pane, beside the terminal or on its own. See panes for the layout.
- Press
⌘⇧E(Ctrl+Shift+Eon Linux and Windows) to show or hide the code pane. - Select a file or commit in the git panel to open it in a code tab.
- Run Browse worktree files from the palette to open the file browser.
Code tabs work like terminal tabs while the code pane holds the keyboard: ⌘T opens a worktree browser, ⌘W closes the tab, ⌘1 to ⌘9 and ⌘⇧[ / ⌘⇧] move between tabs. On Linux and Windows use Ctrl for ⌘.
A tab you open with a single click is a preview, with its name in italics. The next file you open replaces it. Double-click the file or the tab, or choose Keep open from the tab’s menu, to keep it.
Read a diff
Section titled “Read a diff”A changed file opens as a diff. The toolbar switches between three layouts:
- file shows the file itself.
- unified shows removed and added lines in one column.
- split shows the old and the new file side by side.
A new code tab opens a changed file in the layout that Open changes as in settings chooses, the unified diff unless you change it. The toolbar changes the layout of one tab.
The diff layouts fold the unchanged lines, so the first change is near the top. fold in the toolbar shows or hides these lines in one tab, also in a comparison with disk and in an agent’s proposal, and Context lines in settings sets how many unchanged lines stay around each change. The file layout marks the changed lines in the gutter and in the scroll bar: green for added lines, blue for changed lines, and a red mark where lines were removed. A switch of layout keeps the place where you were.
Go from change to change
Section titled “Go from change to change”| Action | macOS | Linux and Windows | Command |
|---|---|---|---|
| Next change | ⌥F5 |
Alt+F5 |
Next change |
| Previous change | ⌥⇧F5 |
Alt+Shift+F5 |
Previous change |
After the last change of a file, Next change opens the next changed file at its first change. Before the first change, Previous change opens the previous changed file at its last change. The files come in the order the Files tree lists them. When only one file has changes, the commands go round that file. The shortcuts work while the code pane has the keyboard. When nothing has changes, the command palette does not list them and the menus show them dimmed.
ignore ws hides changes that only touch whitespace.
The same choices are in the tab’s context menu as Show file, Unified diff, Side-by-side diff, Ignore whitespace and Show unchanged lines.
Diffs of a commit or a branch
Section titled “Diffs of a commit or a branch”Select a commit in the git panel to diff its files against its parent. Shift-click a second commit to diff the whole range. Diff vs main in the git panel, or Open branch diff in the palette, diffs the whole branch against the point where it left the base branch.
A bar above the file names the commit or the range. Select × working tree in that bar to go back to the uncommitted changes. Files shown at a commit are read-only.
Browse files
Section titled “Browse files”The Files tree beside the editor has three filters:
- changes lists only the files with uncommitted changes.
- branch lists every file the branch changed since it left its base, committed or not, as its pull request would show them. A file opens as a diff against that base. The base is the branch the pull request merges into, or the repository’s main branch when there is no pull request. The git panel shows the same list while this filter is on.
- all lists the whole worktree as it is on disk, with files that git ignores, such as build output and
.env. A folder loads when you open it. Select the refresh button to read the open folders again; they also read again when you come back to the window.
The choice is kept across tabs and restarts. The panel button at the left of the toolbar, or Hide file tree in the palette, hides the tree to give the editor the full width.
Upload and download
Section titled “Upload and download”- Drag files or folders from your computer onto a folder in the tree to upload them there. Drop on a file to upload beside it, or on the empty area for the top of the worktree. A dropped folder keeps its layout.
- Select the upload button at the top of the tree, or right-click a folder and select Upload files…, to pick files.
- Right-click a file and select Download, or a folder and select Download as .tar.gz.
- Drag a file or folder from the tree to your desktop or a folder in Finder or Explorer to save it there; a folder saves as a
.tar.gz. This works where Chrome supports it, in the desktop app and in a browser that opens mocante directly, but not on a phone or a page paired through a hub. Use the right-click menu, or a long press, there. The address a drag carries opens only that one download, for five minutes, so a web page you drop a row on by mistake gets nothing else.
An upload keeps its file name. If a file with that name is already there, mocante keeps it and asks; select Replace in the notice to overwrite it. A folder with that name is never replaced. Uploads show their progress and can be cancelled, and work on a remote host and through a paired hub too. A file can be up to 1 GB.
A download has no size limit in the desktop app or in a browser that opens mocante directly. On a phone, or any page paired through a hub, a download can be up to 200 MB, because the page holds the whole file before it saves it.
On a remote host the file tree uses mocante’s agent on that host, which mocante installs when it connects. A host it cannot install the agent on has no file tree, and the tree says so.
The tree stays inside the worktree. A link that points out of it, or into .git, shows as a folder but lists nothing, and uploads and downloads through it are refused. Nothing can be uploaded into .git. A downloaded folder leaves out .git and keeps links inside it as links. A changed link to a folder shows its change letter on the folder row; right-click it and select Show change to see the change.
To open any file by name, press ⌘P (Ctrl+P) while the code pane is shown, or type / in the command palette.
Edit and save
Section titled “Edit and save”Worktree files are editable in every layout. Press ⌘S (Ctrl+S) to write the file back to the host. ⌘S does nothing when the file has no unsaved edits. Until you save, the tab shows a dot and the toolbar shows ● unsaved. Unsaved edits stay with the tab when you switch layout, change tabs or go back to the terminal. mocante asks before closing a tab or window with unsaved edits.
Some files open read-only:
- A file that is too large to load whole shows truncated · read-only.
- A file that is not UTF-8 text, such as an image, a font or a Latin-1 file, shows binary · read-only, so a save cannot change bytes the editor does not show.
- A file that did not load shows could not load file. Hover it to see why.
When a save fails, the toolbar shows save failed; hover it to see why. A file can be saved up to 1 MB.
A link inside the worktree saves to the file it points to. mocante does not open or save a file through a link that leads out of the worktree or into .git.
When the file changes on disk
Section titled “When the file changes on disk”An agent can edit a file while you edit it too. When the file changes on disk while your tab has unsaved edits, a bar above the editor says This file changed on disk since you started editing it, and a save does not write over the agent’s version. Choose one:
- Overwrite saves your edits over the file on disk.
- Compare shows the file on disk on the left and your edits on the right. If the file was deleted, the left side is empty. Edit the right side as you like, then select Overwrite, or Close compare to go back.
- Reload drops your edits and loads the file from disk.
The same three choices are in the command palette and in the code tab’s menu while the bar shows: Overwrite file on disk, Compare with disk (or Close compare) and Reload from disk. Overwrite file on disk asks you to confirm when you run it from the palette or a menu.
Preview markdown
Section titled “Preview markdown”A markdown file shows an eye button in the toolbar. It renders the file: headings, lists, task lists, tables, links and code with highlighting. It works on a changed file too, and shows the file as it is now rather than the diff. Click it again to go back to the editor. Preview markdown in the palette does the same. Unsaved edits show in the preview too.
The preview stays with the file you turned it on for: the tab shows the next file you open in it in the editor.
A link to another file of the worktree opens that file, rendered when it is
markdown. A #heading link scrolls to its heading. Web links open in your
browser. Images show as their description.
To read the plans and memory that Claude Code keeps outside the worktree, use agent docs.
Find and replace
Section titled “Find and replace”| Action | macOS | Linux and Windows | Command |
|---|---|---|---|
| Find | ⌘F |
Ctrl+F |
Find in file |
| Replace | ⌥⌘F |
Ctrl+H |
Replace in file |
| Find in files | ⌘⇧F |
Ctrl+Shift+F |
Find in files… |
| Replace in files | ⌥⌘⇧F |
Ctrl+Shift+H |
Replace in files… |
Find and replace in a file work only while the code pane has the keyboard, because the terminal uses Ctrl+F and Ctrl+H itself. Find and replace in files work from anywhere and open the code pane. The palette reaches all four.
In one file
Section titled “In one file”The find widget supports regular expressions, case matching, whole words and searching inside a selection. Replace is not available where the file is read-only: a file at a commit, a truncated file, or a change an agent proposes.
Across the worktree
Section titled “Across the worktree”Find in files… replaces the file tree with a Search panel. The search runs on the host with git grep. It reads tracked and untracked files and skips ignored and binary files.
- Results group by file. Select a group to fold it. The button beside the result count folds or unfolds all groups.
- Select a result to open the file at that line.
- The filter button opens Files to include and Files to exclude. Each takes comma-separated patterns such as
src/**/*.ts, *.md. A bare*.tsmatches at any depth. - The panel keeps its query per session. Select the back button to return to the file tree; that also clears the query.
Replace all rewrites the listed lines of every listed file on the host, then searches again to show what is left. It changes only the lines the search found, one line at a time, so ^import replaces on every line it listed. With a regular expression, $1 and so on insert captured groups.
A search that takes longer than 30 seconds stops and shows the matches it found as a partial list. A regular expression that git grep cannot read shows git’s message.
Go to definition
Section titled “Go to definition”The code view asks a language server for:
- Go to definition:
F12or⌘-click (Ctrl-click). - Peek definition.
- Find references:
⇧F12. - Hover information.
- Go to symbol:
⌘⇧O(Ctrl+Shift+O).
The server runs on the host where the worktree lives, so it sees the same files, dependencies and toolchain as the agents.
Install a language server
Section titled “Install a language server”mocante does not install language servers. Install the one you need on the host, either in the project or on the PATH of your login shell:
| Files | Server |
|---|---|
.ts .tsx .js .jsx .mts .cts .mjs .cjs |
TypeScript 7 in the project, or typescript-language-server |
.go |
gopls |
.rs |
rust-analyzer |
.py |
basedpyright-langserver or pyright-langserver |
.c .h .cc .cpp .cxx .hh .hpp |
clangd |
mocante looks first in the project’s node_modules/.bin, .venv/bin and venv/bin, so a version the project pins wins. Then it looks on the PATH your login shell sets up, so tools installed through mise, Homebrew, go or cargo are found, also over ssh. When no server is found, go to definition tells you what to install.
The first request can be slow while the server indexes the project.
Allow a project’s own language server
Section titled “Allow a project’s own language server”A language server in the project’s folders is a program the project’s authors put there. A repository you clone could put any program under that name, and a hover would run it. So mocante asks first, once for each workspace: the first time a request would run a server from the project, a notice asks Run this project’s language server? and names the program.
- Allow runs the project’s own servers for this workspace.
- Host’s only uses only the servers installed on the host’s
PATH, and never runs the project’s. A folder of the project on yourPATH, such as an activated virtualenv, counts as the project’s.
Until you choose, no language server runs for a file that the project has its own server for. Files of other languages still use the servers on the host. The choice stays on this device and does not sync to your other devices. To change it later, open the command palette and run Allow this project’s own language servers or Use only the host’s language servers for this project. This workspace’s servers that run stop, and the next request starts the ones you allowed. Servers of your other workspaces keep running.
The status bar shows waits for trust for a server that waits for this choice.
Check or restart servers
Section titled “Check or restart servers”In the code view, the session’s status bar names the language server for the file on screen, with a dot for its state. Select it to list every server for that host: running ones with their project and uptime, failed ones with the reason, and ones not started or not installed. Select a row to restart that server, or use Restart all. The palette has Restart language servers.
A server that keeps stopping waits before it starts again: 5 seconds, then longer after each stop, up to 5 minutes. The reason shows the last line the server wrote. A restart starts it at once.
Limits
Section titled “Limits”- Error squiggles and completion are not supported.
- Sticky scroll shows the enclosing lines by indentation, so opening a file starts no language server.
- Files at a commit and files over 2 MB get no answers.
- A result outside the worktree, such as a standard library file, opens only as a peek.
Discuss code with the agent
Section titled “Discuss code with the agent”Comment on lines as you read a diff, as you would review a pull request. A question gets its answer in the thread from a copy of the agent’s conversation, without stopping the agent’s work. A request for a change goes to the agent that wrote the code, which makes it. Hold your comments for one review, or send each one at once.
Comment on lines
Section titled “Comment on lines”Select lines, or put the cursor on one, and start a thread:
- Press
⌘⇧M(Ctrl+Shift+Mon Linux and Windows). - Right-click the text and choose Add Review Comment.
- Run Comment on selection from the palette or the code tab’s menu.
Type the comment, then:
- Add to review (
⌘↵,Ctrl+Enter) holds it for the next review. Comments that wait are marked Pending. - Send now (
⌘⇧↵,Ctrl+Shift+Enter) sends this thread alone. Esccancels.
If you open another file while you write, the comment keeps what you typed, and it is there when you come back.
In a reply to a thread where the agent spoke last, the two keys swap: ⌘↵ sends at once, because that is a conversation, and ⌘⇧↵ holds the reply. The text under the field shows which key does what.
The thread shows below the last selected line, with a bar in the gutter. You can comment on the file, the unified diff, or the new side of the split diff. A file at a commit and a proposed edit take no comments.
On a thread you can:
- Reply…, to add a comment.
- Send now, while it has a pending comment.
- Resolve conversation, to mark it done. A resolved thread folds to one line; select it to read it, or Unresolve it.
- Edit one of your own comments with the pencil. An empty message is deleted, and a thread with no messages left goes too. Editing a comment in a resolved thread opens it again.
- Delete the thread with the bin, which asks first.
A thread reads like a conversation on a pull request. Its top line says which agent it is for. Each comment shows who wrote it and when: your own with a plain avatar, an agent’s with its tag, an agent label and a tinted background. Code in backticks or in a fenced block shows as code.
Right-click a thread for the same actions. With the cursor on a thread’s lines, the command palette offers them too: Reply to review thread, Send review thread now, Send review thread as a change request, Resolve review thread, Reopen review thread, Assign review thread to an agent…, Edit your last message in the thread and Delete review thread…, which asks first.
Questions and changes
Section titled “Questions and changes”You don’t sort your comments. When you send them, a copy of the agent’s conversation reads them first, in the background: the agent keeps working, and nothing in its conversation changes.
- A question gets its answer in the thread from the copy. The copy can read the code but cannot change files or run commands. While it reads, the thread says so, and the answer shows the tokens it used. With no agent open, a new agent that reads the code answers instead.
- A request for a change, such as “Rename this” or “Can you clamp this per attempt?”, goes on to the agent that owns the thread, and a notice says where it went. So does a thread the copy does not answer. With Claude Code and mocante’s hooks, it waits until the agent finishes what it is doing and then goes in as your message. If the agent is no longer open, mocante opens a tab that resumes its conversation with your comment as the first message. A send to that agent while the tab starts waits for it, rather than opening another. With no agent at all, a new one starts in a tab.
While a copy reads a thread, its new comments are marked Reading; while a send carries them to the agent, Sending. A comment you add meanwhile waits for the next send.
To skip the copy for a thread you want changed now, run Send review thread as a change request from the thread’s menu or the palette.
An agent that does not report its conversation to mocante gets the review pasted into its prompt instead. So does a tab whose conversation mocante cannot confirm yet, as just after mocante restarts, before the agent reports again. Read it, add to it, and press Enter. An agent that cannot answer in the background gets the review as its message. If the copy cannot read a thread, the thread goes on to the agent as a change request instead. If a thread cannot go, it says why and stays unsent, and the next send tries again. Agents can still read it with review_list.
Which agent gets a thread
Section titled “Which agent gets a thread”Each open thread names the agent it is for, at the bottom right of the thread. A thread you start is for the agent a send would reach in that session. An agent that answers a thread, or starts one, takes it. To give a thread to another agent, select its name and choose an agent. The list shows every agent that runs in the worktree, in any session there. Choose Unassigned to let the next send decide.
An agent shows in the list only when it reports its conversation to mocante, as Claude Code does. “Not running” means that no tab runs that conversation now.
If you move Claude Code’s conversation to a background job with /background, mocante cannot reach the job yet. A send to that agent then fails and says so, rather than starting a second copy of the conversation: assign the thread to another agent.
Submit the review
Section titled “Submit the review”The bar above the code view counts the open threads, the agent’s replies and the threads being read or sent. Its menu lists every thread under the agent it is for, and opens it. Go to review thread in the palette does the same.
Select Submit review in the bar, or run Submit review from the palette, to send every thread with a new message from you. Each agent’s threads go together, also when the agent runs in another session on the worktree. Each thread names its file and lines, quotes the lines, and carries the conversation so far. The notice says what happened for each agent; a tab in another session, or one mocante opened, has Show.
Discard deletes every thread of the worktree; the notice that follows has Undo.
Replies from the agent
Section titled “Replies from the agent”An agent with mocante’s agent tools answers in each thread itself, and can resolve it. It can also start a thread to point you at code. When it reads the threads, it gets its own and those of no agent, not the threads of other agents in the worktree. A reply shows in the thread, and a notice says where it is unless that file is already on screen. Your next reply goes to the agent with the next send.
Threads move with the code: when an edit moves the lines, the thread follows the quoted lines. Threads belong to the worktree, not to the session: any session you start on that worktree shows them, under any name, also after its host restarts. They stay on your device until you discard them, or until the worktree goes: when you close a session and remove its worktree, delete the worktree, or remove its workspace, project or host. A worktree deleted outside mocante loses its threads about an hour later, once its host is reachable. If you rename a workspace and its folder moves, or point it at a new folder, its threads go along. Threads do not sync between devices.
Use Claude Code with the code view
Section titled “Use Claude Code with the code view”The code view does for Claude Code what the VS Code and JetBrains extensions do. Each session has its own connection, so Claude Code sees the code view of its own session only.
- Selection. Select lines in the code view. Claude Code shows
Selected N lines from <file>under its prompt and sends the lines with your next message. The status bar shows⇄ claudewhile Claude Code is connected. - Proposed edits. When Claude Code asks to edit a file, the edit opens as a code tab marked
proposed. Select Accept (or Create file for a new file) to write it, or Reject. Closing the tab also rejects it. If you answer in the terminal instead, the tab closes. The tab also closes when Claude Code stops waiting for it: after 30 minutes, when you answer in another mocante window, when every mocante window closes, or when mocante loses the connection to the session’s host. A proposal that nobody waits for is never written. While one window writes an accepted proposal, a Reject in another window waits for that write, and the accept wins if it succeeds. A proposal for a session that is not on screen shows a notice with a Show button. A proposal for a file larger than 256 KB, or for a file that is not text, cannot be accepted, because mocante cannot show you what it would replace; reject it and answer in the terminal. Create file does not replace a file that appeared after the proposal opened; it says the file changed instead. - Open file. Claude Code can open a file in the code view and select a passage.
Connect Claude Code
Section titled “Connect Claude Code”In a session that mocante created, Claude Code connects on its own when you start it. In a session you adopted, or after you rename a session, run /ide in Claude Code and pick the entry named mocante: <session>.
Send a selection to any agent
Section titled “Send a selection to any agent”Select lines and run Send selection to agent from the palette or the tab’s menu. The lines go to the session’s agent as an @file#a-b mention. With Claude Code connected they go through the connection; otherwise mocante types the mention into the terminal, which works with any agent that reads file references.
Open the file in your editor
Section titled “Open the file in your editor”Select the button at the right of the code toolbar, run Open in VS Code from the palette, or use the tab’s context menu. The file opens in your editor on your device at the line where the cursor is, with the worktree as the window’s folder. The command is named after the editor you choose.
Choose the editor in Settings → Editor → Open in: VS Code, VS Code Insiders, Cursor, Windsurf or VSCodium.
For a file on a remote host, the editor connects to the host with its own Remote-SSH extension, using the ssh config on your device. The editor asks for its own credentials.
This action is only in the desktop app, not in the browser.
Related
Section titled “Related”- Git workflow for staging, committing and pull requests.
- Keyboard shortcuts for every chord.