[Bug] Same-mode sandbox_permissions hard-errors instead of running — loops GPT-family models #4021
Replies: 3 comments
|
Confirmed, and still live on master (c291e79). Your root-cause claim is correct, with one nuance. What the code does today:
Why it still bites: the schema advertises the full enum Workarounds today: (1) if the session already has the mode you need, the model must omit the field — a system-prompt or |
|
Confirmed as a concrete Bash manifestation of this issue on Fedora Linux with DSH 0.1.5-rc.2 and a local web profile using the Responses API. On a new conversation already running with danger-full-access, the model may send sandbox_permissions: "danger-full-access" together with justification: "" (or omit justification). Bash validates the empty/missing justification before it can recognize that the requested mode is already effective, producing: invalid justification: expected a non-empty sentence. Existing conversations often work because they do not emit the redundant fields. Local fix: defer escalation-argument validation until the effective mode is known; return the current mode immediately for same-mode requests, and keep non-empty justification plus approval required for real workspace-write -> danger-full-access escalation. I applied this to Bash and the filesystem edit/write path and verified the service after restart. |
|
Thanks for the Fedora repro — a very useful concrete confirmation. The Your local fix order is the right one: resolve the effective mode first,
Verified still unfixed on master c291e79 as of today. This is tracked in |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
On a
workspace-write(ordanger-full-access) session, a tool call whosesandbox_permissionsrequests a mode the session already has (same or narrower) fails instead of just running. GPT-family models (e.g.gpt-5.6-sol) speculatively attach this field on ordinary calls and then loop on the two errors below for the whole turn — ondanger-full-accessthey never recover.No argument set passes both. The operation needed no escalation — writing in the workspace is already permitted.
Expected: same-mode → run normally; narrower → reject as a downgrade (not "missing justification"); wider → approval unchanged.
Env: DSH
0.1.1-rc.2,gpt-5.6-solviaazure-openai-responses.All reactions