Repository navigation
Description
Summary
Slack messaging channel configuration can survive a sandbox rebuild while the required slack network policy preset is not present on the recreated sandbox. The result is a sandbox that appears Slack-configured (openclaw.json contains Slack account config and provider placeholders), but Slack cannot connect because egress to Slack endpoints is missing/denied.
This is distinct from the OpenShell credential-placeholder issue and from Slack authorization bugs. It is a NemoClaw lifecycle/state consistency issue: channel state and policy state can drift across rebuild/resume.
Why this matters
This blocks reproducing and validating Slack behavior such as #3729 because the test never reaches Slack event handling. Before a DM or channel @mention can test allowlist behavior, Socket Mode must connect and receive events. If Slack config exists but the Slack policy preset is absent, the user sees Slack enabled/configured but no inbound messages arrive.
Observed evidence from fresh Percy/Spark setup
Environment:
- Host: DGX Spark (
sparky) - NemoClaw: v0.0.39
- OpenShell CLI/gateway: 0.0.37
- OpenClaw in sandbox: v2026.4.24
- Sandbox:
percy - Messaging channel: Slack
- Slack app/workspace configured with Socket Mode and Event Subscriptions (
message.im,app_mention)
After a rebuild/resume, Percy was Ready and Slack config still existed inside the sandbox:
"channels": {
"defaults": {},
"slack": {
"accounts": {
"default": {
"botToken": "xoxb-OPENSHELL-RESOLVE-ENV-SLACK_BOT_TOKEN",
"enabled": true,
"appToken": "xapp-OPENSHELL-RESOLVE-ENV-SLACK_APP_TOKEN"
}
}
}
}But nemoclaw percy status listed policies without slack:
Policies: npm, pypi, huggingface, brew, brave, local-inference
Slack provider logs then showed repeated provider startup failures while attempting Socket Mode startup, e.g. HTTP 403s on Slack calls and failure to retrieve the WSS URL. Earlier in the same setup, after manually applying the Slack policy, Slack API health calls were allowed by the slack policy.
Code evidence / likely drift point
The code currently tracks messaging channels and applied policy presets separately:
src/lib/onboard/initial-policy.tsCREATE_TIME_POLICY_PRESETS_BY_CHANNELmapsslack->slack.prepareInitialSandboxCreatePolicy(basePolicyPath, activeMessagingChannels, ...)merges create-time presets only fromactiveMessagingChannels.
src/lib/onboard.ts- Computes
activeMessagingChannelsfrom token/reuse state. - Registers runtime metadata separately:
policies: initialSandboxPolicy.appliedPresetsmessagingChannels: ...
- Computes
src/lib/actions/sandbox/rebuild.ts- Rebuild backs up/deletes the sandbox, stashes messaging channels into the onboard session, then calls
onboard({ resume: true, nonInteractive: true, recreateSandbox: true }). - After onboard, it preserves
messagingChannels/disabledChannels/ credential hashes, but policy preservation depends on the create-time policy path and registry/session state being recomputed correctly.
- Rebuild backs up/deletes the sandbox, stashes messaging channels into the onboard session, then calls
The observed failure mode is that Slack channel config is regenerated/restored, but the create-time policy for Slack is not present in the live sandbox policy and the registry status no longer shows slack.
Reproduction plan for a new session
Use a real Slack app/workspace or a test Slack app with valid tokens. The bug is about policy/config drift, so inbound Slack messages are not required to prove the core issue.
-
Fresh onboard a sandbox with Slack enabled:
nemoclaw onboard # choose local or any working inference provider # select Slack messaging # provide valid SLACK_BOT_TOKEN and SLACK_APP_TOKEN
-
Confirm initial state is consistent:
nemoclaw <sandbox> status openshell policy get --full <sandbox> | grep -i slack docker exec <container> sh -lc 'grep -n "slack" -A12 -B2 /sandbox/.openclaw/openclaw.json'
Expected initial good state:
nemoclaw <sandbox> statusincludesslackin Policies.- live OpenShell policy contains Slack endpoints (
slack.com,api.slack.com,wss-primary.slack.com,wss-backup.slack.com, etc.). /sandbox/.openclaw/openclaw.jsoncontains Slack channel config.
-
Trigger rebuild lifecycle:
nemoclaw <sandbox> rebuild --yes
Alternative paths worth testing because they use rebuild/resume semantics:
nemoclaw <sandbox> channels add slacknemoclaw <sandbox> channels remove slackthen add again- interrupted rebuild followed by
nemoclaw onboard --resume
-
Re-check state:
nemoclaw <sandbox> status openshell policy get --full <sandbox> | grep -i slack docker exec <new-container> sh -lc 'grep -n "slack" -A12 -B2 /sandbox/.openclaw/openclaw.json'
-
Bug condition:
openclaw.jsonstill contains Slack channel config, butnemoclaw <sandbox> statusdoes not listslack, oropenshell policy get --full <sandbox>lacks Slack network policy entries.
Expected behavior
If Slack messaging is configured/enabled after a rebuild, the recreated sandbox must include the Slack network policy preset at creation time or reapply it immediately after creation.
The invariant should be:
Slack channel enabled/configured implies Slack egress policy present.
This should hold across:
- initial onboard
nemoclaw <sandbox> rebuildnemoclaw onboard --resumechannels add/remove/start/stopflows that rebuild the sandbox- credential rotation rebuilds
Acceptance criteria / done definition
- Add regression coverage for the rebuild path showing that a sandbox with
messagingChannels: ["slack"]is recreated with theslackpolicy preset. - After
nemoclaw <sandbox> rebuild --yes, both are true:- Slack channel config remains present in
/sandbox/.openclaw/openclaw.json. - live OpenShell policy contains the
slacknetwork policy entries.
- Slack channel config remains present in
nemoclaw <sandbox> statusreportsslackin Policies when Slack messaging is configured.- No manual
nemoclaw <sandbox> policy-add slackis required after rebuild. - Existing channel stop/remove semantics remain intact: if Slack is intentionally removed/stopped, the policy should not be silently re-granted unless the configured active channel state requires it.
Related but distinct issues
- [macOS][Agent&Skills] Slack channel @mention not covered by DM allowFrom; no allowlist path #3729: Slack channel
@mentionauthorization/allowlist behavior. This policy drift blocks reaching that behavior. - [Bug] [Slack] Slack Websocket in Nemoclaw Onboard failure #2031: Slack Socket Mode / WebSocket startup auth failures.
- [All platforms] Slack channel silently skipped — SDK rejects placeholder token before any HTTP request #1569 and Credential placeholder model breaks SDKs that validate token format before making network calls ai-openshell/openshell#894: OpenShell placeholder credential model vs SDK in-process token validation. That is a credential architecture issue, not the policy/config drift described here.
Activity
qconsultai commentedon May 19, 2026
Hit a related/broader form of this on a fresh
onboard(not rebuild) on v2026.4.24 / NemoClaw 0.0.45.Setup: DigitalOcean droplet (4 vCPU, 7.8 GiB), Docker 29.3.0, fresh sandbox via
nemoclaw onboardafter adestroy. Selectedslackas a messaging channel during onboard, applied Balanced tier policies (npm,pypi,huggingface,brew,brave), and added the slack policy preset vianemoclaw <sandbox> policy-add slack.Symptom: All HTTPS
CONNECTthrough the in-sandbox proxy at10.200.0.1:3128returns403 policy_denied, not just slack. Tested:https://slack.com/api/auth.test→ 403{"detail":"CONNECT slack.com:443 not permitted by policy","error":"policy_denied"}https://pypi.org/simple/→ 403{"detail":"CONNECT pypi.org:443 not permitted by policy","error":"policy_denied"}https://huggingface.co/→ also 403Only
inference.local:443appears in the liveNET:OPEN ALLOWEDlist per OCSF logs.NemoClaw control plane disagrees with runtime:
nemoclaw <sandbox> policy-listshows● slack(and other presets) — policy version 8 activenemoclaw <sandbox> statusreturnsunknown command(separate but possibly related)Landlock ruleset built [rules_applied:11 skipped:1]— exactly 1 rule consistently skippednemoclaw <sandbox> doctorreports:[fail] Docker container: openshell-cluster-nemoclaw not found or not inspectable[warn] Shields: down (NOT CONFIGURED, mutable state)This suggests the policy drift in #3753 isn't only triggered by
rebuild— it can also happen ondestroy→onboard, and affects all preset domains, not just slack. The control plane reports policies as applied while the runtime ruleset omits them.fix(onboard): preserve slack messaging policy (#3862)