DocsWorking with sessions

Review & diffs

The Review tab is a PR-style diff of a session's worktree against its base branch, where you leave inline comments the agent acts on.

The diff view

The header shows the base ref and totals — 15 changed files vs. origin/main with a green +234 / red -56 count across the whole diff. When the base branch has an upstream, Plexus compares against the remote-tracking ref (origin/<base>) so the view mirrors a pull request; a purely-local base compares against the local ref.

The tab is a resizable split: a file list on the left, the selected file's diff on the right. Drag the divider to set your width — it's remembered between sessions.

The Review tab: the list of changed files on the left, a unified diff of the selected file on the right.

File list

Each row shows the change type (A added, M modified, D deleted, R renamed, C copied), the path, its +/- line counts, and a badge for any open comments. Untracked files appear marked A so you can review new files alongside tracked ones. Toggle the sidebar header between a flat list (with dimmed directory paths) and a directory tree — switching is instant and keeps your selection.

Click a file to load its diff.

Hunks

Each file renders as unified-diff hunks — a @@ header, old- and new-side line numbers, and context, added (green), and deleted (red) lines. Lines are syntax-highlighted and upgrade from plain text to colored tokens once the grammar loads, so the view never blocks — see Supported languages.

Binary files and files over the size limits (512 KB or 5000 changed lines) show a placeholder instead of a preview. They still appear in the list with their stats.

Supported languages

The diff view highlights the file types below. Anything else — including a grammar that hasn't finished loading yet — stays readable as plain text.

LanguageFile types
C.c, .h
C++.cpp
CSS.css
Go.go
HTML.html
Java.java
JavaScript.js, .jsx
JSON.json, .jsonc
Markdown.md
Python.py
Rust.rs
SCSS.scss
Shell.sh, .bash
SQL.sql
TOML.toml
TypeScript.ts, .tsx
Vue.vue
XML.xml
YAML.yaml, .yml

The editor in the Explorer tab recognizes many more languages; the diff view focuses on this set.

Inline comments

Hover a diff line and click the comment button to open the composer, type your note, and click Add. Comments anchor to a specific line on the old or new side (GitHub convention) and appear in a thread below it. Each shows its author — User for ones you wrote, or Plexus Review Agent for AI-inserted ones — plus Edit, Resolve, and Delete actions. Resolving strikes the comment through and drops it from the file's badge count.

The inline comment composer open on a diff line, with a note typed and the Cancel and Add buttons below.

Comments are advisory context: if the agent edits a file, line numbers can drift, but your comments stay editable. If an edit removes a file from the diff entirely, its comments become orphaned — a banner at the top lists them by file:line with Resolve and Delete buttons so you can tidy up.

Send comments to the agent

With unresolved comments open, the header shows a Send N comments to agent button. Clicking it formats every open comment into one prompt and writes it to the running agent, where Claude reads it as input on its next turn and iterates. The session must be running with a live agent — if it's stopped, start it first (see Agent).

AI review

Click Run AI review to hand the diff to a headless Claude instance that reviews it for bugs, security issues, and risky changes, then posts inline comments as the Plexus Review Agent. A spinner shows while it runs (seconds to a minute); when it finishes, a banner reports how many comments were added. Treat them like your own — edit, resolve, or send them to the interactive agent.

Customize the review prompt

The brief the reviewer follows is fully yours. The git.review.prompt setting is the review instruction — it decides what the model looks for and how to weigh it. The default reads:

You are a senior engineer reviewing this pull request diff. Flag correctness bugs, security issues, and risky changes as concise, actionable inline comments. Do not rewrite the code.

Replace it with whatever fits: focus on your project's conventions, ignore a class of issue, enforce a style guide, or even ask for the comments in another language. Set it once globally for every repository, or override it per workspace or project so each codebase gets its own reviewer (see Settings).

You never have to spell out a response format. Plexus wraps your prompt with the diff — every line tagged with its file, side, and line number — and a strict output contract, then turns the model's reply into comments anchored to the exact lines. Your prompt decides what gets reviewed; Plexus guarantees how the results come back, so a custom prompt can't misplace or break comments. If a reply ever comes back malformed, it retries once automatically.

Review-and-fix cycle

The Review and fix cycle automates the whole loop unattended: it runs an AI review, spawns a separate headless agent to apply the fixes, waits for it to finish, then re-reviews — repeating until the review finds no issues or it hits the round limit.

  • Consent (once per repository). The first run for a repository opens a dialog explaining that the cycle runs an unattended, non-sandboxed agent that can edit files without approval. Confirm to proceed; each repository is treated independently.
  • Activity warning. If the interactive agent still looks mid-turn, a dialog warns the two agents could conflict in the same worktree. The signal is best-effort, so you can Cancel or Start anyway.
  • Status strip. While the cycle runs, a strip below the file list shows the current round and phase (reviewing or fixing), then the terminal result. A Stop button halts it gracefully at any time.

The cycle stops after reviewCycle.maxRounds rounds (default 10). It requires a session worktree and refuses to run on root-tree sessions, so it never edits your project's real checkout.

Refreshing the diff

Returning to a session renders the Review tab instantly from cache while it revalidates in the background, so edits that landed while you were away heal automatically. The cache also invalidates when an agent turn finishes or you run a git operation, keeping the diff in sync without any action from you.

Click Refresh to force a guaranteed-fresh fetch from disk. If the base branch has an upstream, Refresh also runs a git fetch to pull the latest remote base before comparing.

  • Git — stage, commit, and run git operations on the worktree.
  • Pull requests — open and manage GitHub PRs from a session.
  • Settingsgit.review.prompt, reviewCycle.maxRounds, and more.