Skip to content

Tool policy pipeline falsely warns about plugin tools in alsoAllow #77801

Description

@xilopaint

Description

When a plugin tool (e.g. llm-task) is listed in an agent's tools.alsoAllow and the plugin is enabled, the tool policy pipeline emits a warning:

tools: agents.main.tools.allow allowlist contains unknown entries (llm-task). These entries won't match any tool unless the plugin is enabled.

This is misleading — the plugin is enabled and the tool does work correctly. The warning appears because analyzeAllowlistByToolType runs before plugin tools are registered in the session's tool catalog, so the pipeline classifies them as "unknown" at that point.

Steps to Reproduce

  1. Enable a plugin with an optional: true tool (e.g. llm-task)
  2. Add the tool name to an agent's tools.alsoAllow (needed because optional tools aren't included by the default profile)
  3. Start the gateway and observe the logs

Expected Behavior

The pipeline should recognize that the entry corresponds to an enabled plugin tool and not emit a warning — or at minimum, the warning should distinguish between "plugin not enabled" and "plugin enabled but tool not yet registered."

Actual Behavior

The warning incorrectly states the entries "won't match any tool unless the plugin is enabled," even though the plugin is already enabled.

Root Cause

In tool-policy-pipeline.ts, the analyzeAllowlistByToolType function checks allowlist entries against pluginGroups (built from the currently registered tools) and coreTools. At the time the pipeline runs — particularly in the [agent/embedded] context — plugin tools may not yet be populated in the tool catalog, causing valid plugin tool names to fall into unknownAllowlist.

Environment

  • OpenClaw 2026.5.4
  • Plugin: llm-task (enabled, optional: true)
  • Agent config: tools.alsoAllow: ["llm-task"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis 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.no-staleExclude from stale automation

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions