Skip to content

[Bug]: doctor emits repeated tool-policy removal audit lines at normal console level #87798

@oalansilva

Description

@oalansilva

Summary

openclaw doctor emits repeated agents/tool-policy audit lines at normal console level for expected profile filtering.

Version

OpenClaw 2026.5.27 (27ae826)

Observed

With tools.profile set to coding, running doctor printed this line repeatedly before the doctor report:

[agents/tool-policy] tool policy removed 5 tool(s) via tools.profile (coding): agents_list, gateway, message, nodes, tts

In the reproduced case it appeared five times during one doctor run. The doctor itself completed successfully.

Why this looks like a bug

The message appears to be an audit/debug signal for expected tool-profile filtering, not an actionable doctor finding. At info/normal console level it makes the doctor output look noisy and potentially broken, even though the tool removal is expected under the selected profile.

No raw local logs, session ids, tokens, provider command output, project ids, or environment values are included here.

Expected

One of:

  • log this at debug/file-audit level only;
  • suppress it during doctor/tool schema probing;
  • dedupe it per doctor run.

Local workaround verified

Changing the tool-policy audit emission for removed tools from info to debug removed the repeated lines from normal doctor output while preserving the diagnostic path for verbose/debug logging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions