OpenReview provides native plan and code review for the OpenCode terminal UI. Review completed plans as rich Markdown or inspect repository diffs with file, hunk, and line comments, then send one batched revision request back to the active session.
- Separate full-screen plan and code review routes
- Rich headings, lists, tables, links, and syntax-highlighted code blocks
- Keyboard and mouse block navigation
- First-class source-line view with single-line and cross-block range comments
- Click, Shift-click, keyboard, and mouse-drag line selection
- Code review scopes for the working tree and the current branch
- Unified diffs with old/new line numbers, hunk comments, and line-range comments
- Local draft persistence across restarts
- Batched review comments sent back to the active session
- Automatic reload after plan revisions and code-review fixes
- Responsive inline comments on narrow terminals and a comment sidebar on wide terminals
- Support for both OpenCode plan storage modes
Open the plan and code review walkthrough
Open the code review walkthrough
- OpenCode
2.0beta build0.0.0-next-17403 - A terminal running the OpenCode TUI
The plugin uses OpenCode's TUI plugin API. It does not add UI to the OpenCode browser or desktop clients.
TUI plugins are configured in the global ~/.config/opencode/cli.json.
Global ~/.config/opencode/cli.json:
{
"plugins": ["opencode-openreview"]
}OpenCode installs npm plugins automatically. Quit and restart OpenCode after changing cli.json.
Load the built local entrypoint from ~/.config/opencode/cli.json:
{
"plugins": ["/absolute/path/to/OpenReview/dist/tui.js"]
}Install dependencies and start OpenCode from the repository:
bun install
opencode2- Enter OpenCode's plan agent and request a plan.
- When a structured plan completes, the review route opens automatically.
- Select a Markdown block, or switch to Lines and highlight any contiguous source-line range.
- Add as many comments as needed.
- Press
sto send one structured revision request. - The route waits for the planning agent and loads the revised plan when the session becomes idle.
- Repeat until the plan is ready, then return to OpenCode's native approval/build workflow.
Run /plan-review from a session to open the latest plan manually. Short or unstructured planning replies do not auto-open, but remain available through the manual command.
| Key | Action |
|---|---|
j / k |
Select the next or previous Markdown block |
l or v |
Switch between Blocks and Lines |
j / k in Lines |
Move a single-line selection anywhere in the plan |
Shift+j / Shift+k |
Extend the line selection across blocks |
c or Enter |
Add or edit a comment on the selected range |
d |
Delete the comment on the selected range |
s |
Submit all comments to the planning agent |
r |
Reload the current plan |
PageUp / PageDown |
Scroll one page |
q or Esc |
Return to the session |
Click the Blocks or Lines tab to change views. In Lines, click one source line for a single-line comment, Shift-click another line to extend the range, or drag across the gutter to highlight a range. Line ranges can cross Markdown block boundaries.
- Run
/code-reviewfrom the session that should receive the feedback. - Choose Working tree or Branch vs default.
- Select an entire diff hunk, or switch to Lines and select one or more lines within a hunk.
- Add comments with
cand repeat across files. - Press
sto send one structured fix request to the active session. - The route waits for the agent and reloads the selected diff scope when the session becomes idle.
The scopes contain different changes:
- Working tree includes current staged and unstaged changes.
- Branch vs default compares the current branch with OpenCode's detected default branch.
| Key | Action |
|---|---|
j / k |
Select the next or previous hunk |
l or v |
Switch between Hunks and Lines |
j / k in Lines |
Move between diff lines and adjacent hunks/files |
Shift+j / Shift+k |
Extend a line range within its current hunk |
c or Enter |
Add or edit a comment on the selected hunk or lines |
d |
Delete the selected comment, including stale comments |
s |
Submit all comments as one fix request |
r |
Reload the selected diff scope |
o |
Choose another review scope |
PageUp / PageDown |
Scroll one page |
q or Esc |
Return to the session |
Click a diff line for a single-line comment, Shift-click within the hunk to extend the range, or drag across diff rows. Line ranges stop at hunk boundaries so omitted source regions are never represented as contiguous code.
Plugin options use the object form in cli.json:
{
"plugins": [
{
"package": "opencode-openreview",
"options": {
"autoOpen": true,
"planningAgents": ["plan", "architect"]
}
}
]
}| Option | Default | Description |
|---|---|---|
autoOpen |
true |
Open unseen structured plans when the active session becomes idle |
planningAgents |
["plan"] |
Agent names whose completed responses can be reviewed as plans |
OpenReview discovers plans from either source used by OpenCode:
- Reviews the latest completed Markdown response from a configured planning agent.
- Prefers a session-specific plan file under
.opencode/plans/, or OpenCode's state directory for non-git projects, when present.
When a plan or diff revision changes before draft comments are submitted, comments are re-anchored using their exact quoted text. Ambiguous or missing anchors are marked stale and must be removed or rewritten before submission.
Drafts remain local in OpenCode's plugin storage. The plugin does not run a server or send plan content anywhere except through the existing OpenCode session when you submit feedback.
bun test
bun run typecheck
bun run buildThe build emits the npm TUI entry point at dist/tui.js and declarations at dist/tui.d.ts.