#agent discord token

1 messages · Page 1 of 1 (latest)

latent bone
#

running version 2026.4.21 (f788c88)

I am trying to run a cron job via a specific agent. The job has been failing since updating around version 2026.4.15, and seems to be having trouble finding the discord token. I actually have a separate token for this agent, not clear where I need to configure it, or why it's no longer able to see the DISCORD_BOT_TOKEN that in the .openclaw/.env file. the bot specific token is also defined in env.

when I kick off the job, I see this error in the logs:
10:47:48-04:00 error gateway {"subsystem":"gateway"} request handler failed: Error: channels.discord.token: *** SecretRef "env:default:DISCORD_BOT_TOKEN". Resolve this command against an active gateway runtime snapshot before reading it.
10:47:48-04:00 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✗ cron.list 297ms errorCode=UNAVAILABLE errorMessage=Error: channels.discord.token: *** SecretRef "env:default:DISCORD_BOT_TOKEN". Resolve this command against an active gateway runtime snapshot before reading it. conn=b814d9ad…1f6e id=0f003db9…ed1f
10:47:48-04:00 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✓ logs.tail 273ms conn=1ad694b7…ff71 id=36fa7251…12dc

the main agent resolves the token just fine.

does the agent have it's own .env file, or should it be able to see the environment variables defined in .openclaw/.env?

dark cragBOT
tender oracleBOT
#

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

dark cragBOT
latent bone
#

claw@clawserv:~$ openclaw config get channels.discord

🦞 OpenClaw 2026.4.21 (f788c88) — Your second brain, except this one actually remembers where you left things.

{
"enabled": true,
"groupPolicy": "allowlist",
"streaming": {
"mode": "off"
},
"dmPolicy": "allowlist",
"allowFrom": [
"1020084715354595380"
],
"dm": {
"enabled": true
},
"guilds": {
"1477033018727337994": {
"requireMention": false,
"users": [
"1020084715354595380"
]
}
},
"execApprovals": {
"enabled": true,
"approvers": [
"1020084715354595380"
],
"target": "both"
},
"token": {
"source": "env",
"provider": "default",
"id": "DISCORD_BOT_TOKEN"
},
"accounts": {
"default": {
"token": {
"source": "env",
"provider": "default",
"id": "DISCORD_BOT_TOKEN"
},
"groupPolicy": "allowlist",
"guilds": {
"1477033018727337994": {
"requireMention": false,
"ignoreOtherMentions": false,
"channels": {
"1477033019742355458": {
"requireMention": false,
"enabled": true
}
}
}
}
},
"baseball": {
"token": {
"source": "env",
"provider": "default",
"id": "DISCORD_BOT_TOKEN_BASEBALL"
},
"groupPolicy": "allowlist",
"guilds": {
"1477033018727337994": {
"requireMention": false,
"ignoreOtherMentions": false,
"channels": {
"1477503727765164193": {
"requireMention": false,
"enabled": true
}
}
}
}
}
}
}

#

I recently added the token under channels.discord for a recent release, as it seemed to be looking there, so not sure if the one under accounts.default is still necessary, or if there is some equivalent place for the baseball discord token?

latent bone
#

@rigid shore

latent bone
#

turns out the binding for the agent had the discord accountid not the agent name (account id). not sure how it worked previously.