Repository navigation
Description
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
On stable 2026.6.1 (2e08f0f), Discord inbound handling and the agent turn completed, but final reply delivery failed with:
Error: Outbound not configured for channel: discord
The gateway was otherwise healthy, Discord status was OK, config validation passed, and @openclaw/discord@2026.6.1 was loaded. After a gateway restart, delivery recovery replayed the single pending Discord reply successfully.
This looks related to closed issues #77254, #84147, and especially #84568. I am filing a new issue because those reports are closed as fixed, while the current stable 2026.6.1 install and current main source still show the same risky active-registry fallback path in src/channels/plugins/registry-loader.ts.
Steps to reproduce
- Run OpenClaw
2026.6.1with the official Discord plugin enabled and connected. - Use Discord as an inbound channel and send a normal message that should produce a final assistant reply.
- Observe that the agent turn completes, but the final Discord reply is not posted.
- Check gateway logs for
Outbound not configured for channel: discord. - Restart the gateway and observe delivery recovery replay the pending Discord delivery.
Expected behavior
If Discord inbound is connected and the Discord plugin is loaded, final assistant replies should continue resolving the Discord outbound adapter and post to the originating Discord channel without requiring a gateway restart.
Actual behavior
The agent run completed, but final reply delivery failed:
[plugins] openclaw-mem0: skills-mode agent_end (no auto-capture)
[discord] final reply failed (target=<redacted> session=<redacted>): Error: Outbound not configured for channel: discord
After a gateway restart, the pending delivery recovered:
[delivery-recovery] Found 1 pending delivery entries — starting recovery
[delivery-recovery] Recovered delivery <redacted> on discord
[delivery-recovery] Delivery recovery complete: 1 recovered, 0 failed, 0 skipped (max retries), 0 deferred (backoff)
OpenClaw version
2026.6.1 (2e08f0f)
Operating system
Ubuntu 24.04 LTS, Linux x86_64
Install method
npm global, gateway launched as a systemd service
Model
gpt-5.5
Provider / routing chain
OpenClaw gateway -> OpenAI Codex runtime
Additional provider/model setup details
The model/provider path appears healthy. The failure happened after an agent turn had already produced output, and the failed surface was Discord final-reply delivery.
openclaw status --deep after restart showed Discord OK and the active session runtime as OpenAI Codex.
The Discord plugin was loaded as @openclaw/discord@2026.6.1 from the npm-project install. plugins inspect discord also reported a duplicate plugin-id warning from an older install/copy, but the active selected runtime was the npm-project Discord plugin.
Logs, screenshots, and evidence
Sanitized live checks:
openclaw --version
OpenClaw 2026.6.1 (2e08f0f)
curl /health
{"ok":true,"status":"live"}
openclaw config validate
Config valid: ~/.openclaw/openclaw.json
Current source inspection on main shows src/channels/plugins/registry-loader.ts still falls back from the channel registry to getActivePluginRegistry() after a channel-registry miss. That matches the root-cause family described in #84568.
Current src/infra/outbound/deliver.ts calls loadBootstrappedOutboundAdapter(), then resolveOutboundChannelMessageAdapter(), and throws Outbound not configured for channel: ${params.channel} when neither path yields a send-capable handler.
Current src/infra/outbound/channel-bootstrap.runtime.ts records a per-channel/per-registry bootstrap attempt before verifying that the resulting registry has a send-capable channel entry. Inference: if bootstrap resolves without making Discord send-capable, later retries can be skipped for the same registry version until process restart clears the attempt state.
Impact and severity
Affected: Discord users relying on final assistant replies.
Severity: High for Discord deployments because inbound messages can be processed and agent turns can complete, but the user-visible final response is not delivered until restart recovery.
Frequency: Observed once on stable 2026.6.1; the source path matches previously reported closed regressions.
Additional information
Related closed issues: #77254, #84147, #84568.
This report intentionally redacts Discord channel IDs, session keys, delivery IDs, message content, tokens, hostnames, IPs, file paths containing usernames, and local config details.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 4, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 4, 2026, 12:44 AM ET / 04:44 UTC.
Summary
Keep open: current main and v2026.6.1 still contain the outbound registry fallback and one-shot bootstrap behavior implicated by the report, and the related reports in the provided context are closed rather than a canonical open fix path.
Reproducibility: unclear. for a live current-main reproduction because this review did not run a Discord gateway, but source inspection verifies the reported registry fallback and delivery error path on both current main and v2026.6.1.
Ways to help us reproduce this
Next step
This is a narrow, source-backed Discord outbound delivery regression with clear likely files and a focused regression-test path.
Review details
Best possible solution:
Make final delivery resolve Discord outbound through a stable send-capable channel registry or loaded runtime plugin, invalidate failed non-send bootstrap attempts, and add a regression for the Discord-style setup/runtime registry split.
Do we have a high-confidence way to reproduce the issue?
Unclear for a live current-main reproduction because this review did not run a Discord gateway, but source inspection verifies the reported registry fallback and delivery error path on both current main and v2026.6.1.
Is this the best way to solve the issue?
Unclear as an implementation until a patch exists; the best fix should preserve required setup-shell bootstrap while removing stale active-registry or failed-bootstrap behavior from final delivery.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
src/infra/outbound/deliver.test.tswhile preventing stale or non-send-capable active registries from satisfying final delivery.Codex review notes: model gpt-5.5, reasoning high; reviewed against d901f85abbb7.
Label changes
Label changes:
P1: The report describes a current stable release channel workflow where agent turns complete but final Discord replies are not delivered until restart recovery.impact:message-loss: The issue is specifically about user-visible Discord final replies being queued or missed instead of posted to the originating channel.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.clawsweeper:queueable-fix: Current issue advisory state selects this label.clawsweeper:fix-shape-clear: Current issue advisory state selects this label.Label justifications:
P1: The report describes a current stable release channel workflow where agent turns complete but final Discord replies are not delivered until restart recovery.impact:message-loss: The issue is specifically about user-visible Discord final replies being queued or missed instead of posted to the originating channel.Evidence reviewed
Acceptance criteria:
What I checked:
createChannelRegistryLoaderfirst reads the channel registry, then falls back togetActivePluginRegistry()when the channel registry miss returns no value; this matches the risky fallback family described in the issue. (src/channels/plugins/registry-loader.ts:27, d901f85abbb7)createChannelHandlerloads the bootstrapped outbound adapter, resolves the message adapter, and throwsOutbound not configured for channel: ${params.channel}when neither path supplies a handler. (src/infra/outbound/deliver.ts:223, d901f85abbb7)bootstrapOutboundChannelPluginrecords a per-registry/per-channel attempt before the loaded registry is later re-read by delivery; a non-throwing load that still does not yield a send-capable entry can skip later attempts until the registry version changes. (src/infra/outbound/channel-bootstrap.runtime.ts:41, d901f85abbb7)getActivePluginChannelRegistryandgetActivePluginRegistryand falls back from the channel registry to the active registry. (src/channels/plugins/registry-loader.ts:20, 2e08f0f4221f)src/channels/plugins/registry-loader.ts:1, bc9c074b2c17)deliver.test.tscurrently expects delivery through a full active plugin when the pinned setup channel has no sender, so the repair must preserve legitimate setup-shell bootstrap behavior while avoiding stale active-registry loss. (src/infra/outbound/deliver.test.ts:338, d901f85abbb7)Likely related people:
src/channels/plugins/registry-loader.ts,src/infra/outbound/deliver.ts,src/infra/outbound/channel-bootstrap.runtime.ts)src/channels/plugins/registry-loader.ts)src/infra/outbound,src/channels/plugins,extensions/discord)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.