fix: declare contracts.tools in plugin manifest (OpenClaw 5.2 compat)#737
Open
DaleXiao wants to merge 1 commit intoCortexReach:masterfrom
Open
fix: declare contracts.tools in plugin manifest (OpenClaw 5.2 compat)#737DaleXiao wants to merge 1 commit intoCortexReach:masterfrom
DaleXiao wants to merge 1 commit intoCortexReach:masterfrom
Conversation
OpenClaw 5.2+ enforces a new plugin manifest contract: any plugin that
calls api.registerTool() must first declare the tool names in
contracts.tools (string[]). Without this, the gateway rejects every
tool registration and emits this error per tool:
plugin must declare contracts.tools before registering agent tools
(plugin=memory-lancedb-pro, source=.../memory-lancedb-pro/index.ts)
Concrete impact on memory-lancedb-pro:
- All 14 agent tools (memory_recall / memory_store / memory_forget /
memory_update / memory_list / memory_stats / memory_archive /
memory_compact / memory_debug / memory_explain_rank / memory_promote /
self_improvement_{log,extract_skill,review}) fail to register.
- Agents lose the ability to ACTIVELY query memory via memory_recall
(the tool simply isn't in their toolset).
- autoRecall (passive injection) is unaffected because it bypasses
the tool registry, so this often hides as 'memory still seems to
work' while the agent has lost half the recall surface.
Fix: declare all 14 tool names in openclaw.plugin.json contracts.tools.
Verified locally on OpenClaw 2026.5.2: after the fix the contracts.tools
errors are gone and all tools register cleanly. No behavior change on
older OpenClaw versions (the field is ignored if not enforced).
Companion to CortexReach#727 (allowConversationAccess) — same 5.2 compat surface.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OpenClaw 5.2+ enforces a new plugin manifest contract: any plugin that calls
api.registerTool()must first declare the tool names incontracts.tools: string[]. Without it, the gateway rejects every tool registration with:Impact on memory-lancedb-pro
All 14 agent tools fail to register on 5.2:
memory_recall,memory_store,memory_forget,memory_updatememory_list,memory_stats,memory_archive,memory_compactmemory_debug,memory_explain_rank,memory_promoteself_improvement_log,self_improvement_extract_skill,self_improvement_reviewThis silently breaks agent-driven memory recall. Agents lose
memory_recallfrom their toolset entirely. The bug hides easily because:autoRecall(passive injection) bypasses the tool registry → still worksmemory_recall("specific topic")The only trace is 14 error lines in
gateway.err.logper startup.Fix
Declare all 14 tool names in
openclaw.plugin.json→contracts.tools. 18-line addition, no behavior change on older OpenClaw versions (field is ignored if not enforced).Verification
Tested on OpenClaw 2026.5.2 (npm
openclaw@2026.5.2):Before:
×14 lines on each gateway start.
After:
0 contracts.tools errors. All 14 tools available to agents.
Related
Companion to #727 (
allowConversationAccess) — same OpenClaw 5.2 compatibility surface, complementary fixes. After both land, memory-lancedb-pro is fully compatible with 5.2 non-bundled installation.Tool inventory source
The 14 tool names are extracted from
src/tools.ts'sapi.registerTool({ name: ... })calls (current master tip0545c91).