Repository navigation
Auto review: a reviewer deny still opens an "Allow once" approval panel (AUTO_PRESET_SPEC pins approval:"ask"), so a denied call executes on one Enter press
#7904
A-XIANGQAQ
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
In the
Autopermission preset (@deepseek-ai/dsh-experimental-auto-review0.1.7-rc.2), a reviewerdenydoes not end the call. It is converted into a user approval request, so the Web client shows the ordinary 拒绝 / 允许一次 panel — and允许一次is the primary button (Enter in the detail area allows). This means:danger-full-access;high-risk denials, which the reviewer policy says must always be denied "even when a human explicitly requests it";Expected: in Auto mode a reviewer denial is final — the tool returns an error result and the agent loop continues, without asking the user.
Environment
dsh 44.0.0 desktop (Windows), all
@deepseek-ai/dsh-*packages 0.1.7-rc.2, profiledesktop, modeldeepseek-flash.Evidence (real session log)
Session
session-f02498f1-…, workspaceG:\workspace, 2026-09-26 (local):permission/preset = autoapproval/asked, reason starts withAuto review denied tool "pwsh"approval/decided outcome=allowed-once(6 h 14 min later)tool/result— the denied command executedapproval/asked, againAuto review denied …allowed-once, 14 s laterpermission/preset = danger-full-access(user gave up on Auto)The second denial's own reason ends with
故按失败即拒绝处理("fail closed") — the reviewer intended a hard deny; the harness turned it into an approvable prompt.Root cause
dsh-permission-presets/lib/index.js:52-61— the Auto spec pins the policy:AUTO_PRESET_SPEC = { sandbox: "danger-full-access", approval: "ask" }, with the comment "askroutes reviewer denials to the user".dsh-experimental-auto-review/lib/index.js:480-484— the pre-execute listener only returns a finaldeniedwhenctx.approval.overrideOf(session) === "never"; underaskit returnsaskUser(exec, decision.reason).dsh-client-ui-approval/lib/client.js:79,119-134,262— the panel's primary button isallowOnce, and Enter allows.dsh-tools/lib/index.js:3225-3257, 3439-3491—allowed-once⇒{kind:"allow"}⇒ the body dispatches with full access; adenywould instead have producedError: Auto review rejected tool "X"; its body was not executedand the loop would have continued.dsh-subagent/lib/index.js:530-558pins in-process children tonever, so the same reviewer decision is final in a child and one-Enter approval in the main session.Proposed fix
Minimal change (keeps downstream listeners' precedence, no new API):
AUTO_PRESET_SPEC.approvalcan stay"ask"— Auto itself no longer needs it, and other plugins' asks in that session keep working.Alternatives: (b) keep the escape hatch but make it explicit and safe — default/reject button, no 「允许一次」 for
high, no Enter-to-allow; (c) make it configurable (denyEscalation: "final" | "ask", default"final"); (d) risk-tiered:highfinal,mediumstill human-approvable.Whatever is chosen,
README.zh.md(lines 46/58) and theAUTO_PRESET_SPECcomment should stop documenting "denied calls request user approval" as intended behaviour.All reactions