Agent feedback loop
Get your review comments into a coding agent and review what it changes in response. Agents with MCP support drive the whole loop through zyndiff’s local MCP server. Any other agent that can run a shell command uses zyndiff --wait. Both need the zyndiff command on your PATH (see Installation).
Set up your agents
Section titled “Set up your agents”zyndiff setupzyndiff setup detects the coding agents you have installed: an agent counts when its binary is on PATH or its config directory exists. It then shows a checkbox list with detected agents listed first and pre-checked (↑↓ move, space select, a all, enter confirm).
It prints every command it will run and every file it will touch, asks Proceed? [y/N], then applies. Running it again is safe, and agents that are already set up report unchanged.
Restart the agent or start a new session afterwards.
| agent | id | what setup does |
|---|---|---|
| Claude Code | claude |
installs the zyndiff-review plugin (skill + MCP server) |
| Codex | codex |
installs the zyndiff-review plugin (skill + MCP server) |
| Cursor | cursor |
adds a zyndiff MCP server to ~/.cursor/mcp.json |
| Gemini CLI | gemini |
adds it to ~/.gemini/settings.json |
| VS Code | vscode |
adds it to the user mcp.json |
| Windsurf | windsurf |
adds it to ~/.codeium/windsurf/mcp_config.json |
| OpenCode | opencode |
adds it to ~/.config/opencode/opencode.json (or opencode.jsonc if that exists) |
| Zed | zed |
adds it to Zed’s settings.json |
| GitHub Copilot CLI | copilot |
adds it to ~/.copilot/mcp-config.json |
For Cursor, Gemini CLI, VS Code, Windsurf, OpenCode, Zed and Copilot CLI, the entry runs zyndiff mcp serve by the absolute path of your installed binary, so an agent launched from a GUI finds it without your shell’s PATH. The Claude Code and Codex plugins run zyndiff from PATH. Every other setting in the file is kept. If a config file isn’t plain JSON (comments are common in Zed and VS Code), setup never rewrites it and prints the snippet to paste by hand instead.
To skip the prompts, pass --agents claude,codex to pick agents and --yes to skip the confirmation. Without a terminal and without --agents, setup exits 1 and prints the agents it detected and the valid ids. zyndiff setup --remove undoes it and pre-checks every agent zyndiff is currently set up in.
Manual plugin install
Section titled “Manual plugin install”claude plugin marketplace add praneethilluru/zyndiffclaude plugin install zyndiff-review@zyndiff-local --scope userThen start a new Claude Code session, or run /reload-plugins.
codex plugin marketplace add praneethilluru/zyndiffcodex plugin add zyndiff-review@zyndiff-localThen start a new Codex task. Existing tasks don’t load newly installed skills or MCP servers.
Run a review round over MCP
Section titled “Run a review round over MCP”-
Ask the agent for a review:
Review my current changes with zyndiff.The agent calls
start_reviewwith the repository path and refworking(tracked and untracked changes). zyndiff opens the review in your browser. The agent’s MCP server only accepts acwdinside its approved root, which is the directory the agent launched it from unlessZYNDIFF_ROOTsays otherwise. -
Comment on the lines you want changed, then click Review in the top bar and Return Feedback. Return Feedback needs at least one unresolved comment or a summary.
-
Go back to the agent and say
continue. By default the review’s policy isrequired, so thezyndiff-reviewskill tells the agent to stop and wait for you afterstart_review. -
The agent calls
get_review, applies each comment, replies to it withreply_to_comment, marks it withmark_comment_addressed, and callsrequest_rereview. -
Within a few seconds a notice appears at the top of the review, for example
Agent activity: 2 replies, 2 addressed, rereview requested — “Removed the debug log and capped the backoff”. Click Refresh diff to load the agent’s changes. -
Files the agent touched since your feedback show a Changed since last review chip. Click Show only changes since last review on a file to see just the agent’s fix instead of the whole change again.

