#Error: channels.discord.token: unresolved SecretRef

1 messages ยท Page 1 of 1 (latest)

raw raven
#

Background Info

  • OpenClaw in Ubuntu VM
  • configured a Discord bot as channel
  • running the default main agent
  • used SecretRef to keep all the API keys and tokens stored in a JSON file outside the OpenClaw directory

Issue
As I want to create another agent with another Discord bot, I modified the "id" of the original running Discord bot in both secrets.json and openclaw.json.
The bot is still running and responding to my message. However, the CLI shows error message when I try to use doctor, update, add agents.

Command: openclaw doctor
Output:

๐Ÿฆž OpenClaw 2026.3.13 (61d171a) โ€” Somewhere between 'hello world' and 'oh god what have I built.'

โ—‡  Gateway auth โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                        โ”‚
โ”‚  Gateway token is managed via SecretRef and is currently unavailable.  โ”‚
โ”‚  Doctor will not overwrite gateway.auth.token with a plaintext value.  โ”‚
โ”‚  Resolve/rotate the external secret source, then rerun doctor.         โ”‚
โ”‚                                                                        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Error: channels.discord.token: unresolved SecretRef "file:default:/channels/discord/RayClaw/botToken". Resolve this command against an active gateway runtime snapshot before reading it.

Command: openclaw agents add
Output:

Error: channels.discord.token: unresolved SecretRef "file:default:/channels/discord/RayClaw/botToken". Resolve this command against an active gateway runtime snapshot before reading it.

Command: openclaw secrets audit
Output:

Secrets audit: clean. plaintext=0, unresolved=0, shadowed=0, legacy=0.
brisk cloakBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> โœ… Mark Solution

raw raven
#

Snippet of openclaw.json :

{
  "secrets": {
    "providers": {
      "default": {
        "source": "file",
        "path": "/xxx/xxx/secrets.json",
        "mode": "json"
      }
    }
  },
  "channels": {
    "discord": {
      "enabled": true,
      "token": {
        "source": "file",
        "provider": "default",
        "id": "/channels/discord/RayClaw/botToken"
      },
      "groupPolicy": "allowlist",
      "streaming": "off",
      "guilds": {
        "xxxxx": {
          "channels": {
            "xxxxx": {
              "allow": true
            }
          }
        }
      }
    }
  },
}

Snippet of secrets.json:

{
    "channels": {
        "discord": {
            "RayClaw": {
                "botToken": "xxxxx"
            }
        }
    }
}
distant meteorBOT
#

An error occurred while processing your request. You can retry your request, or contact us through our help center at help.openai.com if the error persists. Please include the request ID req_7cb18e2790b74d2687188ffe3a93696e in your message.

raw raven
#

@distant meteor can you try again

distant meteorBOT
#

An error occurred while processing your request. You can retry your request, or contact us through our help center at help.openai.com if the error persists. Please include the request ID req_073fd2bc9c844351941b649a1247fd09 in your message.

raw raven
#

@distant meteor can you please try a little harder oh_no