Bug: sandbox_permissions/justification break every tool call on Full access - sanitize no-op escalation requests #4763
Replies: 3 comments 1 reply
|
这个故障与 rc.2 的两层设计吻合:schema 是 registry-global,effective mode 是 per-call;因此 Full Access Session 仍可能看到 escalation enum,但 我认为 no-op 方向能解决 liveness,但需要补一个实现细节和一个安全表述:
建议至少固定以下行为:
另外,Session-aware schema 可以减少模型误填,但会让不同 Session 的 tool schema identity 改变并影响 provider prefix cache;它是另一项权衡,不应与 execution-time no-op 混成一个修复。 我把完整 decision table、调用顺序和 regression gates 加到了现有 sandbox runbook: |
关于「宽权限 sanitize 掉」的讨论(来自 dsh-permission-rules 的实测):在 Full access 环境下「默认 escalation 空」时,规则匹配会被 sanitize 吞掉,需要显式放行: # .dsh/rules.yml -- 把 escalation 匹配显式化到 ask,避免 strict-wider 吞掉
- pattern: "**"
action: allow
when: { escalation: null }补充这个 bug:sanitize 对 no-op escalation 的处理有空洞,导致显式配置在部分路径上失效;建议排查时先看 effective mode 的最终判定,再看 call 上下文是否真的带上了 escalation 字段,两者不一致就是它。 |
|
A cross-transport datapoint that supports the "sanitize/ignore, don't throw" direction — the materialization itself is wire-presentation-dependent, so the host will keep seeing both shapes: Same model family (GPT-5.6-sol, ChatGPT-subscription OAuth), driven through a different transport configuration (pi2dsh's Codex route on stock Consequence for this thread: since materialization depends on how the transport presents the schema — not on the model being broken — Full-access hosts will receive redundant |
Uh oh!
There was an error while loading. Please reload this page.
Hi team,
Bug summary
Under
danger-full-access(Full access), models that reflexively fill optional fields (observed with GPT-5.6) passsandbox_permissions+justificationon almost everypwsh/bash/write/editcall. Because the escalation check requires the request to be strictly wider than the call's effective mode, every such call fails with::Error: sandbox escalation to "workspace-write" is not strictly wider than this call's current "danger-full-access" mode
Error: invalid justification: expected a non-empty sentence
The tool schemas are registry-global (built once per composition) while the effective mode is per-session, so a session already at the widest mode is still offered the escalation fields - a Full access session cannot ever widen anything, so any filling of these fields is guaranteed to error.
Proposed fix (safety-neutral)
Treat "requests that cannot widen anything" as a no-op instead of an error:
approveEscalation- if the effective mode is alreadydanger-full-access, return the standing mode without prompting (ignoring any target, including the reflexive first-enum-entryworkspace-write, and any blank justification).requested == effective) is also a no-op: it widens nothing and never prompts.read-only/workspace-writestill goes through the strict widening check, the approval chain, and the closed fail texts; unknown/invalid effective modes still fail closed.Changes span
packages/sandbox/sandbox/src/escalation.tsplus the tool call sites (tool-bash,tool-pwsh,tool-fs), about 170 lines with tests (151 cases pass locally, including host/client typecheck).A ready branch exists on my fork for review:
praiseSun-nus/deepseek-harnesssandbox-noop-escalation(1 commit, based on master @ b150a55)56fac8d319 fix(sandbox): treat no-op sandbox escalation requests as ignorableHappy to rewrite it as a PR the moment external PRs are accepted, or adapt the diff to your preferred form. Thanks for this great harness!
All reactions