Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
On OpenClaw 2026.5.22, the /compact slash command executes successfully (context is compacted, delivered=true is logged), but the reply text summarizing the compaction result is never delivered to any channel. The message silently disappears in the dispatch pipeline. No error is logged. Additionally, the compaction.notifyUser notification is also silently skipped.
This is a regression from 2026.5.18 where /compact replies were displayed normally on both Feishu and WebChat.
Steps to reproduce
- Install OpenClaw 2026.5.22 (upgraded from 2026.5.18).
- Accumulate enough conversation context (e.g., 70k+ tokens).
- Send
/compact from any channel (Feishu DM or WebChat).
- Observe: no reply is received. The command appears to be silently consumed.
Expected behavior
The /compact command should return a visible reply to the originating channel, e.g.:
Compacted (76k → 934 tokens)
When compaction.notifyUser is set to true, compaction start/end notifications (🧹 Compacting context... / 🧹 Compaction complete) should also be delivered to the user's chat channel.
Both worked correctly on 2026.5.18.
Actual behavior
Bug 1: Compact reply silently dropped
- The compaction itself executes correctly (context is reduced).
- The gateway log shows
system command dispatched (delivered=true, elapsed=~1200ms).
- No
deliver: sending text chunks log appears for the compact reply message.
- No Feishu API call is made to send the reply.
- The user sees nothing — no success, no error, no feedback of any kind.
- Both Feishu and WebChat channels are affected.
Bug 2: notifyUser notification short-circuited by else if
When compaction.notifyUser: true is set, the notification is still not delivered. In agent-runner-execution-*.js (lines ~1467–1476), the notification logic uses an else if chain:
if (params.opts?.onCompactionStart) await params.opts.onCompactionStart();
if (hookMessages.length > 0) await sendCompactionHookMessages(hookMessages);
else if (!params.opts?.onCompactionStart && shouldNotifyUserAboutCompaction) await sendCompactionNotice("start");
The sendCompactionNotice call only fires when no internal callbacks are registered and no hookMessages are present. If the system internally registers onCompactionStart/onCompactionEnd (e.g., for Control UI), the user notification is silently skipped — even though the user explicitly opted in.
These serve different audiences and should be independent:
- Internal callbacks → system/Control UI
- Hook messages → custom hooks
notifyUser → the end user's chat channel
Evidence from gateway logs
Compact command (broken) — Feishu, message om_x100b6e6c0fae1094b2445d34453c189 at 19:29:
19:29:26.439 | message om_x100b6e6c0fae1094b2445d34453c189 — immediate
19:29:26.443 | received from ou_... in oc_... (p2p)
19:29:26.447 | system command detected, plain-text dispatch
19:29:27.639 | system command dispatched (delivered=true, elapsed=1198ms)
← NO "deliver: sending text chunks" log
← NO Feishu API call
← message disappears
Compact command (broken) — Feishu, message om_x100b6e62c1de24acb32a67cbb3eba18 at 17:33:
17:33:37.869 | message om_x100b6e62c1de24acb32a67cbb3eba18 — immediate
17:33:37.872 | received from ou_... in oc_... (p2p)
17:33:37.877 | system command detected, plain-text dispatch
17:33:39.155 | system command dispatched (delivered=true, elapsed=1285ms)
← NO "deliver: sending text chunks" log
← message disappears
Normal user message (working) — Feishu, message om_x100b6e62deba9480b3e272c2d2e57d1 at 17:34:
17:34:00.009 | message om_x100b6e62deba9480b3e272c2d2e57d1 — immediate
17:34:00.014 | received from ou_... in oc_... (p2p)
17:34:00.065 | reply mode resolved (effectiveReplyMode=static, ...)
17:34:00.067 | footer config resolved (...)
17:34:00.069 | dispatching to agent (session=agent:main:feishu:direct:ou_...)
17:34:01.635 | added typing indicator reaction
17:34:24.412 | deliver: sending card chunks (count=1, chatId=oc_...) ← reply delivered ✅
17:34:25.331 | dispatch complete (replies=1, elapsed=25320ms)
The key difference: compact messages stop after system command dispatched (delivered=true). Normal messages proceed through dispatching to agent → deliver: sending text chunks → dispatch complete (replies=1).
Source code analysis
The compact reply is generated in handleCompactCommand (commands-handlers.runtime-05Qv0Bh1.js, line 1676+). The handler correctly produces reply text and invokes the deliver callback. However, in the dispatch pipeline (deliverOutboundPayloads), the reply appears to hit an early-return branch that skips the actual channel adapter invocation. Since deliverySucceeded defaults to !deliveryHadError and no error was set, the result is delivered=true with no actual delivery.
This is the same root cause pattern as #79753 (cron announce delivered=true but message never arrives).
For the notifyUser issue, the suggested fix is to change the else if to an independent if:
if (params.opts?.onCompactionEnd) await params.opts.onCompactionEnd();
if (hookMessages.length > 0) await sendCompactionHookMessages(hookMessages);
if (shouldNotifyUserAboutCompaction) await sendCompactionNotice("end"); // always fire if enabled
Suspected 2026.5.22 changes
The following changes in 2026.5.22 may be related:
Workaround
None found. The compaction result is lost silently. Users can verify compaction happened by checking /status for context size changes, but receive no feedback from the /compact command itself.
OpenClaw version
2026.5.22 (a374c3a)
Operating system
Ubuntu 26.04 LTS (Linux 7.0.0-15-generic x86_64)
Install method
npm global
Model
zhipuai/glm-5.1 (default), also reproduced with kuaipao-gpt/gpt-5.5
Provider / routing chain
zhipuai/glm-5.1 → gateway
Additional provider/model setup details
N/A — bug is in dispatch pipeline, independent of model/provider.
Impact and severity
- Affected: All users who rely on
/compact to manage context and expect feedback.
- Severity: Medium. Compaction still works functionally, but the silent failure makes users think the command did nothing, leading to repeated attempts and confusion.
- Frequency: Every
/compact invocation on every channel.
- Consequence: User confusion, duplicate compact attempts, loss of trust in the slash command system. In automated workflows, the absence of a compaction summary prevents downstream logic from confirming success.
Additional information
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
On OpenClaw 2026.5.22, the
/compactslash command executes successfully (context is compacted,delivered=trueis logged), but the reply text summarizing the compaction result is never delivered to any channel. The message silently disappears in the dispatch pipeline. No error is logged. Additionally, thecompaction.notifyUsernotification is also silently skipped.This is a regression from 2026.5.18 where
/compactreplies were displayed normally on both Feishu and WebChat.Steps to reproduce
/compactfrom any channel (Feishu DM or WebChat).Expected behavior
The
/compactcommand should return a visible reply to the originating channel, e.g.:When
compaction.notifyUseris set totrue, compaction start/end notifications (🧹 Compacting context.../🧹 Compaction complete) should also be delivered to the user's chat channel.Both worked correctly on 2026.5.18.
Actual behavior
Bug 1: Compact reply silently dropped
system command dispatched (delivered=true, elapsed=~1200ms).deliver: sending text chunkslog appears for the compact reply message.Bug 2:
notifyUsernotification short-circuited byelse ifWhen
compaction.notifyUser: trueis set, the notification is still not delivered. Inagent-runner-execution-*.js(lines ~1467–1476), the notification logic uses anelse ifchain:The
sendCompactionNoticecall only fires when no internal callbacks are registered and nohookMessagesare present. If the system internally registersonCompactionStart/onCompactionEnd(e.g., for Control UI), the user notification is silently skipped — even though the user explicitly opted in.These serve different audiences and should be independent:
notifyUser→ the end user's chat channelEvidence from gateway logs
Compact command (broken) — Feishu, message
om_x100b6e6c0fae1094b2445d34453c189at 19:29:Compact command (broken) — Feishu, message
om_x100b6e62c1de24acb32a67cbb3eba18at 17:33:Normal user message (working) — Feishu, message
om_x100b6e62deba9480b3e272c2d2e57d1at 17:34:The key difference: compact messages stop after
system command dispatched (delivered=true). Normal messages proceed throughdispatching to agent→deliver: sending text chunks→dispatch complete (replies=1).Source code analysis
The compact reply is generated in
handleCompactCommand(commands-handlers.runtime-05Qv0Bh1.js, line 1676+). The handler correctly produces reply text and invokes thedelivercallback. However, in the dispatch pipeline (deliverOutboundPayloads), the reply appears to hit an early-return branch that skips the actual channel adapter invocation. SincedeliverySucceededdefaults to!deliveryHadErrorand no error was set, the result isdelivered=truewith no actual delivery.This is the same root cause pattern as #79753 (cron announce
delivered=truebut message never arrives).For the
notifyUserissue, the suggested fix is to change theelse ifto an independentif:Suspected 2026.5.22 changes
The following changes in 2026.5.22 may be related:
before_compaction/after_compactionhooks (could cause early return if hook timing changes)Workaround
None found. The compaction result is lost silently. Users can verify compaction happened by checking
/statusfor context size changes, but receive no feedback from the/compactcommand itself.OpenClaw version
2026.5.22 (a374c3a)
Operating system
Ubuntu 26.04 LTS (Linux 7.0.0-15-generic x86_64)
Install method
npm global
Model
zhipuai/glm-5.1 (default), also reproduced with kuaipao-gpt/gpt-5.5
Provider / routing chain
zhipuai/glm-5.1 → gateway
Additional provider/model setup details
N/A — bug is in dispatch pipeline, independent of model/provider.
Impact and severity
/compactto manage context and expect feedback./compactinvocation on every channel.Additional information
@larksuite/openclaw-lark@2026.5.20(unchanged; bug appeared after core upgrade from 2026.5.18 → 2026.5.22)delivered=truebut no actual delivery pattern), Bug: Feishu channel does not handle text slash commands (/compact, /new, /stop) #79409 (different: Feishu commands not recognized), [Bug] Feishu /new command delivered=false (2026.4.9, DM, 100% reproducible) #64047 (different:delivered=false)mode: "safeguard",reserveTokensFloor: 30000. Bug reproduced with and withoutnotifyUsersetting.