Better Auto Review: A Codex-Style Auto Review Plugin for DeepSeek Harness

Preface

The default Auto Review preset in DeepSeek Harness requests the reviewer model for every single tool call, and once approved, subsequent calls run with danger-full-access permissions. This is only safe if you fully trust the reviewer, and even a simple workspace read triggers a round-trip model call. Better Auto Review follows the Codex approach: the session stays within the workspace-write sandbox, review is only triggered when a tool call explicitly requests elevated permissions (sandbox_permissions), approval applies to that single call only, rejection includes a reason, and after consecutive rejections reach a threshold it falls back to a human. This dramatically reduces review overhead without compromising security.

Plugin Overview

Better Auto Review is a DeepSeek Harness plugin maintained by EricStoneChina. It provides Codex-style automatic review capability, with the core principle of maintaining the workspace-write sandbox and reviewing only explicit permission escalations, where approval applies to that single invocation only. The plugin caches review results, limits per-round call counts, defaults to denial on error (fail closed), and can be configured to fall back to a human. It falls under the admin-security category and is well-suited for agent workflows requiring finer-grained permission control and auditing.

Core Features

  • Maintains the workspace-write sandbox by default without elevating permissions.
  • Listens to the tools/pre-execute event and detects explicit permission escalation requests (sandbox_permissions string with a level higher than baselineSandbox).
  • Review results apply to that single invocation only (allowed-once), not the entire session.
  • The reviewer model defaults to the current primary model, but can be independently configured with a separate provider and model.
  • The reviewer runs as a read-only sub-agent by default with workspace access; supports restricting the tool whitelist to read, glob, grep.
  • Supports a consecutive rejection threshold and sliding window mechanism to prevent repeated denials.
  • Supports review caching (fingerprint matching) and timeout control.
  • Error handling supports either denial or prompting a human; defaults to denial.

Installation & Activation

In the DSH configuration directory (e.g., ~/.dsh/profiles/desktop), run:

pnpm add @ericstonechina/better-auto-review

Then add the dependency and DSH configuration to the package.json in that directory:

Restart DSH or activate the bundle via the plugin manager. The bundle inserts the plugin line, adds the Better Auto Review permission preset, and sets it as the default preset for new sessions (auto-mode). New sessions default to workspace-write with approval: ask; the plugin only intercepts permission escalation requests and does not affect normal workspace reads and writes.

Install from GitHub (Pre-release/Development)

pnpm add github:EricStoneChina/better-auto-review

The dsh.profile.bundles configuration is the same as the npm version — just use the package name.

Typical Usage

After installation, the plugin automatically sets the preset to auto-mode. For new sessions:

  • The default sandbox is workspace-write.
  • Normal tool calls that read/write the workspace do not trigger review.
  • When a tool’s parameters include sandbox_permissions with a level higher than workspace-write, the plugin triggers review.
  • The reviewer model defaults to following the current primary model, but can be specified as an independent provider and model in the configuration.
  • The reviewer uses a read-only sub-agent with workspace access; the tool whitelist is restricted to read, glob, grep.
  • The review result is either allow (allowed-once) or deny; denial includes a reason.
  • Once the consecutive rejection threshold is reached, the next denial request is escalated to a human.

You can adjust the provider, model, and reasoning difficulty via the plugin configuration page (Settings → Plugins → Installed → Better Auto Review → Configure). Leaving fields empty means it follows the primary model. You can also override default settings via cordis.patch.yml.

Use Cases & Considerations

  • Ideal for workflows that need to reduce review overhead while maintaining security, especially scenarios with frequent workspace reads.
  • The plugin runs with the current DSH process permissions; review the source code and license before use.
  • The plugin depends on @deepseek-ai/schemastery; Node.js version requirement is ≥22.
  • The reviewer defaults to a read-only sub-agent; timeout and max token count are configurable.
  • Error handling defaults to denial (fail closed); can be changed to prompt a human as needed.

Conclusion

Better Auto Review implements a Codex-style review mode that, while maintaining the workspace-write sandbox, reviews only explicit permission escalations. It supports single-call approval, rejection with reasons, and human fallback, significantly reducing review overhead. For more details, visit the plugin page: https://www.skillhub.cn/plugins/EricStoneChina/better-auto-review.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye