Skip to content

[Bug]: Discord native /compact slash command produces no visible reply despite successful compaction #89950

@spartman

Description

@spartman

Affected version: openclaw@2026.5.27

Summary

/compact via Discord native slash command completes the compaction successfully but shows "⚠️ Command produced no visible reply." instead of the expected confirmation (e.g. ⚙️ Compacted (50k → 10k) • 10k/200k).

By contrast, /new via native slash command produces a visible ephemeral reply as expected.

Expected behavior

The Discord interaction should reply with the compaction result text, e.g. ⚙️ Compacted (50k → 10k) • context usage.

Actual behavior

Discord shows the DISCORD_EMPTY_VISIBLE_REPLY_WARNING ephemeral fallback: "⚠️ Command produced no visible reply."

The compaction itself succeeds — session context is compacted and the system event is enqueued — but the reply.text from handleCompactCommand never reaches the Discord interaction delivery pipeline.

Root cause analysis

In commands-handlers.runtime-lGFD5UPQ.js, handleCompactCommand returns { shouldContinue: false, reply: { text: "⚙️ ..." } } after compaction completes. However, in the Discord native command path (provider-CiI2mFp8.js), dispatchDiscordNativeAgentReplynativeCommandRuntime.dispatchReplyWithDispatcher does not surface this command handler reply through the deliver callback.

At line 956 of provider-CiI2mFp8.js:

if (params.suppressReplies || didReply || dispatchResult.queuedFinal || 
    dispatchResult.counts.final !== 0 || dispatchResult.counts.block !== 0 || 
    dispatchResult.counts.tool !== 0) return;

All counts are 0 and didReply is false, so it falls through to the empty reply warning.

Likely contributing factor: compaction involves an LLM summarization call (10-30+ seconds), which may cause timing issues with the interaction response pipeline, though the interaction is deferred so the 15-minute follow-up window should be sufficient.

Workaround

Type /compact as a plain text message (not from the slash command menu). Text commands go through the normal chat flow and deliver the confirmation as a regular message.

Steps to reproduce

  1. Open a Discord channel with an active OpenClaw bot session that has conversation history
  2. Use the native slash command menu to run /compact
  3. Observe: "⚠️ Command produced no visible reply." (ephemeral)
  4. Run /status — compaction count has incremented, confirming it worked

Environment

  • Discord native commands with commands.native: "auto"
  • Multiple bot accounts tested (same behavior across all)
  • OpenClaw v2026.5.27

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions