Repository navigation
Releases
v0.13.3
What's Changed
Fixes
- V2: completed
questiontool answers are now visible to the reviewer (#80). Answers the user gave through OpenCode's question tool are passed to the reviewer as conversation context, so an operation the user just agreed to is no longer reviewed as if no consent existed. The trust boundary is kept explicit:userIntentalways comes from the latest ordinary user prompt; question answers never override it.- Model-written question text and option labels are kept apart from answers the user typed, and each answer stays paired with its question, so a generic "Yes" cannot approve unrelated or broader operations.
- Question data is JSON-encoded, size-capped, and marked incomplete when malformed or oversized.
- Reviewer prompt: reviewer-only restrictions no longer read as a ban on reviewing delegation (#89). The rule that the reviewer itself must not delegate work is now scoped to the reviewer's own actions; subagent delegation requested by other agents is evaluated against the user's authorization and review policy like any other operation.
Dependencies
- Bump the all-dependencies group with 83 updates (#88)
- Bump
jdx/mise-actionfrom 5.2.3 to 5.2.4 (#86)
Contributors
- @thisfilipe made the changes in #80 and #89
- @dyoshikawa
Full Changelog: v0.13.2...v0.13.3
v0.13.2
What's Changed
Security hardening from a security audit. No configuration changes are needed.
Fixes
- fix: match loosely spelled patch headers and parse verdicts in linear time by @dyoshikawa in #90
- Escalate rules now see the file paths of
apply_patch/patchheaders written without the usual single space (*** Update File:.env, tabs, extra spaces around***or:), and also match the part of a path before a further colon (.env:x). Before, such spellings skipped the rule layer and went straight to the AI reviewer. Matching only gets stricter: everything that escalated before still escalates. - Parsing a reviewer reply no longer takes quadratic time on long runs of whitespace (60k blanks took about 4 seconds and blocked the host), and the patch header scan stays linear over Unicode line separators.
- Escalate rules now see the file paths of
Contributors
Full Changelog: v0.13.1...v0.13.2
v0.13.1
What's Changed
No user-facing behavior changes. This release is internal cleanup and dependency updates.
Maintenance
- refactor: share duplicated reviewer and config logic, drop unused exports by @dyoshikawa in #82
- ci(deps): bump jdx/mise-action from 5.2.1 to 5.2.3 in the all-actions group by @dependabot in #83
- chore(deps): bump the all-dependencies group with 153 updates by @dependabot in #84
Contributors
Full Changelog: v0.13.0...v0.13.1
v0.13.0
What's Changed
Escalate rules: operations that always go to a human (opt-in)
reviewer.instructions are guidance a model may still get wrong. The new top-level escalate option lists operations that are escalated to a human before any reviewer sees them, with every backend and both plugin API generations. In on-ask mode the OpenCode prompt stays; in all-tools mode the tool is blocked with the matched rule as the reason.
"options": {
"escalate": [
{ "action": "shell", "resource": "*git push*" },
{ "action": "webfetch" },
{ "action": "*", "resource": "*.env" }
]
}actionmatches the permission action (on-ask) or the tool name (all-tools); the shell isshellon OpenCode 2.x andbashon 1.x.resourceuses OpenCode's*/?wildcards and is matched against every string value, whole, per line and per shell word, ignoring case and whitespace runs. Matching never uses a regular expression.- What
write/edit/multieditwrite is not matched, and anapply_patchpatch is matched through its file headers, so a path rule does not fire on code that merely mentions a path. - Inputs too deep or too large to check escalate under any rule for their action.
- Rules are a deterministic floor, not a sandbox: keep OpenCode
denypermissions for what must never run.
- feat: add deterministic escalate rules by @dyoshikawa in #75
Credentials are redacted before review, and reviews in flight are capped
Behavior change: by default, the state sent to the reviewer's provider now has credential values replaced by markers such as [REDACTED]: the configured reviewer.decision / reviewer.chat API keys, private key blocks, URL passwords, well-known token formats, and secret-shaped values after Authorization: / Bearer, --password / --token-style flags, or in *_KEY= / *_TOKEN= / *_SECRET= / *_PASSWORD= assignments. The tool OpenCode runs is never changed. Redaction is deliberately conservative so that crafted text cannot hide a path, host, URL or command from the reviewer. Add patterns with reviewer.redact.patterns, or turn it off with reviewer.redact.enabled: false.
Behavior change: at most reviewer.maxConcurrentReviews reviews (default 4, 1–32) run at once. More wait for a free slot for up to reviewer.timeoutMs and then escalate.
- feat: redact credentials and cap concurrent reviews by @dyoshikawa in #77
Hardening of the all-tools native-ask grant
- With
allToolsNativeAsks: "review", a native ask is only answered when the live tool call still has the same tool and input as the one reviewed. A call whose input changed during review now fails closed in every all-tools mode. allToolsNativeAsks: "review"is now rejected at startup withmode: "on-ask"and on the OpenCode 1.x plugin API, where it does nothing.
- fix: refuse native ask grants for calls rewritten after review by @dyoshikawa in #70
Configuration that does nothing is rejected
reviewer.agent.cleanupSessions is now rejected at startup on the OpenCode 1.x plugin API and with the SDK runtimes, instead of being silently ignored. Invalid options are reported with an Invalid auto-approval plugin options: prefix.
- fix: assert reviewer session cleanup and reject it where it does nothing by @dyoshikawa in #73
Security audit follow-ups
- A reviewer reply with too many braces to rule out a conflicting second verdict is no longer trusted, unless it is unambiguous.
- In all-tools mode on OpenCode 2.x, only the plugin's own reviewer sessions skip review; an agent that merely shares the reviewer's name no longer does.
- The Codex SDK minimum version (0.163.0) is now also enforced for an installed copy, and a prerelease ranks below its release. The CommonJS build cannot locate an installed copy's version, so it needs
reviewer.agent.codexSdk.path.
- fix: close the security audit leftovers and the PR #66 follow-ups by @dyoshikawa in #76
Maintenance
- ci: regenerate AI tool configurations before the generated-file check by @dyoshikawa in #71
- chore: resolve the development dependency advisories by @dyoshikawa in #72
Contributors
Full Changelog: v0.12.0...v0.13.0
v0.12.0
What's Changed
Let the reviewer answer native asks in all-tools mode (OpenCode V2, opt-in)
In all-tools mode, a tool call the reviewer had already approved could still stop at OpenCode's native Permission required prompt, for example a subagent's shell call under a shell: ask rule. The new allToolsNativeAsks: "review" option lets the reviewer's approval answer that native ask too.
"options": {
"mode": "all-tools",
"allToolsNativeAsks": "review"
}- The default is
"preserve", and upgrading does not change behavior: configured nativeaskrules still reach a human. With"review"the reviewer answers them instead, including rules you set as human checkpoints such as"git push *": "ask", so enable it only if that is what you want. - An approval only covers the native ask that matches the reviewed tool, within the same session, agent, message and tool call. It expires after 45 seconds and is revoked when the user prompts the root session again.
- Other native actions raised by the call (for example
external_directorywith its resolved path) get a separate review of their actual resources. A failed or escalated extra review denies the call without prompting. - Explicit native
denyrules and AIdeny/escalateverdicts still block the call. V1 is unchanged. - Input changed by a later hook is only detected after the tool runs, so this is not a hard boundary. Use it only with plugins and hooks you trust.
- fix: honor AI all-tools approvals during native permission checks by @thisfilipe in #53
Codex reviewer ignores the workspace's .codex/config.toml
With reviewer.agent.runtime: "codex-sdk", Codex runs in the reviewed project. If you had trusted that project in Codex, Codex loaded the project's .codex/config.toml, and any [mcp_servers.*] command declared there ran as you, outside the read-only reviewer sandbox, on every review. The reviewer now marks the project directory, its parents and its symlink-resolved path as untrusted, so only your own ~/.codex/config.toml loads. An SDK loaded from reviewer.agent.codexSdk.path that is older than 0.163.0 (the lowest supported peer version) is now refused, since it would silently drop the override.
- fix(codex): keep the workspace's .codex/config.toml out of the reviewer by @dyoshikawa in #66
Contributors
Full Changelog: v0.11.0...v0.12.0
v0.11.0
What's Changed
Replace the built-in review policy
reviewer.instructions could only add to the built-in policy, which leans toward asking a human (it escalates whenever the user's intent is unknown or the operation is ambiguous). The new reviewer.replaceDefaultPolicy option makes your instructions the whole policy instead.
"reviewer": {
"replaceDefaultPolicy": true,
"instructions": [
"Allow builds, tests, linters and type checks run through `pnpm` scripts.",
"Escalate everything else, including package installs and `git push`."
]
}- Drops the built-in allow/deny/escalate rules ("safe and within the user's intent", "if userIntent is null, escalate…") from the
agentandchatprompts, and thedecisionbackend's criteria are phrased against your policy. An operation your policy does not decide is escalated. - Kept: the answer format, the review check, the untrusted-data guard and boundary, the conversation authorization rules, and
minAllowProbability. - Requires
reviewer.instructions; the plugin fails at startup otherwise. The reviewer no longer checks that an operation matches your request, so set it only in configuration you trust.
- feat: add reviewer.replaceDefaultPolicy to replace the built-in review policy by @dyoshikawa in #65
Reviewer sessions no longer clutter the session list (OpenCode V2)
On OpenCode V2, agent reviewer sessions are now linked to their originating session instead of appearing as top-level sessions. Set reviewer.agent.cleanupSessions: true to delete them after each decision (best-effort, never delays the verdict).
- fix: prevent reviewer sessions from cluttering chat history by @thisfilipe in #51
Contributors
Full Changelog: v0.10.0...v0.11.0
v0.10.0
What's Changed
Longer custom review instructions
reviewer.instructions was capped at 4,000 characters. The new reviewer.maxInstructionsChars option raises that cap (4,000–200,000; the default stays 4,000).
"reviewer": {
"instructions": ["…a longer review policy…"],
"maxInstructionsChars": 20000
}- Instructions are sent, and billed, with every review and count toward each reviewer's size limit:
maxInputBytesfor theagentandchatreviewers, andmaxStateTokens(orlongContext.maxStateTokens) for thedecisionbackend. Instructions that would fill a limit in use now make the plugin fail at startup instead of escalating every review. - The
decisionbackend now counts the instructions in its size estimate and in its check that the model read the whole prompt. - Near the top of the range, raise
maxInputBytesas well; withlongContext, instructions larger thanmaxStateTokenssend every review with long context.
- feat: let users raise the reviewer.instructions length limit by @dyoshikawa in #62
Security hardening
- Prompts of subagent (child) sessions are no longer treated as user intent: a review uses the root session's latest prompt and conversation, and a new prompt in the root session cancels a subagent's pending allow. A failed or slow root lookup fails closed.
- The Codex SDK reviewer now runs with
approvalPolicy: "never"in its read-only sandbox, so its automatic reviewer can no longer approve running outside the sandbox (this replaces the auto mode chosen for Codex in v0.8.0; the Claude Agent SDK reviewer is unchanged). - The publish workflow verifies the release source before installing anything and installs and publishes with
--ignore-scripts.
- fix: harden subagent user intent, Codex approvals and the publish workflow by @dyoshikawa in #58
Dependencies
- ci(deps): bump jdx/mise-action from 5.1.2 to 5.2.1 in the all-actions group by @dependabot in #59
- chore(deps): bump the all-dependencies group with 93 updates by @dependabot in #60
Contributors
Full Changelog: v0.9.0...v0.10.0
v0.9.0
What's Changed
Chat backend: OpenAI and Anthropic API keys
reviewer.chat.provider lets the chat backend call the OpenAI or Anthropic API directly with their own keys:
reviewer.chat.provider |
Endpoint | Key when reviewer.chat.apiKey is unset |
|---|---|---|
"openai-compatible" (default, unchanged) |
<baseURL>/chat/completions |
AUTO_APPROVAL_CHAT_API_KEY |
"openai" |
https://api.openai.com/v1/chat/completions |
OPENAI_API_KEY |
"anthropic" |
https://api.anthropic.com/v1/messages (Messages API) |
ANTHROPIC_API_KEY |
"reviewer": {
"backend": "chat",
"chat": { "provider": "anthropic", "model": "claude-haiku-5-5" }
}- The vendor providers always call the vendor's own host and take no
baseURL, so their key never reaches another server. - The Anthropic provider uses the native Messages API (
x-api-key,anthropic-version: 2023-06-01,max_tokens: 16000). Only a finished reply (end_turn/stop_sequence) is read for a verdict; a refusal or any other early stop fails the review, and "prompt is too long" or running out of context window counts as too large. - Works for the decision backend's
onOversize: "chat"fallback too.
- feat: call the OpenAI and Anthropic APIs from the chat backend by @dyoshikawa in #56
Contributors
Full Changelog: v0.8.0...v0.9.0
v0.8.0
What's Changed
Agent runtimes: Claude Agent SDK and Codex SDK
The agent reviewer can now run outside OpenCode. reviewer.agent.runtime picks where:
"opencode"(default, unchanged): a read-only OpenCode session."claude-agent-sdk": Claude Code through@anthropic-ai/claude-agent-sdk, with onlyRead/Glob/Grep,permissionMode: "auto", and no settings, hooks, MCP servers or plugins loaded from disk."codex-sdk": Codex through@openai/codex-sdk, in the read-only sandbox without network or web search, in auto mode (approvals_reviewer = "auto_review"), and without the project'sAGENTS.md.
Both SDKs are optional peer dependencies. OpenCode does not install them with the plugin, so install the one you use globally and point reviewer.agent.claudeAgentSdk.path or reviewer.agent.codexSdk.path at the installed package directory. reviewer.agent.model takes a model name such as "claude-haiku-5-5" with these runtimes. Their reviews are recorded in the usage log read by npx opencode-auto-approval-plugin stats.
Note that auto mode may let the reviewer read files outside the project when it judges the read safe; use the default opencode runtime if that is not acceptable. See the README's "Agent runtimes" section for details.
- feat: run the agent reviewer on the Claude Agent SDK or the Codex SDK by @dyoshikawa in #54
Contributors
Full Changelog: v0.7.0...v0.8.0
v0.7.0
What's Changed
Features
- Long context for Jev —
reviewer.decision.longContext(typesafeprovider only, off by default) sends an operation larger thanmaxStateTokenswhole with TypeSafe's long-context header (TypeSafe-Danger-Zone-Long-Context, up to 262k tokens on Jev 1.13 and 1.14) instead of treating it as too large, up tolongContext.maxStateTokens(default 240,000). Smaller operations are still sent without the header. Because TypeSafe documents long-context answers as less accurate, they needallowatlongContext.minAllowProbability(default 0.8, or the regular threshold if higher, never below it), and the reason says… with long context. A regular request that Jev refuses as too long is asked once more with long context within the same timeout. See the README's "Long context (TypeSafe)" section. by @dyoshikawa in #48 - Opt-in audit log —
auditLog.enabledwith an absoluteauditLog.pathappends one JSONL record per review (time, backend, session, action, verdict, confidence, duration, error category) through a symlink-safe, mode-0600append. Command text is a separate opt-in (auditLog.includeCommand) with best-effort redaction. Works with every backend and both plugin API generations; POSIX only. by @InCerryGit in #35 - Opt-in conversation context —
conversation.enabledlets the reviewer see the session's recent user turns (at most 8 whole turns / 12,000 characters), so a short request such as "continue" can refer to an earlier instruction. Assistant turns are a further opt-in (conversation.includeAssistant) and are never treated as authorization. Every backend reviews the same state. by @InCerryGit in #35
Fixes
- The OpenCode 1.x handler now reads the modern
permission/patternspermission fields, falling back to the legacytype/pattern; a malformed modern action is never approved. by @InCerryGit in #34
Security
- Set
auditLogandlongContextonly in configuration you trust, likebaseURLandminAllowProbability: a repository'sopencode.jsoncould point the audit log at a file it should not append to, or let larger operations be approved automatically.
Dependencies
Contributors
Full Changelog: v0.6.0...v0.7.0