openclaw - 💡(How to fix) Fix Feature request: Allow users to configure exec approval policy (strict/moderate/permissive) [1 participants]

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…
GitHub stats
openclaw/openclaw#58858Fetched 2026-04-08 02:31:51
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Root Cause

  • Power users who self-host OpenClaw on their own machines should be able to choose their own risk tolerance
  • The agent's effectiveness is severely degraded when every diagnostic command needs a round-trip approval
  • Different deployment scenarios (personal laptop vs shared server vs production) warrant different security postures

Code Example

{
  "gateway": {
    "exec": {
      "approvalPolicy": "moderate"
    }
  }
}

---

{
  "gateway": {
    "exec": {
      "autoApprove": ["grep *", "cat *", "ls *", "wc *", "head *", "tail *", "find *"],
      "alwaysDeny": ["rm -rf *", "shutdown *"]
    }
  }
}
RAW_BUFFERClick to expand / collapse

Feature Request

Problem

After upgrading to 2026.3.31, every exec command from the agent requires manual user approval, even read-only commands like grep, cat, ls, wc -l. This makes troubleshooting and routine operations extremely slow — during a Telegram debugging session today, over 10 approval prompts were needed just to read log files.

The current allow-once / allow-always / deny mechanism is per-command, which means:

  • Users must approve each new command individually
  • allow-always only applies to the exact same command string
  • There is no way to set a blanket policy like "trust read-only commands" or "trust all commands from the main agent session"

Proposed Solution

Allow users to configure exec approval policy in openclaw.json, for example:

{
  "gateway": {
    "exec": {
      "approvalPolicy": "moderate"
    }
  }
}

Suggested policy levels:

PolicyBehavior
strictEvery exec requires approval (current default in 3.31)
moderateRead-only commands auto-approved; write/destructive commands require approval
permissiveAll commands auto-approved for the owner session; destructive commands still logged
offNo approval required (user accepts full responsibility)

Alternatively, support pattern-based allowlists:

{
  "gateway": {
    "exec": {
      "autoApprove": ["grep *", "cat *", "ls *", "wc *", "head *", "tail *", "find *"],
      "alwaysDeny": ["rm -rf *", "shutdown *"]
    }
  }
}

Why This Matters

  • Power users who self-host OpenClaw on their own machines should be able to choose their own risk tolerance
  • The agent's effectiveness is severely degraded when every diagnostic command needs a round-trip approval
  • Different deployment scenarios (personal laptop vs shared server vs production) warrant different security postures

Environment

  • OpenClaw: 2026.3.31
  • OS: Linux 6.8.0-106-generic (x64)

extent analysis

TL;DR

Configure an approvalPolicy in openclaw.json to automate exec command approvals for read-only commands.

Guidance

  • Review the proposed approvalPolicy levels (strict, moderate, permissive, off) to determine the best fit for your deployment scenario.
  • Consider using pattern-based allowlists to auto-approve specific commands (e.g., grep *, cat *) and deny destructive commands (e.g., rm -rf *).
  • Evaluate the trade-offs between security and usability when choosing an approval policy.
  • Test the proposed configuration changes in a non-production environment before applying them to your production setup.

Example

{
  "gateway": {
    "exec": {
      "approvalPolicy": "moderate",
      "autoApprove": ["grep *", "cat *", "ls *"],
      "alwaysDeny": ["rm -rf *", "shutdown *"]
    }
  }
}

Notes

The effectiveness of this solution depends on the implementation of the proposed approvalPolicy feature in OpenClaw. The example configuration is based on the proposed solution and may require adjustments based on the actual implementation.

Recommendation

Apply a workaround by configuring an approvalPolicy in openclaw.json to automate exec command approvals, as this allows for a balance between security and usability.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING