Symptom
User installs @deeplake/hivemind into OpenClaw. Files land at ~/.openclaw/extensions/hivemind/ correctly. But:
openclaw plugins list does not show [plugins] Hivemind plugin registered
- Auto-capture silently does nothing — no errors, no logs, just empty sessions in Deeplake
/hivemind_setup is unreachable (the agent can't see the command, because the plugin never registered)
Root cause
OpenClaw gates plugin loading on two allowlists in ~/.openclaw/openclaw.json:
plugins.allow — controls whether the plugin is allowed to load at all
tools.alsoAllow — controls whether the plugin's tools are exposed to the agent once loaded
If plugins.allow is an explicit non-empty array (the default-restrictive openclaw config), and "hivemind" is not in it, the plugin is never loaded — agent_end never fires for it, so auto-capture is a no-op.
Hivemind's installer + setup helpers only handle tools.alsoAllow:
hivemind/src/cli/install-openclaw.ts:8-30 (installOpenclaw) drops files on disk and never touches openclaw.json.
hivemind/openclaw/src/setup-config.ts:33-67 (ensureHivemindAllowlisted) and :129-139 (detectAllowlistMissing) only read/write tools.alsoAllow.
This makes /hivemind_setup chicken-and-egg: the user has to add "hivemind" to plugins.allow manually before the slash command is even reachable.
Manual fix that works (reported by a user 2026-05-11)
Edit ~/.openclaw/openclaw.json:
```json
{
"plugins": { "allow": ["...", "hivemind"] },
"tools": { "alsoAllow": ["...", "hivemind"] }
}
```
Then systemctl --user restart openclaw-gateway.service. `openclaw plugins list` now shows the plugin registered. No backfill — capture starts on the next turn.
Fix (proposed for this session)
-
install-openclaw.ts — after copying files on disk, patch ~/.openclaw/openclaw.json using openclaw's own allowlist semantics:
- If
plugins.allow is an explicit non-empty array missing \"hivemind\", append.
- If absent / empty, leave alone (don't silently flip the user from default-allow to explicit-allowlist).
- Same for
tools.alsoAllow.
- Atomic write (tmp + rename) with timestamped backup.
- Print restart hint and "capture starts next turn — no backfill" caveat in installer output.
-
openclaw/src/setup-config.ts — extend ensureHivemindAllowlisted + detectAllowlistMissing to also handle plugins.allow. Same safe semantics: only patch when it's already an explicit array.
-
Tests — cover all edge cases:
plugins.allow array missing hivemind → patched
plugins.allow array containing hivemind → idempotent
plugins.allow absent → untouched
plugins.allow empty array [] → untouched (default-allow semantics)
- Both arrays missing → only patch what exists
- Restart hint present in installer success message
-
Real-world E2E — install on a real OpenClaw gateway, send a telegram message, verify the captured turn lands in the Deeplake sessions table.
References
- OpenClaw's own allowlist helper (the safe semantics to mirror): `ext/openclaw/src/config/plugins-allowlist.ts:7` `ensurePluginAllowlisted(cfg, pluginId)`.
- Existing setup-config: `hivemind/openclaw/src/setup-config.ts:33-67, 129-139`.
- Existing installer: `hivemind/src/cli/install-openclaw.ts:8-30`.
- Existing setup-command tests: `hivemind/openclaw/tests/setup-command.test.ts` (covers only `tools.alsoAllow` today).
Test plan
`Confidence: high` — the root cause is mechanical (missing config patch), and openclaw already exposes the correct semantics for us to mirror.
Symptom
User installs
@deeplake/hivemindinto OpenClaw. Files land at~/.openclaw/extensions/hivemind/correctly. But:openclaw plugins listdoes not show[plugins] Hivemind plugin registered/hivemind_setupis unreachable (the agent can't see the command, because the plugin never registered)Root cause
OpenClaw gates plugin loading on two allowlists in
~/.openclaw/openclaw.json:plugins.allow— controls whether the plugin is allowed to load at alltools.alsoAllow— controls whether the plugin's tools are exposed to the agent once loadedIf
plugins.allowis an explicit non-empty array (the default-restrictive openclaw config), and"hivemind"is not in it, the plugin is never loaded —agent_endnever fires for it, so auto-capture is a no-op.Hivemind's installer + setup helpers only handle
tools.alsoAllow:hivemind/src/cli/install-openclaw.ts:8-30(installOpenclaw) drops files on disk and never touchesopenclaw.json.hivemind/openclaw/src/setup-config.ts:33-67(ensureHivemindAllowlisted) and:129-139(detectAllowlistMissing) only read/writetools.alsoAllow.This makes
/hivemind_setupchicken-and-egg: the user has to add"hivemind"toplugins.allowmanually before the slash command is even reachable.Manual fix that works (reported by a user 2026-05-11)
Edit
~/.openclaw/openclaw.json:```json
{
"plugins": { "allow": ["...", "hivemind"] },
"tools": { "alsoAllow": ["...", "hivemind"] }
}
```
Then
systemctl --user restart openclaw-gateway.service. `openclaw plugins list` now shows the plugin registered. No backfill — capture starts on the next turn.Fix (proposed for this session)
install-openclaw.ts— after copying files on disk, patch~/.openclaw/openclaw.jsonusing openclaw's own allowlist semantics:plugins.allowis an explicit non-empty array missing\"hivemind\", append.tools.alsoAllow.openclaw/src/setup-config.ts— extendensureHivemindAllowlisted+detectAllowlistMissingto also handleplugins.allow. Same safe semantics: only patch when it's already an explicit array.Tests — cover all edge cases:
plugins.allowarray missing hivemind → patchedplugins.allowarray containing hivemind → idempotentplugins.allowabsent → untouchedplugins.allowempty array[]→ untouched (default-allow semantics)Real-world E2E — install on a real OpenClaw gateway, send a telegram message, verify the captured turn lands in the Deeplake sessions table.
References
Test plan
`Confidence: high` — the root cause is mechanical (missing config patch), and openclaw already exposes the correct semantics for us to mirror.