Skip to content

[Bug]: macOS app overwrites gateway config, replacing real values with __OPENCLAW_REDACTED__ #11355

@knoxxer

Description

@knoxxer

[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

  1. Have a working gateway config with valid values
  2. Install and launch OpenClaw macOS app (2026.2.6)
  3. App connects to the local gateway in local mode
  4. Config values start being replaced with __OPENCLAW_REDACTED__
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions