Reuse-onboard silently removes an active Discord channel's network egress policy, no warning
Description
Re-running onboard on an existing sandbox that already has a working Discord channel (the documented reuse path, no --fresh/--recreate-sandbox) silently narrows the sandbox's network egress and removes the Discord policy preset - even when nothing about the request asked for Discord to be disabled. The Discord credential registration itself is left intact (server ID and reply mode still show as configured), but the egress policy the channel needs to actually reach Discord's API and gateway is gone, so the previously-working bridge breaks with no warning at all.
Platform scope: Reproduced on Ubuntu 24.04 only; other platforms not tested. Regression: Unknown - not tested against a prior version.
Environment
Device: Linux x86_64 server, A100-SXM4-40GB
OS: Ubuntu 24.04.4 LTS
Architecture: x86_64
Node.js: v22.23.2
npm: 10.9.2
Docker: 29.5.2
OpenShell CLI: 0.0.106
NemoClaw: v0.0.116
OpenClaw: N/A (Hermes sandbox)
Hermes Agent: v0.19.0
Steps to Reproduce
- Onboard with Discord configured:
Provider: Local Ollama, any small model. Messaging channels: toggle Discord ON, enter a valid bot token and server ID via the interactive prompts, accept default mention-only reply mode. Accept default policy presets (Discord preset checked). Onboard exits 0, sandbox reaches Ready, Discord bridge connects successfully.nemoclaw onboard --name {sandbox} --agent hermes --yes-i-accept-third-party-software - Confirm Discord is live:
nemoclaw {sandbox} channels status --channel discord nemoclaw {sandbox} status nemoclaw {sandbox} logs - Re-run onboard on the SAME sandbox, reuse path (no
--fresh, no--recreate-sandbox), from a shell that does not have the Discord token/server ID set as real environment variables (only the prior interactive answers supplied them - the ordinary, documented path):nemoclaw onboard --name {sandbox} --agent hermes --yes-i-accept-third-party-software - At the policy presets confirmation screen, accept the default (press Enter).
- Check the result:
nemoclaw {sandbox} channels status --channel discord nemoclaw {sandbox} status nemoclaw {sandbox} logs
Expected Result
Reuse-onboard exits 0 and does not replace the managed agent identity, and Discord remains configured and active - the same live bridge that was working before the reuse-onboard keeps working afterward.
Actual Result
The reuse-onboard pass never shows the interactive messaging-channels selection screen at all. Right after inference-route confirmation it prints a message about disabling Discord's network egress because no host inputs configure it, then at the policy presets confirmation screen the Discord preset now shows as unchecked (it was checked before), and confirming narrows the sandbox's egress, removing Discord's endpoints and reporting the preset removed. Onboard exits 0.
Afterward, channels status shows the credential is still registered (server ID and mention mode still set) but flags the policy coverage as not applied, with a hint to manually add the policy back. The sandbox's policy list no longer includes Discord at all. Live logs show the Discord plugin repeatedly being denied outbound access to Discord's API and gateway hosts by policy, retrying every 15-30 seconds with no recovery.
Logs
No host inputs configure discord; disabling the channel and its network egress.
...
Narrowing sandbox egress - removing: discord.com, gateway.discord.gg, *.discord.gg, cdn.discordapp.com
Policy version submitted and loaded (new active version)
Removed preset: discord
...
NET:OPEN [MED] DENIED ...(1168) reaching gateway-us-east1-c.discord.gg:443 [reason:endpoint gateway-us-east1-c.discord.gg:443 is not allowed by any policy]
NET:OPEN [MED] DENIED ...(1168) reaching discord.com:443 [reason:endpoint discord.com:443 is not allowed by any policy]
(repeats every 15-30s as the Discord plugin keeps retrying)
Related Bugs / not duplicate of
- #10660 — Google Chat channel restart credential-binding bug (this same session): that one is triggered by an explicit channel stop/start cycle and loses only the credential's environment binding while the network policy stays applied; this one is triggered by a plain onboard reuse and loses the network policy itself while the credential registration stays intact. Noting the similarity in case a shared root cause turns up later.
- #9283 (closed) — the inverse symptom: a channel preset is incorrectly retained after the channel is removed. Not a duplicate.
The reproduction contains the shape of this one, and it may generalise beyond Discord.
The first onboard establishes the Discord facts interactively. The reuse run is started from a shell where the token and server ID are not environment variables, so that run has strictly fewer facts available than the run that created the policy. The egress policy is then recomputed from the smaller fact set, and "no Discord fact present" is treated as "Discord not wanted" rather than "Discord not asked about on this pass".
Those are different states and they want different behaviour:
- not wanted — the operator said no. Narrowing egress is correct.
- not stated — nobody asked, or the answer lived in the previous run's interactive input. Narrowing egress is a silent subtraction of a control something still depends on.
If that is what is happening, the same path would remove any preset whose facts came from interactive input rather than the environment, with Discord just being the one exercised here. Slack and Teams presets would be worth checking on the same reuse path.
Two things that might help independently of the root cause:
1. A cheap end-of-onboard consistency check. After onboard completes, a channel registered as configured while the egress policy does not permit its endpoints is an inconsistent state, whatever produced it. That is checkable in one pass over the final config and would have turned this silent breakage into a non-zero exit and a named reason, without needing to find the cause first.
2. Never subtract a live control silently. Where a reuse pass would remove a preset that is currently active, either require an explicit flag or print what is being removed and why. A control that disappears without a line in the output is indistinguishable from one that was never there — which is the part that makes this expensive to diagnose rather than merely wrong.
Happy to be wrong about the mechanism; the reproduction is clear enough that the "fewer facts on the second pass" reading is easy to test by exporting the token in the environment before the reuse run and seeing whether the policy survives.
Closing at maintainer request based on the supplied manual retest. The reported Discord policy-removal symptom did not reproduce in the tested OpenClaw and Hermes runs.
Evidence:
- OpenClaw non-interactive reuse completed successfully. Channel status before and after showed Discord registered and its policy preset applied; the host bot token was empty or unset.
- OpenClaw interactive reuse explicitly removed
DISCORD_BOT_TOKEN,DISCORD_SERVER_ID, andDISCORD_SERVER_IDSfrom the command environment. The same sandbox was reused, Discord remained checked in the default policy selection, onboarding completed, and subsequent channel status still showed registration and policy coverage. - Hermes was tested on PR #11427. After successful setup with Discord configured, interactive onboarding was rerun on the same sandbox with those three environment variables explicitly removed. The run selected sandbox reuse, passed the Hermes gateway and dashboard steps, kept Discord checked, and completed deployment verification.
- The Hermes setup output identified the requested managed-image catalog as
v0.0.117-322-gc7a30239c9. Docker server was29.6.1; OpenShell was0.0.106. The OpenClaw runs reported version2026.7.1.
This closure records acceptance of the manual policy-preservation evidence. It does not claim a separate Discord message-delivery test or a successful --resume test.
The Hermes dashboard/API forward work remains tracked by #11425 and #11427. Both #11427 and the separate messaging-preservation PR #10782 are still open at the time of closure; this comment does not claim either change has shipped.
Only a redacted evidence summary is included. Credentials from the supplied command are omitted.