Summary
Messaging integrations (Discord, Slack, Telegram) should all follow the Telegram bridge pattern: run on the host, relay messages to the sandbox via OpenShell SSH. Credentials never enter the sandbox.
Current state
| Integration |
Where it runs |
Token location |
Problems |
| Telegram |
Host (bridge script) |
Host only |
None — this is the target pattern |
| Discord |
Sandbox (OpenClaw plugin) |
Passed as sandbox env var |
Immutable config issues (#599, #606), can't update without recreate |
| Slack |
Sandbox (OpenClaw plugin) |
Passed as sandbox env var |
Same as Discord |
Target state
All messaging integrations run as host-side bridges:
- Bridge process runs on the host with access to
~/.nemoclaw/credentials.json
- Connects to the messaging API directly (tokens never enter sandbox)
- Relays messages to the sandbox agent via OpenShell SSH
- Credentials can be changed anytime by restarting the bridge
This eliminates the entire class of problems around:
Existing work
Proposed approach
- Generalize
telegram-bridge.js into a reusable bridge framework
- Add Discord bridge using the same pattern
- Add Slack bridge using the same pattern
- Remove Discord/Slack token passthrough from sandbox creation (no longer needed)
- Remove
configWrites: False from Dockerfile (no longer needed)
- Update
start-services.sh to manage all bridges
- Document host-side bridge as the canonical pattern for messaging integrations
Context
The current env-var-into-sandbox approach (#601, #616) was a narrow fix. This issue reframes the architecture to match what Telegram already does successfully.
Summary
Messaging integrations (Discord, Slack, Telegram) should all follow the Telegram bridge pattern: run on the host, relay messages to the sandbox via OpenShell SSH. Credentials never enter the sandbox.
Current state
Target state
All messaging integrations run as host-side bridges:
~/.nemoclaw/credentials.jsonThis eliminates the entire class of problems around:
configWrites: FalseworkaroundExisting work
scripts/telegram-bridge.js— proven host-side bridge patternProposed approach
telegram-bridge.jsinto a reusable bridge frameworkconfigWrites: Falsefrom Dockerfile (no longer needed)start-services.shto manage all bridgesContext
The current env-var-into-sandbox approach (#601, #616) was a narrow fix. This issue reframes the architecture to match what Telegram already does successfully.