-
-
Notifications
You must be signed in to change notification settings - Fork 82.1k
macOS update/reinstall can overwrite generated gateway env wrapper and make status misleading for secret-provider setups #90518
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Activity
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
After updating OpenClaw to
2026.6.1on macOS, a LaunchAgent-managed gateway using a secret-provider-backed environment broke because the generated gateway env wrapper was regenerated during reinstall/repair.This is not a request to add Infisical-specific support. OpenClaw already has the right first-class mechanism via:
openclaw gateway install --wrapper <path>OPENCLAW_WRAPPERThe issue is that update/install/doctor/status flows do not make it obvious when a user has modified a generated wrapper, or when CLI diagnostics are running outside the same secret-provider context as the installed gateway service.
Environment
2026.6.1 (2e08f0f)127.0.0.1:18789What Happened
After running the update/reinstall flow,
openclaw gateway install --forceregenerated:back to the plain generated wrapper behavior:
That overwrote local wrapper behavior that had been calling a stable secret-provider executor:
As a result:
openclaw statusprinted many missing env-var warnings even though secrets had been migrated to the secret provider./opt/homebrew/bin/openclawinvoked Node directly, soopenclaw statusbypassed the same secret-provider context used by the LaunchAgent service.Why This Was Confusing
Generated
*-env-wrapper.shfiles appear to be overwritten by design, which is reasonable.However, it is easy for operators to miss that modifying the generated wrapper is fragile. After reinstall/repair, the service and CLI can also disagree:
openclaw statusthen reports missing env vars even when the intended service path has been repaired or is otherwise configured differently.Requested Behavior
Consider one or more of the following:
During
gateway install --force, update, or doctor repair, detect when the generated env wrapper contains non-generated custom behavior and warn before overwriting it.If overwriting is intentional, explicitly recommend moving custom behavior to a stable wrapper passed through:
or:
Make
openclaw statusdiagnostics clearer when required secrets may be available only through the installed gateway/service wrapper, but not through the current interactive CLI process.Have doctor surface a warning when the CLI/status environment differs materially from the installed service wrapper environment.
Related Auth Profile Migration Issue
During the same update, agent runs also hit Codex app-server auth-profile validation failures around legacy profile IDs matching:
while validation expected canonical IDs like:
This may be a separate migration-timing issue, but it appeared during the same update/repair window. It may be useful for doctor to flag legacy
openai-codex:*auth-profile IDs before app-server validation rejects them, or to make that migration timing clearer.Local Repair / Validation
After repair, the local setup was changed to:
Validation after repair:
127.0.0.1:18789openclaw --versionreturns2026.6.1 (2e08f0f)openclaw status --timeout 15000no longer reports missing env-var diagnosticsopenclaw status --deep --timeout 30000reports Discord, iMessage, Slack, and Telegram OK