[Bug]: macOS app overwrites gateway config, replacing real values with __OPENCLAW_REDACTED__
Summary
The macOS app (2026.2.6, build 9039) progressively corrupts the gateway config JSON by replacing real values with the literal string __OPENCLAW_REDACTED__. This causes the gateway to fail on restart because it can't parse __OPENCLAW_REDACTED__ as valid values (e.g., numbers for MaxTokens/ContextTokens).
Steps to reproduce
- Have a working gateway config with valid values
- Install and launch OpenClaw macOS app (2026.2.6)
- App connects to the local gateway in local mode
- Config values start being replaced with
__OPENCLAW_REDACTED__
- Gateway fails to restart
Expected behavior
The macOS app should never write redacted placeholder values back to the config file. __OPENCLAW_REDACTED__ is a display-only marker from gateway config.get and should never be persisted.
Actual behavior
- Initially noticed
MaxTokens and ContextTokens replaced with __OPENCLAW_REDACTED__
- Over time, additional config fields were also being replaced with
__OPENCLAW_REDACTED__
- The corruption is progressive — more fields get redacted the longer the app runs
- Gateway cannot restart until the corrupted values are manually removed or the config is reverted from backup
Workaround
- Revert to a backup copy of the gateway config JSON
- Or manually remove/fix the lines containing
__OPENCLAW_REDACTED__
- Uninstall/quit the macOS app to prevent further corruption
Root cause (suspected)
The macOS app appears to be reading the config via config.get (which redacts sensitive values for security), then writing that redacted output back to the actual config file. This creates a destructive read-modify-write cycle where real values are permanently replaced with redaction placeholders.
Environment
- OpenClaw version: 2026.2.6-3
- macOS app: 2026.2.6 (build 9039)
- OS: macOS (Darwin 25.2.0, arm64) — Mac mini M4
- Node.js: v22.22.0
- Mode: local
[Bug]: macOS app overwrites gateway config, replacing real values with
__OPENCLAW_REDACTED__Summary
The macOS app (2026.2.6, build 9039) progressively corrupts the gateway config JSON by replacing real values with the literal string
__OPENCLAW_REDACTED__. This causes the gateway to fail on restart because it can't parse__OPENCLAW_REDACTED__as valid values (e.g., numbers for MaxTokens/ContextTokens).Steps to reproduce
__OPENCLAW_REDACTED__Expected behavior
The macOS app should never write redacted placeholder values back to the config file.
__OPENCLAW_REDACTED__is a display-only marker fromgateway config.getand should never be persisted.Actual behavior
MaxTokensandContextTokensreplaced with__OPENCLAW_REDACTED____OPENCLAW_REDACTED__Workaround
__OPENCLAW_REDACTED__Root cause (suspected)
The macOS app appears to be reading the config via
config.get(which redacts sensitive values for security), then writing that redacted output back to the actual config file. This creates a destructive read-modify-write cycle where real values are permanently replaced with redaction placeholders.Environment