openclaw - 💡(How to fix) Fix [Bug]: Gateway restart leaves stale exec config — onRestart passes activate:false to activateRuntimeSecrets [2 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#57896Fetched 2026-04-08 01:56:23
View on GitHub
Comments
2
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
commented ×2cross-referenced ×1
RAW_BUFFERClick to expand / collapse

Description: Full gateway restart does not refresh the runtimeConfigSnapshot. The onRestart handler passes activate: false to activateRuntimeSecrets, meaning exec config (safeBins, allowlist, etc.) loaded at startup is stale after a restart. Discord session lanes hold the stale config.

Impact:

  • After a gateway restart, any exec allowlist/security changes made to openclaw.json are not picked up by existing Discord session lanes
  • Sessions continue running with pre-restart exec configuration
  • Forces manual session termination or additional restart to pick up config changes

Expected behavior: Gateway restart should load and apply the current openclaw.json exec configuration, not carry forward a cached/snapshot version.

References:

  • FR-20260329-002 (internal tracking)
  • Related: #56597 (Discord sessions persist per-session exec directives)

extent analysis

Fix Plan

To address the issue, we need to update the onRestart handler to pass activate: true to activateRuntimeSecrets. This ensures that the latest openclaw.json configuration is loaded and applied after a gateway restart.

Code Changes

// Update onRestart handler to pass activate: true
onRestart: async () => {
  // ...
  await activateRuntimeSecrets({ activate: true });
  // ...
}

Additionally, we should verify that the activateRuntimeSecrets function is correctly loading the latest configuration from openclaw.json.

Verification

To verify the fix, restart the gateway and check that the latest openclaw.json configuration is applied to existing Discord session lanes. You can do this by:

  • Checking the gateway logs for any errors or warnings related to configuration loading
  • Verifying that the expected configuration changes are applied to the session lanes
  • Testing the execution of allowlisted commands to ensure they are executed correctly

Extra Tips

  • Make sure to update the internal tracking issue (FR-20260329-002) with the fix details
  • Consider adding automated tests to ensure that the onRestart handler is correctly loading the latest configuration
  • Review related issues (e.g. #56597) to ensure that this fix does not introduce any regressions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Gateway restart leaves stale exec config — onRestart passes activate:false to activateRuntimeSecrets [2 comments, 1 participants]