Repository navigation
Description
Summary
After upgrading the OpenClaw gateway from v2026.4.11 to v2026.5.2, the openclaw-basic-memory plugin (v0.2.1) emits a stream of warnings at startup:
plugin must declare contracts.tools before registering agent tools (plugin=openclaw-basic-memory, source=/Users/felix/openclaw-basic-memory/index.ts)
The warning fires once per api.registerTool(...) call — 28 occurrences during a single gateway boot. The plugin still loads and registers tools (registered composited memory_search + memory_get appears in the gateway log), but the new SDK contract added in v2026.5.x requires contracts.tools in the manifest to declare ownership before runtime registration.
Environment
- OpenClaw gateway: v2026.5.2 (npm)
- Node: v24.15.0 (lts/krypton, via nvm)
- Plugin:
@basicmemory/openclaw-basic-memoryv0.2.1 - Plugin source: local install at
/Users/felix/openclaw-basic-memory/ - Plugin manifest peerDependencies:
openclaw: >=2026.3.7 - Platform: macOS 15.7.2 (arm64)
Reproduction
- Install
[email protected]and@basicmemory/[email protected] - Configure the plugin in
openclaw.jsonand start the gateway - Watch
~/.openclaw/logs/gateway.err.log— the warning appears once per registered tool
Root cause
The current openclaw.plugin.json declares id, kind: "memory", skills, uiHints, and configSchema, but no contracts block. Per OpenClaw plugin manifest docs, as of v2026.5.x:
Runtime
api.registerTool(...)registrations must matchcontracts.tools. Tool discovery uses this list to load only the plugin runtimes that can own the requested tools.
The OpenClaw loader source (dist/loader-CiaemmFD.js:1370) emits the warning whenever registerTool is called from a plugin whose manifest lacks contracts.tools.
Proposed fix
Add contracts.tools to openclaw.plugin.json listing all 14 tools the plugin registers via api.registerTool(...):
{
"id": "openclaw-basic-memory",
"kind": "memory",
"contracts": {
"tools": [
"build_context",
"delete_note",
"edit_note",
"list_memory_projects",
"list_workspaces",
"memory_get",
"memory_search",
"move_note",
"read_note",
"schema_diff",
"schema_infer",
"schema_validate",
"search_notes",
"write_note"
]
},
"skills": [...],
"uiHints": {...},
"configSchema": {...}
}Tool names sourced by grepping api.registerTool({ name: "..." }) across tools/*.ts and tools/memory-provider.ts.
While there, consider:
- Bumping
peerDependencies.openclawto>=2026.5.0(or whichever version first introduced thecontracts.toolsenforcement) so older gateways that don't understand the field aren't surprised. - Optionally adding
toolMetadatafor the search/read tools so OpenClaw can avoid loading the plugin runtime when memory is not actively in use (perf optimization called out in the docs).
Impact
- Severity: low — cosmetic warning, plugin still functions correctly
- Frequency: every gateway startup, once per registered tool (28 lines per boot)
- Side effects: none observed;
memory_searchandmemory_getstill register and basic-memory CLI integration is healthy
Reference
- OpenClaw v2026.5.2 changelog (relevant entry): "Tools/plugins: add a platform-level tool descriptor planner for descriptor-first visibility, generic availability checks, and executor references, and cache plugin tool descriptors captured from
api.registerTool(...)so repeated prompt-time planning can skip plugin runtime loading while execution still loads the live plugin tool. (#76079)" - Bundled
memory-wikiplugin manifest (correct shape) atdist/extensions/memory-wiki/openclaw.plugin.json
Activity
groksrc commentedon May 3, 2026
Confirmed fixed in v0.2.2 (released to npm). Upgraded the plugin from v0.2.1 to v0.2.2 against OpenClaw gateway v2026.5.2 + Node v24.15.0 — zero
must declare contracts.toolswarnings on the next gateway boot. The 14-toolcontracts.toolsblock in the manifest matches what the gateway actually registers. Plugin still functions correctly:memory_searchandmemory_getcomposited tools register, basic-memory MCP stdio session connects cleanly. Thanks for the quick turnaround.