[Proposal] Make sandbox escalation session-aware and ignore redundant same-mode requests #6015
Replies: 1 comment 1 reply
|
@heyallencao 你的 #6015 提案质量很高,而且你这套设计(scope-aware schema projection + same-mode fallback)正是这个家族诸多报告里我判断过的收敛方向。先把我复核到的源级事实摆出来,再补两个你可能没注意的点。 源级确认(master 5dda764,0.1.5-alpha.1)
你的方案里值得注意的分层你实际上把修复拆成了两层,这个分法很对:
这两层缺一不可:只做广告层(schema projection)挡不住"模型从旧 schema / 缓存补丁继续带字段"——这正是很多报告的复现场景(模型看到 schema 说能升级就坚持带);只做裁决层(same-mode 忽略)又没法让模型提前知道不该带——白走一轮。你两者都提了,方向正确。 两个你需要补齐的点① same-mode fallback 的触发器位置你写的是
落点上是:在 ② 你的"Project escalation options"表里有一个隐藏的迁移问题你把 一句话结论方向对,落点建议:广告层做 schema projection(按 policy 投影可升级目标),裁决层前置 same-mode 分支(在 justification/strict-wider 校验之前短路等值声明),并补一条 (附带: |
Uh oh!
There was an error while loading. Please reload this page.
Problem
In a
danger-full-accesssession,bash,pwsh,write, andeditmay still exposesandbox_permissionsandjustification.Some models include those fields and repeatedly hit:
or:
The runtime check is correct:
danger-full-accesshas no wider mode. The mismatch is that tool schemas are registry-global, while sandbox and approval policies are resolved per session.Proposal
Project escalation options from the effective session policy:
read-only+askworkspace-write,danger-full-accessworkspace-write+askdanger-full-accessdanger-full-accessneverWhen no escalation is possible:
sandbox_permissionsandjustification;As a compatibility fallback, when:
ignore the redundant escalation fields and execute under the existing policy without creating an approval request.
Genuine escalation should still require a non-empty justification and approval. Downgrade requests should remain invalid.
ToolRuntime.schemas(scope)and the PTC SDK projection already resolve tools by scope, so a shared scope-aware schema projection point may keep Native and PTC tool calling consistent.Acceptance criteria
approval=neverdoes not advertise escalation.Would a scope-aware schema projection hook in
ToolRuntimebe the preferred implementation direction?All reactions