-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: Approval prompt wrongly says effective policy requires approval every time for non-persistable redirected command #97069
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.no-staleExclude from stale automationExclude from stale automationregressionBehavior that previously worked and now failsBehavior that previously worked and now fails
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.no-staleExclude from stale automationExclude from stale automationregressionBehavior that previously worked and now failsBehavior that previously worked and now fails
Type
Fields
Priority
None yet
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
OpenClaw: 2026.6.10
Exec host: gateway
Effective policy: security=allowlist, ask=on-miss
Exec security: allowlist
Exec ask: on-miss
Observed from both main agent and subagent. Plain
openclaw --versionbehaves normally;openclaw --version 2>&1hides Allow Always with misleading policy text.Discord Support Discussion
Steps to reproduce
“The effective approval policy requires approval every time, so Allow Always is unavailable.”
Expected behavior
If Allow Always is unavailable because shell redirection makes the command non-persistable/one-shot, the prompt should say that. It should not imply the effective policy is ask=always when
openclaw approvals get --gatewayshows ask=on-miss.Actual behavior
Actual behavior
When the requested command includes shell redirection, for example:
openclaw --version 2>&1OpenClaw shows an exec approval prompt, but
Allow Alwaysis unavailable. The prompt explains this by saying:This happens even though the effective gateway exec policy is
security=allowlistandask=on-miss, confirmed byopenclaw approvals get --gateway/ effective policy output.The same command without redirection:
does not show the misleading behavior and can run normally / offers the expected reusable approval behavior. The behavior is the same from the main agent and from a subagent, so the trigger appears to be the redirected command shape rather than subagent routing.
OpenClaw version
2026.6.10
Operating system
macOS 15.7.7
Install method
npm global
Model
openrouter/deepseek/deepseek-v4-flash
Provider / routing chain
OpenClaw -> OpenRouter
Additional provider/model setup details
Not relevant / not model-specific. Reproduced with exec approval prompts via the gateway host. The behavior appears tied to command shape (
2>&1redirection), not the provider or model.Logs, screenshots, and evidence
Impact and severity
Affected users/systems/channels: Users using gateway exec approvals, including Telegram approval prompts, for commands that include shell redirection such as
2>&1. Observed from both the main agent and a subagent.Severity: Annoying / workflow friction, not currently observed as data loss or a full workflow block. The command can still be approved once, but
Allow Alwaysis unavailable and the prompt gives a misleading reason.Frequency: Always for the observed redirected command shape (
openclaw --version 2>&1) in the tested setup. Not reproduced for the plain command (openclaw --version).Consequence: Users may have to repeatedly approve redirected commands and may misdiagnose their approval policy as
ask=alwayseven when effective policy isask=on-miss. This adds troubleshooting time and makes the approval UI harder to trust.Additional information
Asking agent main to run
openclaw --version:Asking agent main to run
openclaw --version 2>&1:Asking agent main to run a subagent to run
openclaw --version:Asking agent main to run a subagent to run
openclaw --version 2>&1: