-
-
Notifications
You must be signed in to change notification settings - Fork 40k
Description
Bug: Studio GUI overwrites openclaw.json with __OPENCLAW_REDACTED__ placeholders, breaking gateway
Description
Opening OpenClaw Studio causes it to read ~/.openclaw/openclaw.json, redact sensitive fields for display, and then write the redacted values back to disk. This corrupts the config file and prevents the gateway from starting.
Affected fields
All sensitive fields are replaced with the string "__OPENCLAW_REDACTED__":
| Field path | Original type | After Studio overwrite |
|---|---|---|
models.providers.minimax.apiKey |
string (API key) | "__OPENCLAW_REDACTED__" |
models.providers.moonshot.apiKey |
string (API key) | "__OPENCLAW_REDACTED__" |
models.providers.minimax.models.0.maxTokens |
number (8192) |
"__OPENCLAW_REDACTED__" (string!) |
models.providers.moonshot.models.0.maxTokens |
number (8192) |
"__OPENCLAW_REDACTED__" (string!) |
channels.telegram.botToken |
string (bot token) | "__OPENCLAW_REDACTED__" |
channels.feishu.appSecret |
string | "__OPENCLAW_REDACTED__" |
channels.feishu.accounts.main.appSecret |
string | "__OPENCLAW_REDACTED__" |
agents.defaults.memorySearch.remote.apiKey |
string (API key) | "__OPENCLAW_REDACTED__" |
skills.entries.nano-banana-pro.apiKey |
string (API key) | "__OPENCLAW_REDACTED__" |
tools.web.search.apiKey |
string (API key) | "__OPENCLAW_REDACTED__" |
Impact
-
Gateway fails to start — config validation rejects
maxTokensas string instead of number:Config validation failed: - models.providers.minimax.models.0.maxTokens: Invalid input: expected number, received string - models.providers.moonshot.models.0.maxTokens: Invalid input: expected number, received string -
Telegram channel dead —
getMereturns 404 because botToken is a placeholder string -
Feishu channel dead —
failed to obtain tokenbecause appSecret is a placeholder -
All model providers broken — API keys are placeholder strings
Steps to Reproduce
- Have a working OpenClaw CLI setup with configured API keys, bot tokens, etc.
- Open OpenClaw Studio GUI
- Close Studio (or just let it run)
- Check
~/.openclaw/openclaw.json— all sensitive values are now"__OPENCLAW_REDACTED__" - Gateway crashes on next restart with config validation errors
Expected Behavior
Studio should redact values only in memory/UI display. When writing config back to disk, it must preserve the original values. Alternatively, Studio should not write to openclaw.json at all if it cannot preserve sensitive field values.
Additional Notes
- The redaction logic doesn't distinguish between data types — it replaces numeric
maxTokens: 8192with string"__OPENCLAW_REDACTED__", causing a type mismatch that fails schema validation. - Workaround: restore from backup files (
openclaw.json.bak.*) and avoid using Studio GUI.
Environment
- OpenClaw CLI: v2026.2.9
- OpenClaw Studio: latest (uninstalled after discovering this bug)
- OS: macOS (Apple Silicon)
- Node: v22.22.0