Bug type
Regression (worked before, now fails)
Summary
The exec tool does not properly inherit environment variables set in the launchd plist. Even after a full system reboot, exec commands receive stale/old environment variables instead of the current gateway process environment.
Steps to reproduce
- Add a new environment variable (e.g., OP_SERVICE_ACCOUNT_TOKEN) to the launchd plist
- Reload the service: launchctl bootout / launchctl bootstrap
- Verify launchd has the correct environment: launchctl print gui/$(id -u)/ai.openclaw.gateway
- Use the exec tool to check the environment variable
Expected behavior
The exec tool should see the same environment variables that launchd loaded into the gateway process.
Actual behavior
The exec tool sees an old/stale environment variable value, even though launchctl print shows the correct value.
OpenClaw version
2026.3.7
Operating system
macOS 26.3 (arm64)
Install method
v22.22.0, LaunchAgent (launchd)
Logs, screenshots, and evidence
My exec env token hash: d5a7584a5b771db0
Launchd token hash: e4707cd640c7f60b (correct)
Zshrc token hash: e4707cd640c7f60b (correct)
Workaround
source ~/.zshrc && <command>
Impact and severity
1Password CLI integration fails. Any tool relying on plist environment variables will fail.
Additional information
No response
Bug type
Regression (worked before, now fails)
Summary
The exec tool does not properly inherit environment variables set in the launchd plist. Even after a full system reboot, exec commands receive stale/old environment variables instead of the current gateway process environment.
Steps to reproduce
Expected behavior
The exec tool should see the same environment variables that launchd loaded into the gateway process.
Actual behavior
The exec tool sees an old/stale environment variable value, even though launchctl print shows the correct value.
OpenClaw version
2026.3.7
Operating system
macOS 26.3 (arm64)
Install method
v22.22.0, LaunchAgent (launchd)
Logs, screenshots, and evidence
Impact and severity
1Password CLI integration fails. Any tool relying on plist environment variables will fail.
Additional information
No response