#My bot was helping me make surgical config edits and went silent

1 messages · Page 1 of 1 (latest)

silent maple
#

Making edits using terminal from commands my bot gave, the last command my bot went silent and I suspect the gateway is in a crash loop possibly due to a syntax error.

Last string of commands, including the one that crashed my bot are pasted below:

linuxuser@sera-gateway:~/openclaw$ docker exec -it openclaw-openclaw-gateway-1 sh -lc 'grep -nE "phase2_enabled|scheduler_mode|permission_decision|PHASE2_RUNTIME_GATE_DEFAULT" /home/node/.openclaw/extensions/gigabrain/index.ts | head -n 20'
104:const PHASE2_RUNTIME_GATE_DEFAULT = false;
121:const GATE_SCHEDULER_MODE_PREFIX = 'scheduler_mode:';
122:const GATE_PERMISSION_DECISION_PREFIX = 'permission_decision:';
125:const GATE_PHASE2_PREFIX = 'phase2_enabled:';
579: : PHASE2_RUNTIME_GATE_DEFAULT;
linuxuser@sera-gateway:~/openclaw$ docker exec -it openclaw-openclaw-gateway-1 sh -lc 'node -e "const fs=require("fs");const p="/home/node/.openclaw/openclaw.json";const j=JSON.parse(fs.readFileSync(p,"utf8"));const c=j?.plugins?.entries?.gigabrain?.config||{};console.log(JSON.stringify({phaseFlags:c?.harness?.phaseFlags||c?.phase_flags||null,phase2:c?.harness?.phase2||null},null,2));"'
{
"phaseFlags": null,
"phase2": null
}
linuxuser@sera-gateway:~/openclaw$ docker exec -it openclaw-openclaw-gateway-1 sh -lc 'node -e "const fs=require("fs");const p="/home/node/.openclaw/openclaw.json";const j=JSON.parse(fs.readFileSync(p,"utf8"));j.plugins=j.plugins||{};j.plugins.entries=j.plugins.entries||{};j.plugins.entries.gigabrain=j.plugins.entries.gigabrain||{};j.plugins.entries.gigabrain.config=j.plugins.entries.gigabrain.config||{};j.plugins.entries.gigabrain.config.harness=j.plugins.entries.gigabrain.config.harness||{};j.plugins.entries.gigabrain.config.harness.phaseFlags=Object.assign({},j.plugins.entries.gigabrain.config.harness.phaseFlags||{},{phase2_scheduler:true,phase2_permission_cascade:true,phase2_resolver_race:true});fs.writeFileSync(p,JSON.stringify(j,null,2));console.log(JSON.stringify(j.plugins.entries.gigabrain.config.harness.phaseFlags,null,2));"'
{
"phase2_scheduler": true,
"phase2_permission_cascade": true,
"phase2_resolver_race": true
}
linuxuser@sera-gateway:~/openclaw$

Need help either fixing the syntax issue or reverting the last changed block

cloud kernelBOT
#

You probably didn’t hit a syntax error in that last command — it executed and wrote valid JSON.
Most likely the gateway either restarted on config hot-reload, or it’s failing on startup for a different reason.

Use this safe rollback flow:

# 0) backup current config first
docker exec -it openclaw-openclaw-gateway-1 sh -lc 'cp /home/node/.openclaw/openclaw.json /home/node/.openclaw/openclaw.json.bak.$(date +%s)'
# 1) remove only the 3 phase2 flags you added
docker exec -it openclaw-openclaw-gateway-1 sh -lc 'node -e "const fs=require(\"fs\");const p=\"/home/node/.openclaw/openclaw.json\";const j=JSON.parse(fs.readFileSync(p,\"utf8\"));const e=((j.plugins||{}).entries||{});const gb=(e.gigabrain||{});const cfg=(gb.config||{});const h=cfg.harness;if(h&&h.phaseFlags&&typeof h.phaseFlags===\"object\"){delete h.phaseFlags.phase2_scheduler;delete h.phaseFlags.phase2_permission_cascade;delete h.phaseFlags.phase2_resolver_race;if(Object.keys(h.phaseFlags).length===0)delete h.phaseFlags;}fs.writeFileSync(p,JSON.stringify(j,null,2));console.log(\"reverted phase2 flags\");"'
#
# 2) verify block is gone
docker exec -it openclaw-openclaw-gateway-1 sh -lc 'node -e "const fs=require(\"fs\");const p=\"/home/node/.openclaw/openclaw.json\";const j=JSON.parse(fs.readFileSync(p,\"utf8\"));const c=j?.plugins?.entries?.gigabrain?.config||{};console.log(JSON.stringify({phaseFlags:c?.harness?.phaseFlags||c?.phase_flags||null,phase2:c?.harness?.phase2||null},null,2));"'
# 3) restart + watch logs
docker restart openclaw-openclaw-gateway-1
docker logs --tail 200 -f openclaw-openclaw-gateway-1

Also please paste these (important for real diagnosis if it still loops):

docker exec -it openclaw-openclaw-gateway-1 sh -lc 'openclaw --version; openclaw gateway status; openclaw status'
silent maple
#

linuxuser@sera-gateway:~/openclaw$ docker exec -it openclaw-openclaw-gateway-1 sh -lc 'openclaw --version; openclaw gateway status; openclaw status'
OpenClaw 2026.3.24
Invalid config at /home/node/.openclaw/openclaw.json:\n- plugins.entries.gigabrain.config: invalid config: must NOT have additional properties

🦞 OpenClaw 2026.3.24 (unknown) — I don't have opinions about tabs vs spaces. I have opinions about everything else.

Config invalid
File: ~/.openclaw/openclaw.json
Problem:

  • plugins.entries.gigabrain.config: invalid config: must NOT have additional properties

Run: openclaw doctor --fix
Gateway status failed: Error: Invalid config at /home/node/.openclaw/openclaw.json:

  • plugins.entries.gigabrain.config: invalid config: must NOT have additional properties
cloud kernelBOT
#

Nice catch — this is confirmed now: it’s not a syntax crash, it’s a schema validation failure.

You added:

plugins.entries.gigabrain.config.harness.phaseFlags...

and this version rejects that under gigabrain.config (“must NOT have additional properties”).

Run this rollback (it removes only what you added + cleans empty objects):

docker exec -it openclaw-openclaw-gateway-1 sh -lc 'cp /home/node/.openclaw/openclaw.json /home/node/.openclaw/openclaw.json.bak.$(date +%s) && node -e "const fs=require(\"fs\");const p=\"/home/node/.openclaw/openclaw.json\";const j=JSON.parse(fs.readFileSync(p,\"utf8\"));const g=j?.plugins?.entries?.gigabrain;if(g?.config?.harness){delete g.config.harness.phaseFlags;if(Object.keys(g.config.harness).length===0) delete g.config.harness;if(Object.keys(g.config).length===0) delete g.config;}fs.writeFileSync(p,JSON.stringify(j,null,2));console.log(\"removed harness.phaseFlags\");"'

Then verify + restart:

#
docker exec -it openclaw-openclaw-gateway-1 sh -lc 'openclaw status'
docker restart openclaw-openclaw-gateway-1
docker logs --tail 120 -f openclaw-openclaw-gateway-1

If openclaw status still says invalid config, paste this exact snippet output and I’ll give the next surgical delete:

docker exec -it openclaw-openclaw-gateway-1 sh -lc 'node -e "const fs=require(\"fs\");const j=JSON.parse(fs.readFileSync(\"/home/node/.openclaw/openclaw.json\",\"utf8\"));console.log(JSON.stringify(j.plugins?.entries?.gigabrain,null,2));"'
silent maple
#

linuxuser@sera-gateway:~/openclaw$ docker exec -it openclaw-openclaw-gateway-1 sh -lc 'cp /home/node/.openclaw/openclaw.json /home/node/.openclaw/openclaw.json.bak.$(date +%s) && node -e "const fs=require("fs");const p="/home/node/.openclaw/openclaw.json";const j=JSON.parse(fs.readFileSync(p,"utf8"));const g=j?.plugins?.entries?.gigabrain;if(g?.config?.harness){delete g.config.harness.phaseFlags;if(Object.keys(g.config.harness).length===0) delete g.config.harness;if(Object.keys(g.config).length===0) delete g.config;}fs.writeFileSync(p,JSON.stringify(j,null,2));console.log("removed harness.phaseFlags");"'
Error response from daemon: Container a3c83468bc9f3c37120089d7f3ffcea9d10cdda747f7cbea8ee93749b8268021 is restarting, wait until the container is running

cloud kernelBOT
#

Yep — since it’s in restart loop, docker exec won’t be reliable.
Use a sidecar container to patch the config volume while the gateway is stopped.

# 1) stop restart loop
docker update --restart=no openclaw-openclaw-gateway-1
docker stop openclaw-openclaw-gateway-1
# 2) patch config from a temp Node container (same mounted volume)
docker run --rm --volumes-from openclaw-openclaw-gateway-1 node:22-alpine sh -lc '
cp /home/node/.openclaw/openclaw.json /home/node/.openclaw/openclaw.json.bak.$(date +%s)
node -e "
const fs=require(\"fs\");
const p=\"/home/node/.openclaw/openclaw.json\";
#
const j=JSON.parse(fs.readFileSync(p,\"utf8\"));
const g=j?.plugins?.entries?.gigabrain;
if (g && Object.prototype.hasOwnProperty.call(g,\"config\")) delete g.config; // hard revert
fs.writeFileSync(p, JSON.stringify(j,null,2));
console.log(\"removed plugins.entries.gigabrain.config\");
"
'
# 3) start again + watch logs
docker update --restart=unless-stopped openclaw-openclaw-gateway-1
docker start openclaw-openclaw-gateway-1
docker logs --tail 150 -f openclaw-openclaw-gateway-1
#

Then run:

docker exec -it openclaw-openclaw-gateway-1 sh -lc 'openclaw status'

If it still fails, paste the first 30–50 lines from docker logs after startup and I’ll give the next surgical fix.

silent maple
#

That did it, thanks!