Skip to content

[Bug]: Discord channel-info fails for SecretRef-backed named account while send works #84530

@funmerlin

Description

@funmerlin

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Discord message tool lookup/admin actions such as channel-info fail for a SecretRef-backed named Discord account, while normal Discord send and inbound delivery still work in the same running gateway.

Steps to reproduce

  1. Configure a Discord account token through an env SecretRef in openclaw.json.
  2. Start OpenClaw and confirm Discord inbound delivery works.
  3. Confirm message with action=send works when targeting a channel explicitly.
  4. Call message with action=channel-info for an existing Discord channel using the same named account.
  5. Observe the action fail before returning channel metadata.

Expected behavior

channel-info should use the same resolved runtime account/token state that working Discord sends use, or otherwise resolve the named account SecretRef through the active runtime snapshot before constructing the Discord REST client.

Actual behavior

message with action=channel-info fails with:

Discord bot token configured for account "drclaw" is unavailable; resolve SecretRefs against the active runtime snapshot before using this account.

In the same running gateway, Discord inbound delivery works and message with action=send succeeds when given an explicit target.

OpenClaw version

2026.5.19, local commit 60affde00ac

Operating system

macOS 15.7.7

Install method

Local OpenClaw gateway install

Model

NOT_ENOUGH_INFO

Provider / routing chain

NOT_ENOUGH_INFO

Additional provider/model setup details

The failure is observed in Discord message action handling before the agent/model behavior matters.

Logs, screenshots, and evidence

Observed failing action:
- message action: channel-info
- account: named Discord account configured with an env SecretRef token
- result: Discord bot token configured for account "drclaw" is unavailable; resolve SecretRefs against the active runtime snapshot before using this account.

Observed working behavior in the same runtime:
- inbound Discord messages reach the agent
- message action=send succeeds when an explicit Discord target is provided
- affected channel entries were hot-reloaded by the gateway before the failing channel-info call

Impact and severity

Affected: Discord users/accounts using SecretRef-backed named accounts and lookup/admin-style message actions.

Severity: High for operations workflows that need channel lookup/admin actions; ordinary sends can still work.

Frequency: Reproduced on the observed channel-info attempt; broader action coverage is NOT_ENOUGH_INFO.

Consequence: Agents cannot reliably inspect Discord channel/account metadata through the message tool even though the same runtime can receive and send Discord messages.

Additional information

This appears related to the same SecretRef resolution family as several previous issues and PRs, but the observed failure is narrower than startup failures and narrower than ordinary send:

The behavior suggests at least one Discord REST-backed message action path is still constructing its client from unresolved account config instead of using the active resolved runtime snapshot or the already-resolved gateway request context.

No token values, channel IDs, or private config contents are included in this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions