Repository navigation
Closed as not planned
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maturity:stableBroken existing behavior primarily owned by an M4/M5 scorecard surface.Broken existing behavior primarily owned by an M4/M5 scorecard surface.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Bug Description
OpenClaw Discord bot connects successfully, can READ messages, but cannot SEND messages - returns 401 Unauthorized. Direct REST API calls with the same token work fine.
Environment
- OpenClaw 2026.5.6/2026.5.7
- Discord bot token valid (REST API works)
- Bot is in server, online, Gateway shows 'connected'
- Intents enabled: Message Content, Server Members, Presence
Config
{
"channels": {
"discord": {
"enabled": true,
"token": "MTUw... (valid token)"
}
}
}What Works
message(action=read)✅- Direct REST API
POST /channels/{id}/messages✅ - Gateway connects, bot shows online in Discord ✅
What Doesn't Work
message(action=send)returns 401 Unauthorized ❌- CLI
openclaw message sendalso fails ❌
Tested
- Various target formats:
to,channelId,guildId+channelId - With/without
groupPolicy,guildsallowlist - With/without
applicationId - Different intents config
- Explicit account config
- Minimal config
Discord Permissions
- Bot has Administrator role (permission 8)
- Channel has no overwrites (inherits from @everyone)
- Guild @everyone permissions: 2248473465835073
Additional Notes
- Bot ID: 1502285113214632170
- This is a fresh bot created today
- REST API test confirms token is valid
- Read works but send doesn't - seems like outbound HTTP construction issue
Reacted by clawsweeper
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maturity:stableBroken existing behavior primarily owned by an M4/M5 scorecard surface.Broken existing behavior primarily owned by an M4/M5 scorecard surface.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Activity
clawsweeper commentedon May 8, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 28, 2026, 9:32 PM ET / 01:32 UTC.
Summary
Keep open: this remains a concrete Discord outbound send/auth report, current main still sends through the expected Discord bot REST path, and neither duplicate search nor recent main history shows a merged same-root fix or live current-main proof that the 401 is gone.
Reproducibility: no. The issue body gives a concrete shipped-version setup and the source path for Discord send is clear, but this read-only review did not run a live Discord send against current main.
Ways to help us reproduce this
Next step
Maintainer-controlled Discord credentials and a redacted live response capture are needed before automation can safely target a fix.
Review details
Best possible solution:
Capture a live current-main Discord send with redacted outbound response details, then fix only the narrow token/account/request path if the 401 still reproduces.
Do we have a high-confidence way to reproduce the issue?
No. The issue body gives a concrete shipped-version setup and the source path for Discord send is clear, but this read-only review did not run a live Discord send against current main.
Is this the best way to solve the issue?
Unclear. Current main constructs Bot authorization and posts to the expected Discord channel-message route, so the best fix cannot be chosen until maintainers capture the live current-main response and selected account/token path.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 4b8a0a8ecf83.
Label changes
Label changes:
issue-rating: 🐚 platinum hermit: Current issue advisory state selects this label.clawsweeper:needs-live-repro: Current issue advisory state selects this label.clawsweeper:needs-info: Current issue advisory state no longer selects this label.issue-rating: 🦐 gold shrimp: Current issue advisory state no longer selects this label.Label justifications:
P2: A reported Discord send failure blocks outbound messages for one stable channel but is not shown as a core-wide outage.impact:message-loss: The issue is specifically about outbound Discord messages failing to send.impact:auth-provider: The observable failure is a 401 Unauthorized response on a configured Discord bot token path.maturity:stable: The affected Discord surface is scored M4 Stable in qa/maturity-scores.yaml.Evidence reviewed
Acceptance criteria:
openclaw message send --channel discord --target channel:<redacted> --message <redacted> --json --verbose, and capture status/body without secrets.node scripts/run-vitest.mjs extensions/discord/src/send.sends-basic-channel-messages.test.ts extensions/discord/src/token.test.ts extensions/discord/src/client.test.ts extensions/discord/src/internal/rest.test.tsplus the live send proof.What I checked:
AGENTS.md:1, 4b8a0a8ecf83)extensions/discord/src/send.outbound.ts:149, 4b8a0a8ecf83)extensions/discord/src/internal/rest.ts:275, 4b8a0a8ecf83)extensions/discord/src/internal/api.messages.ts:22, 4b8a0a8ecf83)extensions/discord/src/token.test.ts:16, 4b8a0a8ecf83)Likely related people:
extensions/discord/src/send.outbound.ts,extensions/discord/src/send.shared.ts)extensions/discord/src/outbound-adapter.ts,extensions/discord/src/internal/rest.ts)extensions/discord/src/token.ts,extensions/discord/src/client.ts,extensions/discord/src/send.outbound.ts)extensions/discord/src/internal/rest.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.barnacle-openclaw commentedon May 31, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
openclaw-barnacle commentedon Jul 13, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
openclaw-barnacle commentedon Jul 20, 2026
Closing due to inactivity.
If this is still an issue, please retry on the latest OpenClaw release and share updated details.
If you are absolutely sure it still happens on the latest release, open a new issue with fresh steps to reproduce.