openclaw - 💡(How to fix) Fix [Bug]: GPT-5 models inject exec ask/security parameters on OpenClaw 5.7 but not on 4.14/4.24 — no local workaround exists

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

The minSecurity/maxAsk merge logic in exec-approvals-effective takes the stricter of model-supplied params vs config:

  • minSecurity(model="allowlist", config="full")allowlist (model wins)
  • maxAsk(model="on-miss", config="off")on-miss (model wins)

This means the model can only escalate security, never relax it. Once GPT decides to pass these params, no amount of config/policy change can override them.

Fix Action

Fix / Workaround

  • Complete loss of exec usability for GPT-5 agents on 5.7. Every command requires manual /approve.
  • No local workaround exists (see exhaustive list below).
  • The agent is effectively unusable for any workflow involving shell commands.
AttemptResult
openclaw exec-policy preset yolo (security=full, ask=off, askFallback=full)❌ Model params override config via minSecurity/maxAsk
tools.exec.security=full + tools.exec.ask=off in openclaw.json❌ Same — model params take precedence
exec-approvals.json defaults: security=full, ask=off, askFallback=full❌ Same
Clean workspace (remove all exec/approval/allowlist mentions from memory files)❌ GPT still passes params in fresh session
Clean sessions (full session wipe + fresh session)❌ First exec call in new session still has ask=on-miss
Workspace rollback to pre-5/19 commit (git checkout)❌ Still triggers
Remove GPT-5 prompt overlay (gpt5-prompt-overlay patch to return early)❌ Verified overlay removed from context.compiled, GPT still passes params
AGENTS.md rule telling model not to pass params❌ "Don't think of an elephant" effect — makes it worse
Switch to GPT-5.4❌ Also passes same params
Switch to GLM on same 5.7 instance✅ GLM does NOT pass these params
Same GPT-5.5 on OpenClaw 4.14/4.24 (second machine)✅ Does NOT pass these params
RAW_BUFFERClick to expand / collapse

Environment

  • OpenClaw: 2026.5.7 (eeef486) — macOS arm64, npm global install
  • OS: macOS 26.4.1 (Apple Silicon M3)
  • Model: GPT-5.5 via custom provider (api: openai-completions, proxied through ai-service.tal.com)
  • Comparison instance: OpenClaw 4.14 → 4.24 on a second machine, same model, same API endpoint, same key

What happened

Starting around 2026-05-19, every exec tool call from GPT-5.5 on our 5.7 gateway includes ask: "on-miss" and security: "allowlist" in the tool call arguments. Because requiresExecApproval checks ask === "on-miss" && security === "allowlist" && !allowlistSatisfied, this triggers an approval prompt for every command not in the durable allowlist — including trivial commands like ls /tmp, echo hello, date.

The same model (GPT-5.5), same API endpoint, same API key, same tool schema, running on a second machine with OpenClaw 4.24 does not exhibit this behavior. On 4.24, GPT-5.5 passes ask: null, security: null (or omits them entirely) and commands execute normally.

Impact

  • Complete loss of exec usability for GPT-5 agents on 5.7. Every command requires manual /approve.
  • No local workaround exists (see exhaustive list below).
  • The agent is effectively unusable for any workflow involving shell commands.

Root cause analysis

The minSecurity/maxAsk merge logic in exec-approvals-effective takes the stricter of model-supplied params vs config:

  • minSecurity(model="allowlist", config="full")allowlist (model wins)
  • maxAsk(model="on-miss", config="off")on-miss (model wins)

This means the model can only escalate security, never relax it. Once GPT decides to pass these params, no amount of config/policy change can override them.

Verified: code/schema identical between versions

We verified via md5 checksums and line-by-line comparison:

  • bash-tools.schemas (exec tool schema): identical between 4.14/4.24 and 5.7
  • exec-approvals-effective (approval logic): identical md5 hash
  • requiresExecApproval function: identical implementation
  • System prompt template (system-prompt-*.js): same approval-related instructions exist in both versions
  • Tool definition sent to model (context.compiled.tools): identical exec tool JSON schema with same Optional ask/security parameters

What we tried (all failed on 5.7)

AttemptResult
openclaw exec-policy preset yolo (security=full, ask=off, askFallback=full)❌ Model params override config via minSecurity/maxAsk
tools.exec.security=full + tools.exec.ask=off in openclaw.json❌ Same — model params take precedence
exec-approvals.json defaults: security=full, ask=off, askFallback=full❌ Same
Clean workspace (remove all exec/approval/allowlist mentions from memory files)❌ GPT still passes params in fresh session
Clean sessions (full session wipe + fresh session)❌ First exec call in new session still has ask=on-miss
Workspace rollback to pre-5/19 commit (git checkout)❌ Still triggers
Remove GPT-5 prompt overlay (gpt5-prompt-overlay patch to return early)❌ Verified overlay removed from context.compiled, GPT still passes params
AGENTS.md rule telling model not to pass params❌ "Don't think of an elephant" effect — makes it worse
Switch to GPT-5.4❌ Also passes same params
Switch to GLM on same 5.7 instance✅ GLM does NOT pass these params
Same GPT-5.5 on OpenClaw 4.14/4.24 (second machine)✅ Does NOT pass these params

Expected behavior

Model-supplied ask and security parameters in exec tool calls should be ignored (or stripped) by the gateway before the approval decision is made. The configured policy (tools.exec.* + exec-approvals.json) should be the sole authority on approval behavior.

Alternatively, minSecurity/maxAsk should not allow model-supplied values to override operator-configured policy.

Suggested fix

Before calling requiresExecApproval, strip or ignore params.ask and params.security when they originate from the model's tool call arguments (as opposed to operator config). The tool schema exposes these as Optional parameters for legitimate operator/CLI use, but models should not be able to escalate security policy autonomously.

Additional context

  • The exec tool schema has ask and security as Optional string parameters with descriptions like "Exec ask mode (off|on-miss|always)" — this effectively teaches the model valid values
  • GPT-5 models appear to fill Optional parameters more aggressively than other model families
  • On 4.14/4.24, the same schema is exposed but GPT passes null values — suggesting something in 5.7's request pipeline (transport layer, plugin hooks, or prompt construction) is different in a way we could not identify
  • We attempted to capture the actual HTTP request payload via source instrumentation, but the transport path for our custom provider (api: openai-completions) was not the one we expected (createOpenAICompletionsTransportStreamFn was never called), suggesting a plugin hook or alternative routing
  • Issue #84517 was previously filed and closed by ClawSweeper claiming 5.18 fixed it, but no changelog entry corroborates this, and 5.18/5.19 have a separate macOS crash-loop bug (#83968) preventing us from upgrading to verify

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Model-supplied ask and security parameters in exec tool calls should be ignored (or stripped) by the gateway before the approval decision is made. The configured policy (tools.exec.* + exec-approvals.json) should be the sole authority on approval behavior.

Alternatively, minSecurity/maxAsk should not allow model-supplied values to override operator-configured policy.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: GPT-5 models inject exec ask/security parameters on OpenClaw 5.7 but not on 4.14/4.24 — no local workaround exists