-
Resolve the comments that are fixed, reply in a thread to the ones that aren’t, then Approve or return more feedback. Asking the agent for more after you approve reopens the same review.
Each Return Feedback records a round: zyndiff stores the blob hash of every file’s new-side content. A file counts as changed when its content no longer matches that hash, so the chip and the interdiff always compare against the code as it was the last time you sent feedback.
The review menu also shows the agent’s latest request_rereview summary as markdown under Agent update. For a long one, click the expand icon in the corner to read it in a wide dialog. Your draft summary carries over.
Addressed and resolved
Section titled “Addressed and resolved”A comment has three states, and the agent can only reach one of them.
| status | who sets it | what you see | in the next prompt? |
|---|---|---|---|
open |
you, by writing or reopening it | a normal comment card | yes |
addressed |
the agent, with mark_comment_addressed |
an Addressed chip on the card | yes |
resolved |
you, with the Resolve button (Reopen undoes it) | a Resolved chip and muted text | no |
Addressed means the agent says it made the change. It stays unresolved until you check the code and resolve it, so it still counts toward the unresolved badge, and Approve asks There are 2 unresolved comments. Approve anyway?. The agent can’t resolve, reopen or approve. An agent that tries to mark a resolved comment gets resolved comments must be reopened by the reviewer.
What the agent receives
Section titled “What the agent receives”Over MCP, get_review returns the Review Record: status, your summary, and every comment with its file, side, line range, tag, status and reply thread. When comments contain suggested changes, it adds a suggestions list so the agent can apply them without parsing comment text. This is the suggestions part of a real response, with the review object left out:
{ "suggestions": [ { "commentId": "c3", "path": "src/retry.ts", "side": "new", "startLine": 8, "endLine": 8, "original": [ " await sleep(100 * 2 ** attempt);" ], "suggested": [ " await sleep(Math.min(100 * 2 ** attempt, 1000));" ] } ]}An empty suggested array means delete the original lines. When some suggestion can’t be listed, suggestionsError explains why.
zyndiff --wait, the feedback preview (P) and Copy Markdown in the review menu get the compiled markdown prompt instead. This one comes from a review with a summary, a question that has a reply thread, a nit that suggests deleting a line, and an issue that suggests a replacement:
## Code Review — working tree — 2026-10-29
---
## Reviewer summary
Retry logic looks right. Two small fixes before merge.
---
### src/retry.ts — Line 2
``` 1 | export async function withRetry<T>(fn: () => Promise<T>): Promise<T> { > 2 | + const maxAttempts = 5; 3 | for (let attempt = 0; attempt < maxAttempts; attempt++) { 4 | try {```
**[question]** Make this a parameter with a default so callers can tune it. - agent: I'll make it an optional second argument with default 5. - reviewer: Good, keep the default.
---
### src/retry.ts — Line 7
``` 5 | return await fn(); 6 | } catch (err) { > 7 | + console.log("retrying", err); 8 | await sleep(100 * 2 ** attempt); 9 | }```
**[nit]** Debug logging left in.
Suggested change to src/retry.ts, line 7:
ORIGINAL``` console.log("retrying", err);```
SUGGESTED (delete these lines)``````
---
### src/retry.ts — Line 8
``` 6 | } catch (err) { 7 | console.log("retrying", err); > 8 | + await sleep(100 * 2 ** attempt); 9 | } 10 | }```
**[issue]** Cap the backoff so attempt 5 doesn't sleep for 1.6s.
Suggested change to src/retry.ts, line 8:
ORIGINAL``` await sleep(100 * 2 ** attempt);```
SUGGESTED``` await sleep(Math.min(100 * 2 ** attempt, 1000));```
---
## Summary: 3 comment(s) across 1 file(s)Lines marked > are the ones you commented on, with two lines of context either side. Removed lines get an Old line header instead of Line. File-level comments get a File-level header and no code block. Resolved comments and comments whose lines left the diff are not in the prompt.
Hand off without MCP: zyndiff --wait
Section titled “Hand off without MCP: zyndiff --wait”Any agent that can run a shell command can ask for a review. zyndiff --wait opens the review in your browser, blocks until you send feedback, approve or cancel, then prints the compiled prompt on stdout and exits.
zyndiff --wait > feedback.mdStatus lines go to stderr, so stdout carries only the prompt:
[zyndiff] v0.32.1 — reviewing working tree (1 file changed) http://127.0.0.1:47123/?review=8e27d1e1-43ea-419f-8235-1378e5e6606b (ctrl+c to stop)[zyndiff] waiting for feedback on review 8e27d1e1-43ea-419f-8235-1378e5e6606b (ctrl+c to stop)[zyndiff] review sent back with feedbackPass a ref the same way you would without --wait, for example zyndiff --wait main or zyndiff --wait staged. Add --no-open to skip launching the browser and open the printed URL yourself.
If the agent runs the command itself, its shell tool has to allow a command that blocks for as long as you take to review. A tool that kills commands after a timeout ends the wait early. The review record survives, so you can still finish it with zyndiff --review-id <id>.
Exit 0 with a prompt on stdout means feedback, exit 0 with empty stdout means approved, and exit 2 means cancelled. Closing the last tab without sending anything exits 3 and leaves the review open. Every code is in the CLI reference.
Get JSON instead of a prompt
Section titled “Get JSON instead of a prompt”zyndiff --wait --json > review.jsonstdout is then the same structure get_review returns. Read review.status to tell feedback_ready, approved and cancelled apart.
--wait is one round. It can’t receive replies, addressed marks or a rereview request, so the changes-since-last-review view only works over MCP. Each new zyndiff --wait starts a fresh review.
Open a review when the agent stops
Section titled “Open a review when the agent stops”zyndiff hook stop opens a review of the working tree when an agent finishes a turn. It’s experimental: no integration ships it, and zyndiff setup doesn’t wire it. What it does and prints is in the CLI reference.
Fix a missing MCP server
Section titled “Fix a missing MCP server”After zyndiff update, idle MCP servers are stopped so agents relaunch them on the new version. In Claude Code, reconnect with /mcp or start a new session. zyndiff mcp restart does the same stop by hand and refuses while a review session is live.
The server can also be run directly, which is what the agent config does:
zyndiff mcp serveEvery tool and its parameters are in MCP tools.