Repository navigation
Description
Symptom
A Discord-originated session that spawns a subagent / child task shows only the Discord typing indicator with no visible progress or state updates. The operator has no visibility into long-running work until terminal status.
Concrete repro (local, OpenClaw 2026.5.26 + @openclaw/discord 2026.5.26 + @openclaw/codex 2026.5.26):
- In a Discord channel routed to an OpenClaw agent, send a message that triggers the agent to spawn a subagent (e.g. ask Codex to run a child task).
- Discord shows the typing indicator for the agent.
- No progress messages appear; the channel sits silently until the parent task reaches terminal status (often minutes later).
openclaw tasks listshowsnotifyPolicy=done_onlyfor the parent andnotifyPolicy=silentfor the child CLI task.
Root cause
In the bundled chunk task-registry-CU9A1ECz.js (likely source src/tasks/task-registry.ts):
function ensureNotifyPolicy(params) {
if (params.notifyPolicy) return params.notifyPolicy;
return (params.deliveryStatus ?? ensureDeliveryStatus({
ownerKey: params.ownerKey,
scopeKind: params.scopeKind
})) === "not_applicable" ? "silent" : "done_only";
}When no explicit notifyPolicy is passed (typical for ACP spawns and @openclaw/discord/dist/subagent-hooks-DHA_1pBI.js's handleDiscordSubagentSpawning path), the parent task defaults to done_only. Combined with:
shouldAutoDeliverTaskStateChangeonly firing onstate_changespolicy (task-registry-CU9A1ECz.js:89-91)shouldAutoDeliverTaskTerminalUpdateonly firing at terminal status (:83-87)- Discord typing module being a fixed 5s start with no task-state link (
@openclaw/discord/dist/typing-BhIpRSfR.js) and a 20-min wall-clock cap (message-handler.process-DO17vBlT.js:1003-1016)
…the operator sees a typing indicator with no payload for the duration of the run.
Proposed fix
ensureNotifyPolicy should default to state_changes (not done_only) when the task carries a Discord origin marker, so Discord-originated work surfaces progress and state-change events:
function ensureNotifyPolicy(params) {
if (params.notifyPolicy) return params.notifyPolicy;
- return (params.deliveryStatus ?? ensureDeliveryStatus({
+ const deliveryStatus = params.deliveryStatus ?? ensureDeliveryStatus({
ownerKey: params.ownerKey,
scopeKind: params.scopeKind
- })) === "not_applicable" ? "silent" : "done_only";
+ });
+ if (deliveryStatus === "not_applicable") return "silent";
+ if (params.requesterOrigin?.channel === "discord") return "state_changes";
+ return "done_only";
}Both ensureNotifyPolicy call sites (mergeExistingTaskForCreate and the main task-create path) need to pass requesterOrigin: params.requesterOrigin. requesterOrigin is already available in the surrounding params at both call sites; this is a pure pass-through.
Side-effect surface
- Non-Discord callers (cron, system, ACP from other channels): unchanged — fallback still
done_onlyorsilent. - Tasks with an explicit
notifyPolicy(codex native subagents atsilent): unchanged — the early-returnif (params.notifyPolicy) return params.notifyPolicystill wins. - Discord channels will see more messages per task (the goal).
Related / follow-up
- Discord typing watchdog.
typing-BhIpRSfR.jsis a one-shot 5s start; the 20-min wall-clock cap lives inmessage-handler.process-DO17vBlT.js:1003-1016. A task-state-driven watchdog that posts an explicit "still working" message after N seconds of no state event would close the residual case where a task is genuinely silent (e.g. tool with no progress emit). Worth a separate issue. - Codex child task visibility. Filed separately — the
@openclaw/codexnative subagent mirror is silent/not_applicable. Will link companion issue after filing. - CLI documentation.
openclaw subagents …does not exist (No built-in command or plugin CLI metadata owns "subagents"); the real surface isopenclaw tasks {cancel, flow cancel, notify}. Consider an alias or a doc clarification.
Workaround until merged
Operators can manually promote a silent / done_only task with:
openclaw tasks notify <taskId> state_changes
…which works via the existing updateTaskNotifyPolicyById runtime override (task-registry-CU9A1ECz.js:2446).
Sites that can patch the dist directly can apply the diff above plus requesterOrigin pass-through at both call sites as a local mitigation.
Environment: macOS, OpenClaw 2026.5.26, @openclaw/discord 2026.5.26, @openclaw/codex 2026.5.26, node 22.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
zacharyhofbauer commentedon May 28, 2026
Companion issue for codex-side native subagent visibility filed: #87666
clawsweeper commentedon May 28, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 24, 2026, 4:12 PM ET / 20:12 UTC.
Summary
Keep open: current main and v2026.6.10 still default deliverable tasks without an explicit notify policy to
done_only, the Discord subagent hook passes a Discord delivery origin but no task notify policy, and the direct fix PR is closed unmerged. The remaining decision is the owner seam and message-volume policy for Discord-visible task progress.Reproducibility: Do we have a high-confidence way to reproduce the issue? Yes from source: Discord-originated subagent registration can pass a requester origin and pending delivery without a notify policy, current registry defaulting makes that
done_only, and state-change delivery only fires forstate_changes.Root-cause cluster
Relationship:
canonicalCanonical: #87665
Summary: This issue is the canonical Discord-originated task notify-default report; related open items cover Codex-native child visibility, per-tool Discord progress, broader default-policy configuration, and Discord placeholder/heartbeat UX.
Members:
fixed_by_candidate: Fix Discord task notify default #87672 - Closed unmerged PR that directly attempted the Discord notify-default change but was blocked on the core-versus-Discord owner seam.partial_overlap: [@openclaw/codex] Native subagent mirror tasks are silent and not_applicable — operators can't see codex multi-agent activity #87666 - Companion report for Codex native subagent mirror tasks being silent; it shares the operator-visibility symptom but targets Codex mirror task creation rather than this core/Discord default.partial_overlap: [discord] streaming.mode=progress unconditionally suppresses per-tool Discord messages even when the preview lane stays empty, leaving operators blind on fast tool calls #87704 - Companion Discord visibility report for per-tool progress suppression; it affects the same operator-visible silence class but a different streaming/tool-progress path.partial_overlap: Feature: config-level default task notify policy #64081 - Broader config-level task notify policy request involving the samedone_onlydefault, but with a different cross-channel customization goal.adjacent_distinct: Discord: ship speculative "Thinking…" placeholder + typing heartbeat (parity with Slack #90017) #90866 - Discord placeholder and typing-heartbeat feature request addresses long-thinking feedback, not this task notify default.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Ways to help us reproduce this
Next step
Maintainer review is needed because the source-reproducible fix changes Discord-visible notification volume and must choose the core-versus-Discord ownership seam before implementation.
Review details
Best possible solution:
Choose the maintainer-approved policy seam, then make Discord-originated background task progress visible with focused coverage for Discord origin, unchanged non-Discord defaults, and explicit notify-policy preservation.
Do we have a high-confidence way to reproduce the issue?
Do we have a high-confidence way to reproduce the issue? Yes from source: Discord-originated subagent registration can pass a requester origin and pending delivery without a notify policy, current registry defaulting makes that
done_only, and state-change delivery only fires forstate_changes.Is this the best way to solve the issue?
Is this the best way to solve the issue? Unclear: the reporter's core-default patch matches the observed source path, but repository policy favors owner-specific channel behavior in the channel plugin or a generic seam rather than a Discord literal in core.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against f0f5da0e3941.
Label changes
Label changes:
clawsweeper:fix-shape-clear: Current issue advisory state no longer selects this label.Label justifications:
P2: The issue affects Discord operator visibility for background work, but the blast radius is limited to task notification policy and channel delivery UX.impact:message-loss: The reported failure suppresses visible nonterminal task progress messages in Discord until terminal status.Evidence reviewed
What I checked:
ensureNotifyPolicyignores requester origin and returnsdone_onlyfor any deliverable task without an explicit policy. (src/tasks/task-registry.ts:411, f0f5da0e3941)notifyPolicy === "state_changes", sodone_onlytasks do not emit progress updates. (src/tasks/task-executor-policy.ts:125, f0f5da0e3941)deliveryOriginfor a bound thread but does not set task notification policy. (extensions/discord/src/subagent-hooks.ts:155, f0f5da0e3941)requesterOriginanddeliveryStatus: "pending"intocreateRunningTaskRunwithoutnotifyPolicy, so the registry default applies. (src/agents/subagent-registry-run-manager.ts:685, f0f5da0e3941)done_onlyas the default notification policy, making a Discord-specific default change a maintainer-visible behavior decision. Public docs:docs/automation/tasks.md. (docs/automation/tasks.md:179, f0f5da0e3941)ensureNotifyPolicydefault and sameshouldAutoDeliverTaskStateChangegate, so the issue is not fixed in the latest release. (src/tasks/task-registry.ts:414, aa69b12d0086)Likely related people:
src/tasks/task-registry.tsand the extracted task delivery policy, including current task-registry changes and the delivery-policy extraction. (role: recent task delivery policy contributor; confidence: high; commits: 273eed4c51cb, d9a38130b1a8, 817ac551b655; files:src/tasks/task-registry.ts,src/tasks/task-executor-policy.ts)src/tasks/task-registry.ts,src/agents/subagent-registry-run-manager.ts)extensions/discord/src/subagent-hooks.ts)extensions/discord/src/subagent-hooks.ts)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.zacharyhofbauer commentedon May 28, 2026
Companion issue for Discord per-tool message visibility filed: #87704
Jackten commentedon Jul 29, 2026
I filed the separate residual-watchdog issue suggested in this report:
#115914.
It adds a WhatsApp production timeline, current-main source evidence, and a
channel-generic one-shot acceptance invariant: after a bounded interval with no
confirmed visible delivery, send one policy-aware status receipt; cancel it on
visible progress/final/abort; and serialize a final behind any in-flight routed
receipt. This complements the Discord
notifyPolicyfix here rather than changingits scope.
vincentkoc commentedon Jul 29, 2026
Fixed on current
main.Discord now defaults unset preview streaming to progress mode and has regression coverage for draft/final cleanup. Residual Discord progress or typing-state failures should be reported against the current implementation; the active related tracker is #115914.