-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: Breaking change: api.registerTool() silently fails without contracts.tools since 2026.5.2 #77800
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This 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.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This 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.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
In OpenClaw 2026.4.27 and earlier, plugins could dynamically register tools via
api.registerTool()without declaring them incontracts.tools. After upgrading to 2026.5.2+, tool registration is silently rejected ifcontracts.toolsis not declared in the manifest.Steps to reproduce
Steps to reproduce:
api.registerTool()at startup withoutcontracts.toolsin the manifestNo callable tools remain after resolving explicit tool allowlist; no registered tools matchedExpected behavior
Tools registered via
api.registerTool()should be available to agents, consistent with behavior in 2026.4.27.Actual behavior
registerTool()silently returns without registering the tool. The plugin code receives no error or warning. The only indication of failure is in the gateway logs:OpenClaw version
2026.5.2
Operating system
macOS
Install method
No response
Model
opus 4-6
Provider / routing chain
openclaw
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
Why this is a bug (not just a breaking change):
api.registerTool()returns without throwing, giving the plugin no way to detect the failureregisterTool()calls, making it appear registration succeededcontracts.toolsimpossible to maintain staticallyEnvironment:
Suggested fix:
Either:
api.registerTool()whencontracts.toolsis missing, so plugins can detect and handle the failurecontracts.tools(e.g."xxx_*") to accommodate dynamic tool namespaces