openclaw - ✅(Solved) Fix Multiple issues after upgrading 4.1 → 4.20: slow Discord gateway, doctor --fix not working, /status sends non-ephemeral follow-ups [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#69841Fetched 2026-04-22 07:47:40
View on GitHub
Comments
2
Participants
3
Timeline
4
Reactions
0
Timeline (top)
commented ×2closed ×1cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #69869: fix(discord): keep slash follow-ups ephemeral

Description (problem / solution / changelog)

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem: Discord slash command replies can be chunked into multiple follow-ups, but follow-up payloads did not preserve the command's ephemeral visibility.
  • Why it matters: long /status replies could expose fallback model/runtime details publicly after the initial ephemeral response.
  • What changed: thread the native command ephemeral policy through Discord interaction reply delivery, including chunked text and media follow-up chunks.
  • What did NOT change (scope boundary): no Discord gateway startup, doctor, command routing, or model status content changes.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #
  • Related #69841
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: Discord native slash commands set an ephemeral command policy and defer the interaction, but deliverDiscordInteractionReply built subsequent followUp() payloads without the ephemeral flag.
  • Missing detection / guardrail: direct /status coverage asserted the reply text but not visibility across chunked follow-ups.
  • Contributing context (if known): /status can exceed Discord chunk limits when fallback models/runtime details are included.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: extensions/discord/src/monitor/native-command.status-direct.test.ts
  • Scenario the test should lock in: long direct /status output sends multiple follow-ups, and every follow-up remains ephemeral.
  • Why this is the smallest reliable guardrail: it exercises the Discord native command delivery helper directly without live Discord.
  • Existing test that already covers this (if any): existing direct /status test covered dispatcher bypass but not chunk visibility.
  • If no new test is added, why not: N/A

User-visible / Behavior Changes

Discord slash-command follow-up chunks now stay ephemeral when the command is configured for ephemeral replies.

Diagram (if applicable)

Before:
/status -> ephemeral defer -> first follow-up -> later chunks public

After:
/status -> ephemeral defer -> all follow-up chunks ephemeral

Security Impact (required)

  • New permissions/capabilities? (Yes/No) No
  • Secrets/tokens handling changed? (Yes/No) No
  • New/changed network calls? (Yes/No) No
  • Command/tool execution surface changed? (Yes/No) No
  • Data access scope changed? (Yes/No) No
  • If any Yes, explain risk + mitigation: N/A

Repro + Verification

Environment

  • OS: macOS local dev
  • Runtime/container: Node repo runtime via pnpm
  • Model/provider: N/A
  • Integration/channel (if any): Discord
  • Relevant config (redacted): Discord native slash commands with ephemeral replies enabled

Steps

  1. Configure Discord slash commands for ephemeral replies.
  2. Run /status with enough status content to require multiple Discord follow-up messages.
  3. Inspect follow-up payload visibility.

Expected

  • Every /status follow-up remains ephemeral.

Actual

  • Before this fix, later follow-up chunks could be sent without ephemeral and become public.

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Regression coverage added in native-command.status-direct.test.ts; local changed gate passes.

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: long direct /status output produces multiple follow-ups and all follow-up payloads contain ephemeral: true.
  • Edge cases checked: shared Discord changed-surface gate, including extension typecheck, lint, import cycles, and 54 Discord extension test files.
  • What you did not verify: live Discord API behavior.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? (Yes/No) Yes
  • Config/env changes? (Yes/No) No
  • Migration needed? (Yes/No) No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: Some non-status slash-command follow-ups now explicitly inherit the configured ephemeral policy.
    • Mitigation: this matches the existing command-level ephemeralDefault and preserves explicit overrides where call sites pass one.

Changed files

  • CHANGELOG.md (modified, +4/-0)
  • extensions/discord/src/monitor/native-command-ui.ts (modified, +3/-0)
  • extensions/discord/src/monitor/native-command.command-arg.test.ts (added, +97/-0)
  • extensions/discord/src/monitor/native-command.status-direct.test.ts (modified, +61/-0)
  • extensions/discord/src/monitor/native-command.ts (modified, +23/-6)
RAW_BUFFERClick to expand / collapse

Describe the bug After upgrading from OpenClaw 4.1 to 4.20, I encountered the following issues:

  1. Discord gateway slow startup: After starting the gateway, it takes 1-2 minutes to connect to Discord channels.
  2. Discord /status command sends multiple messages: When using slash commands like /status, the first response is ephemeral (only visible to me), but 2 additional follow-up messages are sent that are NOT ephemeral and visible to everyone in the channel.

To Reproduce Steps to reproduce the behavior:

  1. Upgrade from 4.1 to 4.20
  2. Run openclaw gateway start
  3. Observe slow Discord connection (1-2 min)
  4. Run /status in Discord - observe multiple messages where only the first is ephemeral

Expected behavior

  • Discord gateway should connect quickly (< 10 seconds)
  • /status should send only one ephemeral message

Environment:

  • OS: Ubuntu (AWS EC2)
  • OpenClaw version: 4.20 (115f05d)
  • Node version: v25.4.0

Note on openclaw doctor: The doctor reports missing bundled plugin runtime deps, but after checking with npm list, all packages are actually installed globally under [email protected]:

This appears to be a false positive in the doctor's bundled plugin runtime deps check.

Discord /status output showing multiple messages: The first message is ephemeral ("Only you can see this"), but the following 2 messages listing fallback models and runtime info are public.

Additional context

  • The Discord bot is configured to use slash commands with ephemeral responses
  • Model: kimi/k2p5
  • Runtime: direct · Think: high · elevated

extent analysis

TL;DR

The issue can be addressed by investigating the changes in OpenClaw 4.20 that affect Discord gateway connection and slash command handling, potentially requiring configuration adjustments or updates to the Discord bot setup.

Guidance

  • Review the OpenClaw 4.20 release notes and documentation for any changes related to Discord gateway connection and slash command handling that may be causing the slow startup and multiple message issues.
  • Verify that the Discord bot configuration is correctly set up to use ephemeral responses for slash commands, and check if there are any new requirements or options in OpenClaw 4.20 that need to be enabled.
  • Investigate the openclaw doctor false positive issue with bundled plugin runtime deps, although it seems to be unrelated to the main problems, to ensure that all dependencies are correctly installed and configured.
  • Test the Discord bot with a minimal setup to isolate if the issue is specific to the current configuration or a more general problem with OpenClaw 4.20.

Example

No specific code snippet can be provided without more details on the custom configuration or code used with OpenClaw, but reviewing the Discord bot's command handling code for any interactions with OpenClaw's API may provide insights.

Notes

The issue seems to be related to changes in OpenClaw 4.20, but without more specific details on the configuration or custom code used, it's challenging to provide a precise fix. The openclaw doctor false positive issue, while noted, does not seem to be directly related to the main problems described.

Recommendation

Apply workaround: Given the uncertainty around the exact cause and the potential for configuration or setup issues, applying a workaround such as adjusting the Discord bot's configuration or command handling to mitigate the multiple message issue, while investigating the root cause of the slow Discord gateway connection, seems prudent.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix Multiple issues after upgrading 4.1 → 4.20: slow Discord gateway, doctor --fix not working, /status sends non-ephemeral follow-ups [1 pull requests, 2 comments, 3 participants]