-
-
Notifications
You must be signed in to change notification settings - Fork 69.4k
LaunchAgent plist gets redacted env vars on service install #13340
Description
Bug
When openclaw gateway install (or the macOS app) installs/reinstalls the LaunchAgent, the EnvironmentVariables in the plist contain __OPENCLAW_REDACTED__ instead of real values.
Root Cause
buildGatewayInstallPlan() in daemon-runtime-nbFDEt3d.js calls collectConfigEnvVars(params.config) where params.config is the parsed config object that has already been through redaction. The function correctly reads config.env entries, but the values are already __OPENCLAW_REDACTED__.
Impact
- The gateway process inherits redacted strings as actual env var values
memory_searchauto-detects the redacted string as an OpenAI key, tries to use it, gets 401- Any tool reading from process env (BRAVE_API_KEY, ELEVENLABS_API_KEY, OPENAI_API_KEY) fails silently
- The plist gets re-corrupted on every service install/restart
Reproduction
- Set API keys in
openclaw.jsonenvblock - Run
openclaw gateway installor restart via macOS app - Check plist:
plutil -p ~/Library/LaunchAgents/ai.openclaw.gateway.plist - Env vars show
__OPENCLAW_REDACTED__instead of real values
Suggested Fix
collectConfigEnvVars() should read from the raw/unredacted config, not the redacted parsed object. Or the install flow should read env values directly from the config file on disk.
Workaround
Run a script post-install that reads real values from openclaw.json and patches the plist.
Related Issues
#12078, #13236, #13058, #11355, #13210 (all related to /token/i regex redaction)
Environment
- OpenClaw 2026.2.9
- macOS 15.3 (arm64)
- Node v25.6.0