openclaw - 💡(How to fix) Fix config set can silently drop sibling fields on deep writes

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

openclaw config set can silently drop sibling fields when writing a deep path under channels.discord. The command reports success, but unrelated existing fields such as channels.discord.groupPolicy disappear or revert to default after the write.

Error Message

This is a dangerous failure mode because there is no validation error and no obvious log line. The config simply regresses. For Discord, losing groupPolicy: allowlist can silently broaden where the bot responds.

Root Cause

This is a dangerous failure mode because there is no validation error and no obvious log line. The config simply regresses. For Discord, losing groupPolicy: allowlist can silently broaden where the bot responds.

Code Example

openclaw config set channels.discord.groupPolicy allowlist
openclaw config get channels.discord.groupPolicy
# prints: allowlist

---

openclaw config set channels.discord.some.nested.field somevalue

---

openclaw config get channels.discord.groupPolicy
# prints default or empty instead of allowlist
RAW_BUFFERClick to expand / collapse

Summary

openclaw config set can silently drop sibling fields when writing a deep path under channels.discord. The command reports success, but unrelated existing fields such as channels.discord.groupPolicy disappear or revert to default after the write.

Environment

  • OpenClaw version: 2026.5.7
  • Install path: native install via the official one-liner
  • Host OS: Ubuntu 24.04

Reproduction

Start from a clean config and set a known field:

openclaw config set channels.discord.groupPolicy allowlist
openclaw config get channels.discord.groupPolicy
# prints: allowlist

Now perform any deeper write under channels.discord:

openclaw config set channels.discord.some.nested.field somevalue

Then inspect the earlier field again:

openclaw config get channels.discord.groupPolicy
# prints default or empty instead of allowlist

Expected

config set should mutate only the target path and preserve all sibling fields under the same subtree.

Actual

The deep-path write succeeds, but sibling fields may be stripped or reset. In our observed case, channels.discord.groupPolicy was lost after a deeper channels.discord.* write.

Why this matters

This is a dangerous failure mode because there is no validation error and no obvious log line. The config simply regresses. For Discord, losing groupPolicy: allowlist can silently broaden where the bot responds.

Likely cause

The CLI appears to round-trip the affected subtree through an internal typed struct that does not preserve every field in the live schema. Fields not represented in that struct are discarded on serialize.

A more robust implementation would:

  • read the raw config as JSON,
  • mutate only the requested path,
  • write the raw config back,
  • then validate the full resulting document.

Suggested fix

  • Change config set to preserve unknown/existing sibling fields on deep writes.
  • Add a regression test where a nested channels.discord.* write leaves channels.discord.groupPolicy intact.
  • Audit other config subtrees for the same round-trip-loss behavior.

Notes

Primary source doc:

  • docs/upstream-bugs/config-set-drops-siblings-on-deeper-write.md

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix config set can silently drop sibling fields on deep writes