Skip to content

[Core bug] /compact reply silently dropped (replies=0) on all channels in 2026.6.1 #90185

Closed

Description

@itanyplus

Core dispatch drops /compact reply — replies=0 on all channels

After /compact is dispatched, the core pipeline completes with replies=0. The compaction itself runs fine, but the reply ("Compacted X tokens") is silently discarded. This affects all channels (confirmed on Feishu DM and WebChat).

PR #87171 (commit fb6f2c61) attempted to fix this in #87107 but did not fully resolve it.

Evidence from gateway logs (2026-06-04)

Normal user message (works correctly):

15:04:44 | dispatching to agent (session=agent:main:feishu:direct:ou_...)
15:04:46 | dispatch complete (queuedFinal=true, replies=1)  ← ✅ reply delivered

/compact command (reply silently lost):

15:03:51 | received message: /compact
15:03:51 | dispatching to agent (session=agent:main:feishu:direct:ou_...)
15:03:52 | dispatch complete (queuedFinal=false, replies=0)  ← ❌ reply lost
15:03:54 | compaction-safeguard: compaction runs...            ← compaction itself works

Key observations:

  1. The command IS received and dispatched to the agent
  2. The compaction DOES execute (safeguard log proves it)
  3. But the reply is never produced (replies=0)
  4. No fallback message is sent
  5. Reproducible on all channels

Environment

Component Version
OpenClaw 2026.6.1 (2e08f0f)
Feishu plugin @openclaw/feishu@2026.6.1 (built-in)
Node.js v24.15.0
OS Ubuntu 26.04 LTS (Linux 7.0.0-15-generic x86_64)
Compaction config mode: "safeguard", reserveTokensFloor: 30000
Affected channels All (Feishu DM, WebChat confirmed)

Related issues

Activity

  1. clawsweeper commented on Jun 4, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 4, 2026, 5:34 AM ET / 09:34 UTC.

    Summary
    Keep open: the report describes a current v2026.6.1 /compact reply-loss path, and current main plus the active related PR do not prove the central replies=0 behavior is fixed.

    Reproducibility: no. the issue has credible v2026.6.1 logs and a source-backed subpath for notifyUser suppression, but this read-only review did not establish a high-confidence current-main live reproduction for the central replies=0 path.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.

    Next step
    The issue already has an active partial PR plus maintainer/product-decision labels, so a maintainer should decide the remaining owner boundary before a new repair lane starts.

    Review details

    Best possible solution:

    Keep this issue as the concrete tracker until maintainers either land a complete fix with dispatch proof or split the remaining core/external-package behavior into a narrower canonical issue.

    Do we have a high-confidence way to reproduce the issue?

    No: the issue has credible v2026.6.1 logs and a source-backed subpath for notifyUser suppression, but this read-only review did not establish a high-confidence current-main live reproduction for the central replies=0 path.

    Is this the best way to solve the issue?

    Unclear: the existing #87171 implementation is a plausible partial fix, and the open related PR addresses another partial path. The best final repair needs maintainer confirmation of whether the remaining failure is core dispatch, bundled Feishu metadata, external Lark package ownership, or the broader durable delivery contract.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The central dispatch symptom is still not root-caused from source: current tests cover marked /compact replies, while the reporter's fresh logs show the turn completing with no final replies queued.
    • The active related PR is explicitly partial, so closing this issue before a complete fix or canonical split would risk losing the remaining cross-channel message-loss report.

    Codex review notes: model gpt-5.5, reasoning high; reviewed against fc64494b03ba.

    Label changes

    Label justifications:

    • P1: A successful /compact command can produce no visible reply in the latest release, breaking a real command/channel workflow.
    • impact:message-loss: The reported user-visible compaction confirmation is silently dropped with replies=0 even though compaction runs.
    • impact:session-state: The affected command changes conversation context state while leaving the user without reliable confirmation.
    Evidence reviewed

    What I checked:

    Likely related people:

    • openperf: Authored the merged fix(auto-reply): deliver /compact in room_event via explicit-command bypass; notifyUser independent of internal callbacks (#87107) #87171 repair for the same /compact reply-suppression family across dispatch-from-config, command terminal replies, and compaction notification handling. (role: introduced earlier repair path; confidence: high; commits: fb6f2c61bf91; files: src/auto-reply/reply/dispatch-from-config.ts, src/auto-reply/reply/get-reply-inline-actions.ts, src/auto-reply/reply/agent-runner-execution.ts)
    • snowzlm: Opened the active partial repair PR for this issue, focused on compaction hook-message and notifyUser notice behavior plus bundled Feishu command coverage. (role: recent adjacent contributor; confidence: medium; commits: df98fff0eaf0; files: src/auto-reply/reply/agent-runner-execution.ts, extensions/feishu/src/bot.test.ts, packages/plugin-sdk/src/testing.ts)
    • Chunyue Wang: The available git history records the earlier merged fix commit author on the same affected core reply-delivery files. (role: commit author for prior fix; confidence: medium; commits: fb6f2c61bf91; files: src/auto-reply/reply/dispatch-from-config.ts, src/auto-reply/reply/get-reply-inline-actions.ts, src/auto-reply/reply/agent-runner-execution.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    on Jun 4, 2026
  3. itanyplus commented on Jun 4, 2026

    @itanyplus
    Author

    Update: Confirmed — core dispatch bug, NOT plugin-specific

    After migrating from @larksuite/openclaw-lark@2026.5.20 to @openclaw/feishu@2026.6.1 (the built-in community plugin), the /compact reply is still silently dropped. This proves the bug is in the core dispatch pipeline, not in any specific plugin.

    Evidence with @openclaw/feishu (built-in plugin)

    Normal message (reply delivered correctly):

    15:04:44 | dispatching to agent (session=agent:main:feishu:direct:ou_...)
    15:04:46 | dispatch complete (queuedFinal=true, replies=1)  ← ✅ works
    

    /compact command (reply silently dropped):

    15:03:51 | received message from ou_...: /compact
    15:03:51 | dispatching to agent (session=agent:main:feishu:direct:ou_...)
    15:03:52 | dispatch complete (queuedFinal=false, replies=0)  ← ❌ reply lost
    15:03:54 | compaction-safeguard: compaction runs...           ← compaction itself works
    

    Key observations:

    1. The command IS received and dispatched to the agent
    2. The compaction DOES execute (safeguard log proves it)
    3. But the reply ("Compacted X tokens") is never generated (replies=0)
    4. No fallback message is sent
    5. This happens with BOTH plugins — the root cause is in core dispatch, not plugin-level routing

    Environment after migration

    Component Version
    OpenClaw 2026.6.1 (2e08f0f)
    Feishu plugin @openclaw/feishu@2026.6.1 (built-in)
    @larksuite/openclaw-lark uninstalled
    Affected channels All (Feishu DM, WebChat confirmed)
  4. changed the title [-][Regression] /compact reply still silently dropped on 2026.6.1 (reopens #87107)[/-] [+][Core bug] /compact reply silently dropped (replies=0) on all channels in 2026.6.1[/+] on Jun 4, 2026
  5. itanyplus commented on Jun 5, 2026

    @itanyplus
    Author

    Additional Analysis (rough assessment, for reference only)

    Confirmed the same bug on v2026.6.1 with the built-in @openclaw/feishu plugin — this is not a channel plugin issue. After a rough read-through of the dist code, here are my observations. This may not be accurate; provided for reference only.

    Confirmed Observations

    • The behavior is identical across all channels (Feishu, webchat, etc.)
    • /compact should normally be recognized as a slash command and handled via the fast path, not routed through the full AI dispatch pipeline
    • Logs show the compaction operation itself does execute (compaction-safeguard fires), but replies=0

    Suspected Root Cause

    The fast path (maybeResolveNativeSlashCommandFastReply) does not call markCommandReplyForDelivery() when returning the /compact reply.

    Comparing the slow path (runCommands) in the same file:

    // Slow path — marked ✅
    if (!commandResult.shouldContinue) {
        return {
            kind: "reply",
            reply: markCommandReplyForDelivery(commandResult.reply)  // ← has the mark
        };
    }
    
    // Fast path — NOT marked ❌
    if (!commandResult.shouldContinue) return {
        handled: true,
        reply: commandResult.reply  // ← missing markCommandReplyForDelivery
    };

    markCommandReplyForDelivery sets deliverDespiteSourceReplySuppression: true metadata on the reply payload. In the final delivery stage of the dispatch pipeline (dispatch-Bgs9vXV4.js), there is a delivery suppression mechanism:

    const shouldDeliverDespiteSourceReplySuppression = (reply) =>
        suppressAutomaticSourceDelivery && !sendPolicyDenied &&
        getReplyPayloadMetadata(reply)?.deliverDespiteSourceReplySuppression === true && ...;
    
    for (const reply of replies) {
        if (suppressDelivery && !shouldDeliverDespiteSourceReplySuppression(reply)) {
            // reply silently dropped
            continue;
        }
        // ... normal delivery
    }

    A reply without this mark gets skipped when suppressDelivery is true.

    Uncertainties

    1. The log shows replies=0, not "reply suppressed" — this could mean the reply was never produced in the first place, not just suppressed at delivery
    2. There may be other break points earlier in the fast path (though user confirms consistent behavior across all channels, and /compact should be recognized as a command)
    3. The dist code is minified with variable names stripped — there may be execution paths I missed

    Environment

    • OpenClaw 2026.6.1 (2e08f0f)
    • Built-in @openclaw/feishu plugin (same bug reproduces after migrating from @larksuite/openclaw-lark)
  6. itanyplus commented on Jun 9, 2026

    @itanyplus
    Author

    Still broken on 2026.6.5-beta.6 (released today, Jun 9).

    Confirmed the root cause is unchanged in the bundled dist:

    Fast path (maybeResolveNativeSlashCommandFastReply, ~line 2207 in get-reply-BpFiu3Nn.js):

    if (!commandResult.shouldContinue) return {
        handled: true,
        reply: commandResult.reply  // ← missing markCommandReplyForDelivery()
    };

    Slow path (~line 2050) has it:

    reply: markCommandReplyForDelivery(commandResult.reply)  // ← correct

    This is literally a one-line fix. The fast path just needs to wrap commandResult.reply with markCommandReplyForDelivery().

    Impact: Every /compact invocation on every channel silently returns replies=0. The compaction itself works, but the user gets zero feedback — no "Compacted X tokens" message, nothing. Users think the command did nothing.

    This has been open for 5 days as P1. It is extremely frustrating for daily users. Please prioritize the fix for the next beta/stable release.

  7. self-assigned this
    on Jun 10, 2026
  8. joshavant commented on Jun 10, 2026

    @joshavant
    Collaborator

    Thanks @itanyplus for the detailed report and for checking the bundled dist in 2026.6.1 and 2026.6.5-beta.6.

    Closing this as fixed on current main by #90212. The timeline explains the apparent mismatch: 2026.6.5-beta.6 was published before #90212 landed, so that beta still had the broken fast-path return:

    return { handled: true, reply: commandResult.reply };

    Current main now wraps native /compact fast-path replies with markCommandReplyForDelivery(...), so the terminal command reply carries the source-suppression bypass metadata and is delivered through message_tool_only instead of being dropped.

    Proof:

    • fix(agents): deliver native /compact replies through source suppression #90212 merged the fix and regression coverage.
    • Current main contains the fixed fast-path return in src/auto-reply/reply/get-reply-native-slash-fast-path.ts.
    • I verified current main on AWS Crabbox: native /compact produced a marked reply, dispatch returned queuedFinal=true, and the targeted native fast-path / dispatch / Feishu tests passed.

    OpenClaw forward-releases fixes rather than backporting, so affected released/beta builds before #90212 may still show the bug. Please pick up the next release containing #90212.

  9. itanyplus commented on Jun 11, 2026

    @itanyplus
    Author

    Confirmed fixed on 2026.6.6-beta.1 (commit 99648bb).

    ⚙️ Compacted (84k → 2.1k) • Context 2.1k/205k (1%)
    

    /compact now returns the result card and the context window is correctly reduced. Previously on 2026.6.5 and 2026.6.5-beta.6, /compact would silently complete with replies=0 — no visible output at all.

    Great to see this fixed. Please make sure the compact delivery path stays intact going forward — losing compact feedback is a pretty bad UX since there is no indication whether it succeeded or failed.

  10. locked as resolved and limited conversation to collaborators on Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions