-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
u4s-openclaw restart rewrites openclaw.json and breaks WhatsApp allowFrom / owner config #79738
Copy link
Copy link
Open
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Type
Fields
Priority
None yet
Bug type
Behavior bug / deployment wrapper config corruption
Summary
When OpenClaw is launched under the
u4s-openclawwrapper, every restart rewrites/data/.openclaw/openclaw.jsonback to a minimal baseline and discards user config changes for WhatsApp access control and other protected settings.This breaks WhatsApp inbound/outbound authorization after restart even when the config was correct on disk before the restart.
Environment
/data/.npm-global/bin/openclaw/app/u4s-openclawtini -- /app/u4s-openclaw/app/u4s-openclawopenclaw/appExpected behavior
If the user sets:
channels.whatsapp.allowFromchannels.whatsapp.groupAllowFromcommands.ownerAllowFromtools.elevated.allowFrom.webchatagents.list[0].tools.elevated.allowFrom.webchatchannels.discord/slack/telegram.enabledthen those values should survive a gateway restart.
Actual behavior
After restart, config is rewritten and reverts to a baseline such as:
channels.whatsapp.allowFrom-> only the linked self number remainschannels.whatsapp.groupAllowFrom-> only the linked self number remainscommands.ownerAllowFromdisappearstools.elevated.allowFrom.webchatreverts to[*]agents.list[0].tools.elevated.allowFrom.webchatreverts to[*]channels.discord.enabled/slack.enabled/telegram.enabledrevert totrueAs a consequence, WhatsApp DM allowlist behavior breaks after restart:
messagetool sends to the owner fail with:Target "+<redacted>" is not listed in the configured WhatsApp allowFrom policy.Key evidence
1) Config audit shows startup processes rewriting config
/data/.openclaw/logs/config-audit.jsonlrecords startup writes like:openclaw plugins enable whatsappopenclaw plugins enable telegramopenclaw plugins enable discordopenclaw plugins enable slackopenclaw gateway run --port 18789 --bind loopbackAll of them write
/data/.openclaw/openclaw.jsonwithcwd=/app.Example sequence observed after restart:
09:00:20plugins enable whatsapp09:00:25plugins enable telegram09:00:46plugins enable discord09:00:51plugins enable slack09:00:54gateway runImmediately after this sequence, the config has already been reverted.
2) The reverted state is persisted as “good”
Even these files become contaminated with the reverted baseline:
/data/.openclaw/openclaw.json.last-good/data/.openclaw/openclaw.json.bakObserved reverted baseline includes:
{ "channels": { "whatsapp": { "allowFrom": ["+SELF_REDACTED"], "dmPolicy": "allowlist", "enabled": true, "groupAllowFrom": ["+SELF_REDACTED"], "selfChatMode": true }, "discord": {"enabled": true}, "slack": {"enabled": true}, "telegram": {"enabled": true} }, "tools": { "elevated": { "allowFrom": {"webchat": ["*"]}, "enabled": true } } }3) Disk config and runtime diverge
We were able to write the correct config on disk (including owner allowlists and WhatsApp allowFrom entries), but after restart:
openclaw channels status --deep --channel whatsapponly shows the self number in allowlistallowFromReproduction outline
u4s-openclawwrapper.channels.whatsapp.allowFromandgroupAllowFrom.tools.elevated.allowFrom.webchatto a narrow value./appstartup processes.openclaw.jsonreverted and runtime status reflecting only the self number.Why this matters
This is not just cosmetic config drift. It breaks:
Suspected root cause
Either:
u4s-openclawapplies a baked/derived startup baseline over user config on every restart, orplugins enable .../ startup reconciliation is rebuilding config from incomplete defaults and thengateway runpromotes that rewritten state.Related issues
Potentially adjacent, but not the same root cause:
Request
Please investigate the startup path used by
u4s-openclawand confirm why restart-time config reconciliation is overwriting user-edited config.At minimum, restart should not discard explicit user values for: