Skip to content

feat: add messages.suppressToolErrors config option#16620

Merged
sebslight merged 3 commits into
openclaw:mainfrom
vai-oro:feat/suppress-tool-errors-v2
Feb 15, 2026
Merged

feat: add messages.suppressToolErrors config option#16620
sebslight merged 3 commits into
openclaw:mainfrom
vai-oro:feat/suppress-tool-errors-v2

Conversation

@vai-oro

@vai-oro vai-oro commented Feb 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Problem: When a tool call fails and the agent doesn't produce a text response, OpenClaw surfaces a ⚠️ tool failed: ... warning to the user. However, the agent already sees these errors in its context and typically handles them by retrying or using alternatives. These warnings clutter the chat and confuse end users.
  • Why it matters: Power users running agents in production want clean chat output. Tool errors are implementation details the agent should handle silently.
  • What changed: Added a messages.suppressToolErrors boolean config option (default: false) that prevents non-mutating tool-error warnings from being sent to the user when enabled. Mutating tool errors are always surfaced regardless of this setting.
  • What did NOT change: Default behavior is unchanged. Mutating tool errors (e.g., failed writes/deletes) are always shown to prevent silent failures on destructive actions.

Change Type

  • Feature

Scope

  • Gateway / orchestration
  • UI / DX

User-visible / Behavior Changes

New config option:

messages:
  suppressToolErrors: true

When enabled, non-mutating tool error warnings are suppressed from user-facing chat. Default: false (no behavior change).

Security Impact

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Verification

  • Dogfooded on a production instance for 3+ days with suppressToolErrors: true
  • Confirmed tool errors still visible to the agent in context (retries work)
  • Confirmed mutating tool errors still surface to users
  • Confirmed default behavior (option unset) is unchanged

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? New optional field, no migration needed
  • Migration needed? No

Failure Recovery

  • Set messages.suppressToolErrors: false (or remove the key) to restore default behavior
  • No data changes, purely display logic

Risks and Mitigations

  • Risk: Users might miss legitimate tool failures if they enable this globally
  • Mitigation: Mutating tool errors are always shown regardless of setting; option defaults to false; documented clearly

Greptile Overview

Greptile Summary

Adds messages.suppressToolErrors config option to hide non-mutating tool error warnings from users while keeping them visible to the agent. Implementation correctly preserves existing behavior when disabled (default) and ensures mutating tool errors are always surfaced regardless of the setting.

  • Added new optional boolean config field to MessagesConfig type with clear documentation
  • Updated Zod schema validation to include the new field
  • Modified error display logic to check the config flag for non-mutating errors only
  • Added help text and UI label for the new configuration option
  • All changes follow existing patterns and maintain backward compatibility

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a simple, well-contained feature addition that follows existing code patterns. The logic correctly preserves mutating tool errors (preventing silent failures) while only suppressing non-mutating errors when explicitly configured. Default behavior is unchanged, maintaining backward compatibility. All type definitions, schema validations, and documentation are properly aligned.
  • No files require special attention

Last reviewed commit: 674a320

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Feb 15, 2026
@sebslight sebslight self-assigned this Feb 15, 2026
@sebslight sebslight merged commit 2c8b921 into openclaw:main Feb 15, 2026
3 checks passed
@sebslight

Copy link
Copy Markdown
Contributor

Merged via squash.

Thanks @vai-oro!

akoscz pushed a commit to akoscz/openclaw that referenced this pull request Feb 15, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 9ae4394
Co-authored-by: vai-oro <258511217+vai-oro@users.noreply.github.com>
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Reviewed-by: @sebslight
GwonHyeok pushed a commit to learners-superpumped/openclaw that referenced this pull request Feb 15, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 9ae4394
Co-authored-by: vai-oro <258511217+vai-oro@users.noreply.github.com>
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Reviewed-by: @sebslight
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 9ae4394
Co-authored-by: vai-oro <258511217+vai-oro@users.noreply.github.com>
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Reviewed-by: @sebslight
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 9ae4394
Co-authored-by: vai-oro <258511217+vai-oro@users.noreply.github.com>
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Reviewed-by: @sebslight
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 9ae4394
Co-authored-by: vai-oro <258511217+vai-oro@users.noreply.github.com>
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Reviewed-by: @sebslight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants