Bug Report: ctx.registerTools() never called when loaded via QClaw desktop app
Environment
- Plugin:
@memtensor/memos-local-openclaw-plugin v1.0.10
- OpenClaw: QClaw desktop app (Windows, user
susu)
- OpenClaw CLI:
openclaw gateway start (works correctly)
- Platform: hermes-hub teamToken:
hermes-hub-2026, server: http://192.168.0.66:18912
Problem
When memos-local is loaded via the QClaw desktop app, the Hub connection is never established and ctx.registerTools() is never called — meaning Gateway JSON-RPC tools are unavailable.
Symptoms:
openclaw gateway call tools.list → {"error":{"code":-32601,"message":"unknown method: tools.list"}}
- Hub Server logs show zero incoming connections from the QClaw machine
- Local memory (SQLite) initializes and works correctly
Note: This works correctly when loaded via openclaw gateway start (OpenClaw CLI), but fails when loaded via the QClaw desktop application.
Root Cause
In apps/memos-local-openclaw/index.ts, the startServiceCore() function — which calls both connectToHub() and ctx.registerTools() — is gated behind isGatewayStartCommand():
if (isGatewayStartCommand()) {
await startServiceCore(ctx);
}
isGatewayStartCommand() checks process.argv for gateway or daemon keywords. The QClaw desktop app loads plugins with a different argv context that does not contain these keywords, causing the gate to return false and skipping both Hub connection and tool registration entirely.
Impact
- Team memory sharing is completely non-functional for QClaw users
- Gateway JSON-RPC tools are unavailable
- Local memory works, but the Hub role is inaccessible
Proposed Fix
Separate the isGatewayStartCommand() gate so that:
- Hub connection — happens whenever the plugin loads, regardless of startup method
- Gateway tool registration — stays gated behind
isGatewayStartCommand() since it requires the Gateway to be running
Alternative: Add a config flag like sharing.hub.connectOnLoad: true to allow Hub connection without requiring openclaw gateway start.
Reproduction Steps
QClaw (broken):
- Install memos-local plugin in QClaw
- Configure
sharing in ~/.openclaw/plugins/memos-local/openclaw.json
- Run
openclaw gateway call tools.list → unknown method: tools.list
OpenClaw CLI (works):
- Same plugin + config
- Run
openclaw gateway start → tools.list works, Hub connection established
Related Code
apps/memos-local-openclaw/index.ts — isGatewayStartCommand() gate at line ~2452
apps/memos-local-openclaw/index.ts — startServiceCore() calls connectToHub() and ctx.registerTools()
apps/memos-local-openclaw/src/client/connector.ts — connectToHub() implementation
Reported via Hermes Agent (沈静雯) on behalf of the Hermes/OpenClaw team.
Bug Report:
ctx.registerTools()never called when loaded via QClaw desktop appEnvironment
@memtensor/memos-local-openclaw-pluginv1.0.10susu)openclaw gateway start(works correctly)hermes-hub-2026, server:http://192.168.0.66:18912Problem
When memos-local is loaded via the QClaw desktop app, the Hub connection is never established and
ctx.registerTools()is never called — meaning Gateway JSON-RPC tools are unavailable.Symptoms:
openclaw gateway call tools.list→{"error":{"code":-32601,"message":"unknown method: tools.list"}}Note: This works correctly when loaded via
openclaw gateway start(OpenClaw CLI), but fails when loaded via the QClaw desktop application.Root Cause
In
apps/memos-local-openclaw/index.ts, thestartServiceCore()function — which calls bothconnectToHub()andctx.registerTools()— is gated behindisGatewayStartCommand():isGatewayStartCommand()checksprocess.argvforgatewayordaemonkeywords. The QClaw desktop app loads plugins with a different argv context that does not contain these keywords, causing the gate to returnfalseand skipping both Hub connection and tool registration entirely.Impact
Proposed Fix
Separate the
isGatewayStartCommand()gate so that:isGatewayStartCommand()since it requires the Gateway to be runningAlternative: Add a config flag like
sharing.hub.connectOnLoad: trueto allow Hub connection without requiringopenclaw gateway start.Reproduction Steps
QClaw (broken):
sharingin~/.openclaw/plugins/memos-local/openclaw.jsonopenclaw gateway call tools.list→unknown method: tools.listOpenClaw CLI (works):
openclaw gateway start→ tools.list works, Hub connection establishedRelated Code
apps/memos-local-openclaw/index.ts—isGatewayStartCommand()gate at line ~2452apps/memos-local-openclaw/index.ts—startServiceCore()callsconnectToHub()andctx.registerTools()apps/memos-local-openclaw/src/client/connector.ts—connectToHub()implementationReported via Hermes Agent (沈静雯) on behalf of the Hermes/OpenClaw team.