Skip to content

[Ubuntu 26.04][Agent&Skills] Discord bridge fails to start after channels add — DISCORD_BOT_TOKEN credential placeholder not resolved in sandbox container #9869

Closed

Description

@hulynn

Description

After running nemoclaw {sandbox} channels add discord and completing the sandbox rebuild, the Discord bridge inside the sandbox fails to start on every launch. The bridge calls the OpenShell proxy to resolve openshell:resolve:env:DISCORD_BOT_TOKEN, but the proxy returns HTTP 500 "Credential placeholder could not be resolved." The bridge auto-restarts 3–6 times and then gives up with no invalid_auth from Discord.

Platform scope: Reproduced on Ubuntu 26.04 x86_64 (A100 GPU) only; other platforms not tested.
Regression: Unknown — earlier versions not tested for this specific scenario.
OpenShell issue: Partial — the credential placeholder resolution is an OpenShell proxy function, but the failure is exposed through NemoClaw channels add discord flow.

Environment

Device:        KVM VM on DGX A100, 32 vCPU / 120 GB RAM / A100-40GB GPU passthrough
OS:            Ubuntu 26.04 x86_64
Architecture:  x86_64
Node.js:       v22.23.2
npm:           10.9.8
Docker:        29.7.2
OpenShell CLI: 0.0.106
NemoClaw:      v0.0.113
OpenClaw:      2026.7.1 (2d2ddc4)

Steps to Reproduce

  1. Install NemoClaw v0.0.113 on Ubuntu 26.04 x86_64.
  2. Run: nemoclaw onboard (any sandbox; tested with Ollama provider and qwen3.6:35b)
  3. Run: nemoclaw {sandbox} channels add discord
    • Enter a valid Discord bot token (Bot User OAuth Token, Message Content Intent enabled)
    • Enter a valid Discord Server ID where the bot is a member
    • Accept default reply mode (@mentions only)
    • Accept default (no user allowlist)
  4. When prompted "Rebuild now to apply? [Y/n]", enter Y.
  5. Wait for rebuild to complete (~3–5 min).
  6. Run: nemoclaw {sandbox} logs --tail 100

Expected Result

The Discord bridge starts, establishes a stable WebSocket connection to gateway.discord.gg, and the bot becomes reachable in the configured Discord server. Logs show a stable WSS connection with no credential errors.

Actual Result

The Discord bridge fails to start. Logs show:

Discord API /users/@me/guilds failed (500):
  Credential placeholder could not be resolved.
  openshell:resolve:env:DISCORD_BOT_TOKEN

The bridge auto-restarts 3–6 times and then stops attempting. No invalid_auth (HTTP 401) from Discord is seen — the error is at the OpenShell proxy level before the request reaches Discord.

channels add discord wizard output succeeds: "Registered discord bridge with the OpenShell gateway."
policy-list shows the discord preset applied correctly (discord.com, gateway.discord.gg egress rules present).
The sandbox itself remains healthy; inference works normally. Only the Discord messaging bridge is non-functional.

Logs

nemoclaw {sandbox} logs --tail 100 output (relevant lines):

  Discord API /users/@me/guilds failed (500): Credential placeholder could not be resolved. openshell:resolve:env:DISCORD_BOT_TOKEN

Bridge restarts observed in logs (3–6 restart attempts before bridge gives up).
Policy version applied: discord egress rules present (discord.com:443, gateway.discord.gg:443, cdn.discordapp.com:443).

Note: Same credential placeholder resolution mechanism also fails for Brave Search (openshell:resolve:env:BRAVE_API_KEY returns 500). The pattern suggests the openshell env-resolve proxy does not inject channel/plugin credentials into the sandbox container environment in v0.0.113.

