Body:
Bug Description
Plugin version: mindkeeper-openclaw 0.3.2
OpenClaw version: 2026.4.9
Node.js: >= 22
When mindkeeper-openclaw is installed and the Gateway starts, the plugin's
initialization process modifies openclaw.json in a way that triggers
OpenClaw's config protection mechanism, causing the config to be overwritten
with a minimal 256-byte version.
Steps to Reproduce
- Install mindkeeper-openclaw via
openclaw plugins install mindkeeper-openclaw
- Ensure a working openclaw.json with full configuration (~5000+ bytes) exists
- Start the Gateway:
systemctl --user start openclaw-gateway
- Gateway detects config change during mindkeeper init
- Config is overwritten to 256 bytes
Expected Behavior
The plugin should initialize without modifying the openclaw.json file,
or should make changes that don't trigger the config protection mechanism.
Actual Behavior
During Gateway startup, mindkeeper's initialization causes these log entries:
[plugins] [mindkeeper] Plugin loaded.
Config overwrite: openclaw.json (sha256 ... -> ..., backup=...)
Config write anomaly: openclaw.json (size-drop:5347->349, gateway-mode-removed)
Config overwrite: openclaw.json (sha256 ... -> ..., backup=...)
Config write anomaly: openclaw.json (size-drop:5347->256, gateway-mode-removed)
The Gateway's "config protection" mechanism detects a size-drop and
overwrites with minimal config, causing a restart loop.
Environment
- OpenClaw: 2026.4.9
- mindkeeper-openclaw: 0.3.2
- OS: Linux (WSL2)
- Config before start: 5347 bytes (local mode, full config)
- Config after triggered: 256 bytes (minimal stub)
Possible Cause
mindkeeper's init() or watcher initialization may be writing to openclaw.json
(perhaps updating state, timestamps, or tracked file indices). This modifies
the config in a way that OpenClaw's protection mechanism interprets as a threat.
Workaround Attempted
Pre-adding the mindkeeper plugin entries to openclaw.json before running
openclaw plugins install did not prevent the issue. The problem occurs
during Gateway startup when mindkeeper initializes.
Config after failure
After the loop stabilizes, openclaw.json contains only:
{
"tools": { "alsoAllow": [...] },
"meta": { "lastTouchedVersion": "2026.4.9", ... }
}
All gateway, agents, bindings, and other critical sections are removed.
Body:
Bug Description
Plugin version: mindkeeper-openclaw 0.3.2
OpenClaw version: 2026.4.9
Node.js: >= 22
When mindkeeper-openclaw is installed and the Gateway starts, the plugin's
initialization process modifies
openclaw.jsonin a way that triggersOpenClaw's config protection mechanism, causing the config to be overwritten
with a minimal 256-byte version.
Steps to Reproduce
openclaw plugins install mindkeeper-openclawsystemctl --user start openclaw-gatewayExpected Behavior
The plugin should initialize without modifying the openclaw.json file,
or should make changes that don't trigger the config protection mechanism.
Actual Behavior
During Gateway startup, mindkeeper's initialization causes these log entries:
[plugins] [mindkeeper] Plugin loaded.
Config overwrite: openclaw.json (sha256 ... -> ..., backup=...)
Config write anomaly: openclaw.json (size-drop:5347->349, gateway-mode-removed)
Config overwrite: openclaw.json (sha256 ... -> ..., backup=...)
Config write anomaly: openclaw.json (size-drop:5347->256, gateway-mode-removed)
The Gateway's "config protection" mechanism detects a size-drop and
overwrites with minimal config, causing a restart loop.
Environment
Possible Cause
mindkeeper's init() or watcher initialization may be writing to openclaw.json
(perhaps updating state, timestamps, or tracked file indices). This modifies
the config in a way that OpenClaw's protection mechanism interprets as a threat.
Workaround Attempted
Pre-adding the mindkeeper plugin entries to openclaw.json before running
openclaw plugins installdid not prevent the issue. The problem occursduring Gateway startup when mindkeeper initializes.
Config after failure
After the loop stabilizes, openclaw.json contains only:
{ "tools": { "alsoAllow": [...] }, "meta": { "lastTouchedVersion": "2026.4.9", ... } } All gateway, agents, bindings, and other critical sections are removed.