Skip to content

2026.5.2: plugin must declare contracts.tools before registering agent tools #85

Description

@vkrmch

Summary

OpenClaw 2026.5.2 enforces a new contract: plugins must declare contracts.tools in their definePluginEntry({...}) config before calling api.registerTool(...). openclaw-honcho v1.4.1 still uses the legacy "register-first, declare-nothing" pattern, so all five Honcho tools fail to register on gateways running 2026.5.2.

Memory capture hooks (gateway/context/capture) and the memory-prompt-section builder are not affected and still work — but the agent-callable tools (honcho_session, honcho_context, honcho_search_conclusions, honcho_ask, honcho_search_messages) are silently dropped, so the agent loses the ability to query Honcho during a turn.

Versions

  • openclaw: 2026.5.2 (released 2026-05-02)
  • @honcho-ai/openclaw-honcho: 1.4.1 (also reproduces on 1.3.2)

Repro

Install openclaw-honcho on any gateway running 2026.5.2 and start the gateway.

Logs

/home/<agent>/logs/openclaw.log (logged once per tool, 5 lines on every start):

ERROR [plugins] plugin must declare contracts.tools before registering agent tools (plugin=openclaw-honcho, source=…/extensions/openclaw-honcho/dist/index.js)

Source of the check: /usr/lib/node_modules/openclaw/dist/subsystem-Bhq-McUP.js:150 (in 2026.5.2).

Plugin entry that triggers it: index.ts L85-126.

Suggested fix

Declare the tool ids in contracts.tools so openclaw can validate registrations upfront:

export default definePluginEntry({
  id: "openclaw-honcho",
  name: "Memory (Honcho)",
  kind: "memory",
  configSchema: honchoConfigSchema,
  contracts: {
    tools: [
      "honcho_session",
      "honcho_context",
      "honcho_search_conclusions",
      "honcho_ask",
      "honcho_search_messages",
      // plus the two passthrough tools registered by registerMemoryPassthrough
    ],
  },
  register(api) { ... },
});

Happy to send a PR if a maintainer can confirm the exact shape expected — specifically whether the passthrough tools need to be listed and whether descriptors are required alongside ids.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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