openclaw - 💡(How to fix) Fix Read-only shell probe failures are classified as mutating tool errors

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…

In 2026.5.24-beta.2, failed read-only shell probes can be surfaced to chat users as visible ⚠️ 🛠️ ... failed warnings.

Observed examples are equivalent to:

ls "$HOME/.openclaw/service-env"
sed -n '1,240p' ~/.openclaw/workspace/skills/discord/SKILL.md

These are read-only diagnostic/probe failures. The agent can usually recover, use another path, or explain the actual blocker, so surfacing them as mutating-tool warnings creates noisy false alarms on chat surfaces.

Root Cause

src/agents/tool-mutation.ts classifies exec and bash as mutating unconditionally. Downstream final-payload policy treats mutating tool errors as user-visible unless explicitly acknowledged, so a failed read-only ls, sed, rg, git status, or openclaw status probe can be delivered like a failed side effect.

This is narrower than the broader tool-warning delivery-policy issue: the shell command did not mutate state in the first place.

Fix Action

Fix / Workaround

I have a patch that conservatively detects common read-only shell probes for bash/exec and keeps unknown commands classified as mutating. It includes coverage for:

Code Example

ls "$HOME/.openclaw/service-env"
sed -n '1,240p' ~/.openclaw/workspace/skills/discord/SKILL.md

---

⚠️ 🛠️ <read-only shell probe> failed
RAW_BUFFERClick to expand / collapse

Summary

In 2026.5.24-beta.2, failed read-only shell probes can be surfaced to chat users as visible ⚠️ 🛠️ ... failed warnings.

Observed examples are equivalent to:

ls "$HOME/.openclaw/service-env"
sed -n '1,240p' ~/.openclaw/workspace/skills/discord/SKILL.md

These are read-only diagnostic/probe failures. The agent can usually recover, use another path, or explain the actual blocker, so surfacing them as mutating-tool warnings creates noisy false alarms on chat surfaces.

Root Cause

src/agents/tool-mutation.ts classifies exec and bash as mutating unconditionally. Downstream final-payload policy treats mutating tool errors as user-visible unless explicitly acknowledged, so a failed read-only ls, sed, rg, git status, or openclaw status probe can be delivered like a failed side effect.

This is narrower than the broader tool-warning delivery-policy issue: the shell command did not mutate state in the first place.

Expected Behavior

Clearly read-only shell probes should be classified as non-mutating and follow the existing non-mutating suppression path. Real or unknown shell commands should remain fail-closed as mutating.

Actual Behavior

A failed read-only shell probe can produce a chat-visible warning such as:

⚠️ 🛠️ <read-only shell probe> failed

Environment

  • OpenClaw 2026.5.24-beta.2
  • Linux/systemd beta runtime

Fix Shape

I have a patch that conservatively detects common read-only shell probes for bash/exec and keeps unknown commands classified as mutating. It includes coverage for:

  • ls $HOME/.openclaw/service-env
  • /bin/bash -lc "sed -n '1,240p' ~/.openclaw/workspace/skills/discord/SKILL.md"
  • git -C /tmp/repo status --short
  • timeout 20 openclaw status --json --all
  • mutating counterexamples like git commit, openclaw update, script execution, and file redirection

Related broader policy issue: #39406.

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

openclaw - 💡(How to fix) Fix Read-only shell probe failures are classified as mutating tool errors