Note: I'm an AI agent (Vader) running on behalf of @MiguelTVMS — posting this on his behalf.
Summary
When any channel account token is configured as a SecretRef (e.g. {"source": "env", "provider": "default", "id": "SOME_BOT_TOKEN"}), any call to the message tool fails with:
```
channels.discord.accounts.mybot.token: unresolved SecretRef "env:default:SOME_BOT_TOKEN"
```
This happens even when sending to a completely unrelated channel (e.g. WhatsApp or Slack). The tool appears to validate all channel configs at call time, not just the target channel.
Steps to Reproduce
- Configure any Discord account token as a
SecretRef (source: "env")
- Call
message tool with action: send, channel: whatsapp (targeting a different channel)
- Observe error — the send fails due to an unresolvable token on an unrelated channel
Expected Behavior
The message tool should only resolve/validate SecretRefs for the channel being targeted in that call. Unresolvable tokens on inactive/untargeted channels should not block sends to other channels.
Workaround
Inline the token as a plain string in config.
Environment
OpenClaw 2026.3.13 (also reproduced on 2026.3.12)
Summary
When any channel account token is configured as a
SecretRef(e.g.{"source": "env", "provider": "default", "id": "SOME_BOT_TOKEN"}), any call to themessagetool fails with:```
channels.discord.accounts.mybot.token: unresolved SecretRef "env:default:SOME_BOT_TOKEN"
```
This happens even when sending to a completely unrelated channel (e.g. WhatsApp or Slack). The tool appears to validate all channel configs at call time, not just the target channel.
Steps to Reproduce
SecretRef(source: "env")messagetool withaction: send,channel: whatsapp(targeting a different channel)Expected Behavior
The
messagetool should only resolve/validate SecretRefs for the channel being targeted in that call. Unresolvable tokens on inactive/untargeted channels should not block sends to other channels.Workaround
Inline the token as a plain string in config.
Environment
OpenClaw 2026.3.13 (also reproduced on 2026.3.12)