Activity

  1. added
    NV QA
    needs: triage
    on Aug 21, 2026
  2. added theissue type on Aug 21, 2026
  3. laitingsheng commented on Aug 21, 2026

    @laitingsheng
    Contributor

    Related upstream work: ai-openshell/openshell#2862. It fixes the OpenShell-side blast radius by withholding unbound static credentials without revoking unrelated bound credentials; NemoClaw still needs to migrate the Discord provider from profileless generic to a profile/binding-backed credential path.

  4. added
    area: sandbox
    area: security
    integration: discord
    platform: ubuntu
    and removed
    needs: triage
    on Aug 21, 2026
  5. added a commit that references this issue on Aug 24, 2026
    203a607
  6. hulynn commented on Aug 24, 2026

    @hulynn
    ContributorAuthor

    V2C Verification — v0.0.114 — STILL REPRODUCES (FAIL)

    Fix PR: #9913 "fix(messaging): bind channel credentials to endpointless profile" (merged 2026-08-24T00:06:55Z). Confirmed via GitHub compare API that the merge commit is an ancestor of the v0.0.114 tag (0 commits ahead, 14 behind — fully contained). This PR is linked as the closing PR for both #9875 and #9869 (same fix, shared root cause), so this is a joint verification comment posted to both issues.

    Environment: Ubuntu 26.04 x86_64 server, NVIDIA GPU, upgraded to NemoClaw v0.0.114 via the official installer (nemoclaw --version → nemoclaw v0.0.114).

    Repro steps taken:

    1. Onboarded a fresh OpenClaw sandbox: NEMOCLAW_PROVIDER=ollama NEMOCLAW_MODEL=llama3.1:8b nemoclaw onboard --non-interactive --yes --name v2cbridge --agent openclaw ... — completed successfully, sandbox healthy.
    2. nemoclaw v2cbridge channels add discord with a Discord bot token + server ID:
      ✓ discord — already configured
      ✓ discord — server ID already set: <redacted>
      ✓ discord reply mode defaulted: @mentions only
      ✓ Registered discord bridge with the OpenShell gateway.
      Change queued. Run 'nemoclaw v2cbridge rebuild' to apply (add 'discord').
      
    3. nemoclaw v2cbridge rebuild --yes — rebuild completed successfully, discord policy preset applied (policy version 3 loaded).

    Confirmed the fix's registration path is active:

    $ openshell provider get v2cbridge-discord-bridge -g nemoclaw
    Provider:
      Id: 6fe6b808-8fb4-47a6-8a63-d9dcb78664de
      Name: v2cbridge-discord-bridge
      Type: nemoclaw-mcp-v1
      Resource version: 1
      Credential keys: DISCORD_BOT_TOKEN
    

    Type: nemoclaw-mcp-v1 is the new endpointless-profile provider type introduced by PR #9913 (replacing the old generic type) — so credential registration is going through the fixed code path.

    But the bridge still fails to start, with the exact original failure signature:

    $ nemoclaw v2cbridge logs --tail 200 | grep -i discord
    [discord] [default] starting provider
    [discord] channel resolve failed; using config entries. Discord API /users/@me/guilds failed (500): Credential placeholder could not be resolved
    [discord] [default] channel exited: Failed to resolve Discord application id
    [discord] [default] auto-restart attempt 1/10 in 5s
    ... (repeats through attempt 6/10, backing off)
    

    OpenShell OCSF audit log for the same window:

    [sandbox] [OCSF] HTTP:GET [INFO] ALLOWED GET http://discord.com:443/api/v10/users/@me [policy:discord engine:l7]
    [sandbox] [OCSF] HTTP:UNKNOWN [MED] DENIED UNKNOWN  [policy:discord engine:credential-binding] [reason:credential_unavailable]
    [sandbox] [OCSF] HTTP:GET [INFO] ALLOWED GET http://discord.com:443/api/v10/users/@me/guilds [policy:discord engine:l7]
    [sandbox] [OCSF] HTTP:UNKNOWN [MED] DENIED UNKNOWN  [policy:discord engine:credential-binding] [reason:credential_unavailable]
    

    docker exec <container> printenv | grep DISCORD → empty, same as originally reported.

    This is the same symptom described in both bug reports: a 500 "Credential placeholder could not be resolved" at the OpenShell proxy layer, never reaching Discord's real auth check (no invalid_auth/401 from Discord).

    Verdict: FAIL — still reproduces on v0.0.114. PR #9913 does land the new nemoclaw-mcp-v1 endpointless-profile registration (confirmed above via openshell provider get), but the sandbox-side runtime placeholder resolution (the OpenShell credential-resolve proxy call that returns HTTP 500) is still broken. The registration-side of the fix appears to be in place but the resolution-side is not, or requires a newer OpenShell CLI than the 0.0.106 in this build. Discord was fully exercised end-to-end (onboard → channels add → rebuild → sandbox runtime); Slack could not be pushed through the same path because channels add slack live-validates the bot token against Slack's real API before registration and rejects a synthetic token immediately (invalid_auth), so it never reaches the sandbox-side resolution step being tested here — but since both channels share the same OpenShell credential-resolve proxy described in the bug report, the Discord failure is direct evidence the shared root cause is not resolved.

    Leaving open/close status for QA triage — recommend routing back to dev given the fix does not appear complete.

  7. added
    area: integrations
    area: messaging
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    NV QAarea: integrationsarea: messagingarea: sandboxarea: securityintegration: discordplatform: ubuntu

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions