Skip to content

[Ubuntu 22.04][Agent&Skills] Hermes agent inference returns HTTP 401 after Discord enrollment rebuild #13633

Closed

Description

@mercl-lau

Description

On NemoClaw v0.0.137 a Hermes sandbox that answers inference normally right after onboarding stops authenticating to NVIDIA Endpoints once Discord is enrolled with "channels add discord" and the sandbox is rebuilt: a one-shot agent turn run inside the sandbox fails with HTTP 401 "Invalid JWT serialization: Missing dot delimiter(s)", which is the endpoint rejecting a bearer value that is not a real key (the sandbox credential placeholder is sent raw). The same one-shot turn succeeded on the same sandbox before the enrollment rebuild, and the product's own "nemoclaw {sandbox} status" still reports inference healthy afterwards, so the user has no indication that agent turns are broken. Inbound Discord messages that reach the agent fail the same way inside the gateway (the Discord bridge starts the agent turn and logs the identical 401 from agent.chat_completion_helpers), so the Hermes Discord channel cannot produce a reply.

Platform scope: Reproduced on Ubuntu 22.04 x86_64 (three runs) and observed on Jetson Thor (aarch64, one run, gateway-side 401 on the Discord reply); other platforms not tested.
Regression: Unknown - earlier releases not tested with this sequence.
OpenShell issue: No - the sandbox credential placeholder is resolved by the NemoClaw-managed Hermes startup; after the channel rebuild the placeholder reaches the endpoint unresolved.

Related Bugs / not duplicate of

GitHub #13624: OpenClaw Discord bridge never reaches READY on the same release; different runtime and a connectivity symptom, not a credential one.
GitHub #9875 / #10079 (closed): messaging bridge credentials not injected into the sandbox after channels add; those concern the channel's own token, this report concerns the inference credential of the agent after the channel rebuild.

Environment

Device:        Ubuntu 22.04 x86_64 host (CPU sandbox); also Jetson Thor (aarch64)
OS:            Ubuntu 22.04
Architecture:  x86_64 (also aarch64)
Node.js:       v22.23.x
npm:           10.9.x
Docker:        Docker Engine 29.4.0
OpenShell CLI: openshell 0.0.116
NemoClaw:      v0.0.137 (pinned release install)
OpenClaw:      N/A (Hermes Agent v0.21.3 managed image)
Inference:     NVIDIA Endpoints, nvidia/nemotron-3.5-super-vl-120b-a12b (provider nvidia-prod)

Steps to Reproduce

1. Onboard a Hermes sandbox non-interactively with the default NVIDIA endpoint (policies skipped):
   nemoclaw onboard --agent hermes --non-interactive (sandbox {sandbox})

2. Run a one-shot agent turn inside the sandbox:
   nemoclaw {sandbox} exec -- hermes -z "Reply with exactly: PROBE_OK"

3. Enroll Discord and rebuild:
   NEMOCLAW_NON_INTERACTIVE=1 DISCORD_BOT_TOKEN={token} DISCORD_SERVER_ID={guild} DISCORD_REQUIRE_MENTION=1 DISCORD_USER_ID={user ids} nemoclaw {sandbox} channels add discord
   nemoclaw {sandbox} rebuild --yes

4. Repeat step 2.

5. nemoclaw {sandbox} status --json  (read inferenceHealth)

6. From Discord, @mention the bot in a guild channel; read nemoclaw {sandbox} logs.

Expected Result

Step 4 returns PROBE_OK exactly like step 2; step 6 produces a reply in the channel. If the rebuild cannot restore the agent's inference credential, step 5 should report inference unhealthy and the rebuild should warn.

Actual Result

Step 2: PROBE_OK (exit 0).
Step 4: exit non-zero with
  HTTP 401: {"status":401,"title":"Unauthorized","detail":"Invalid JWT serialization: Missing dot delimiter(s)"}
Step 5: inferenceHealth.ok = true, phase Ready (no indication of the problem).
Step 6: no reply; gateway log:
  [gateway] ERROR agent.chat_completion_helpers: Streaming failed before delivery: Error code: 401 - {'status': 401, 'title': 'Unauthorized', 'detail': 'Invalid JWT serialization: Missing dot delimiter(s)'}
  [gateway] WARNING agent.conversation_loop: API call failed (attempt 1/3) error_type=AuthenticationError provider=custom base_url=https://integrate.api.nvidia.com/v1 model=nvidia/nemotron-3.5-super-vl-120b-a12b
  [gateway] Non-retryable error (HTTP 401)

Logs

Sequence from one run (Ubuntu 22.04, 2026-10-22):
  inference probe after onboard, before Discord enrollment: ok
  nemoclaw {sandbox} channels add discord ... exit 0
  nemoclaw {sandbox} rebuild --yes ... "Hermes gateway restarted and verified after state restore" ... "rebuild completed"
  inference probe after Discord enrollment rebuild: HTTP 401 Invalid JWT serialization: Missing dot delimiter(s)
Gateway-side, after a Discord @mention on another run of the same sequence:
  [gateway] 2026-10-22 09:24:01,871 ERROR agent.chat_completion_helpers: Streaming failed before delivery: Error code: 401 - {'status': 401, 'title': 'Unauthorized', 'detail': 'Invalid JWT serialization: Missing dot delimiter(s)'}
  [gateway] 2026-10-22 09:24:01,907 WARNING agent.conversation_loop: API call failed (attempt 1/3) error_type=AuthenticationError provider=custom base_url=https://integrate.api.nvidia.com/v1 model=nvidia/nemotron-3.5-super-vl-120b-a12b
  [gateway] 2026-10-22 09:24:01,937 ERROR agent.conversation_loop: Non-retryable client error: Error code: 401

Activity

  1. added
    NV QA
    needs: triage
    QA Test Blocker
    on Oct 22, 2026
  2. added theissue type on Oct 22, 2026
  3. roma5087 commented on Oct 22, 2026

    @roma5087

    Can this be assigned to me? I'd test:

    1. Whether a plain rebuild (no Discord) also breaks, to see if Discord is the trigger.
    2. What key Hermes has in its config before and after the rebuild.
    3. Whether the restored .env file is overriding the sandbox's key.

    Then I'd fix whichever one is the cause, and add a status check that tests the key Hermes actually uses.

  4. added
    area: providers
    area: security
    integration: discord
    integration: hermes
    provider: nvidia
    and removed
    needs: triage
    on Oct 22, 2026
  5. added a commit that references this issue on Oct 25, 2026
    bbdd0bc
  6. haoyingw commented on Oct 29, 2026

    @haoyingw

    QA verification on v0.0.139 (Ubuntu 24.04 x86_64, fresh non-root account, hosted installer with NEMOCLAW_INSTALL_TAG=v0.0.139): the symptom in this issue still reproduces after the fix in #13651, so this looks like it needs to be reopened.

    Sequence (non-interactive, NVIDIA Endpoints, default model):

    1. nemoclaw onboard --agent hermes --non-interactive --yes --name <sandbox> → exit 0, "Hermes is ready".
    2. nemoclaw <sandbox> exec -- hermes -z 'Reply with exactly: PROBE_OK' → PROBE_OK.
    3. nemoclaw <sandbox> channels add discord (non-interactive, DISCORD_REQUIRE_MENTION=1) → "Registered discord bridge".
    4. nemoclaw <sandbox> rebuild --yes → exit 1 with a warning (same result on a second attempt).
    5. The same probe as step 2 → HTTP 401 Invalid JWT serialization.
    6. nemoclaw <sandbox> status --json → exit 1, inference reported unhealthy.
    7. An @mention of the bot in the enrolled Discord channel received no reply.

    Compared with the original report, the rebuild now exits non-zero and status reports the unhealthy inference instead of staying silent, but the agent turn is still broken after Discord enrollment + rebuild. Happy to share the full command log if useful.

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 QAQA Test Blockerarea: providersarea: securityintegration: discordintegration: hermesprovider: nvidia

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions