openai-responses models fill optional sandbox_permissions with the current mode, bricking all bash calls #5500
cloudgg82-blip
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.
Environment
openai-responsesprotocol (pi-ai adapter)workspace-writeSymptom
After switching the session model to a GPT-class model, every
bashtool call is rejected before execution with:Timeline from one session's durable log (session.jsonl.zstd,
request/header+ rejected tool results):None of the rejected commands ever executed — they all fail at parameter validation. The model also never learns to drop the field from the error message: it retries the identical arguments ~12 times.
Root cause
The
bashtool schema exposes an optionalsandbox_permissionsfield whose intended semantics are "a one-shot retry requesting a wider mode after a real sandbox denial" (the description says Only valid as a one-shot retry of a command the sandbox just denied).However, GPT-class models (openai-responses protocol) facing a task that writes into the workspace proactively fill this optional field with
workspace-write— which equals the session's current mode. The harness correctly validates that a same-level value is "not strictly wider" and rejects the call outright.Models on other protocols (glm via
openai-completions) never populate this optional field, which is why the problem only appears on the openai-responses route. Subagents inheriting the same model route hit the same wall.So it is an interaction between model behavior (filling optional permission fields) and a strict validation policy (hard-reject on same-level), which bricks all tool usage for the whole session with no self-recovery.
Suggestions (any one would fix it)
sandbox_permissionsequals the current mode (i.e., not strictly wider), strip the field, log a warning, and execute the command normally instead of rejecting it. A same-level value is a no-op request, not an escalation attempt — it carries no additional risk.sandbox_permissionsin the retry context after a real[sandbox: file access denied]denial.Option 1 seems strictly better for robustness: the escalation path (wider mode requested) still goes through the approval flow, while the no-op case stops bricking sessions.
Reproduction
api: openai-responsesand a GPT-class model.workspace-write.workdir).bashcall rejected with the error above; switching to a glm model makes the identical command succeed immediately.All reactions