Skip to content

Commit a2807c8

Browse files
steipetekklouzal
andcommitted
feat(discord): show subagent progress
Co-authored-by: Kyle Klouzal <[email protected]>
1 parent c45f299 commit a2807c8

29 files changed

Lines changed: 2185 additions & 37 deletions
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
6aed79bb0351969499e9b40d633e95fea5bf44bf234dda2b9b6d73111a96867d config-baseline.json
1+
7e2d3ce0932179c218864f7a63c9da1aa9ed3034de01c9fb5dde10d6ff3ea6bc config-baseline.json
22
337632b33a9e0c27c5e4f1ed8229216e9a0a54d3f277d95d0782840f4e1ae4f9 config-baseline.core.json
3-
52702a2f7628ea48bf6abc610bea6883c40212de11b48daf0eabeb1306c3dd46 config-baseline.channel.json
4-
f2cf8f2902c8ad988534579448c28a0f8fc8252110f8c03bc34bf0cb9448224c config-baseline.plugin.json
3+
1ee7c7174c60665a6da1f89b04def531c25ff4e1598c780cf411e81acc93e844 config-baseline.channel.json
4+
47479855ebbdf8c696298483a59848b26e767bfdd1d5439e18478cc804ab6171 config-baseline.plugin.json

docs/channels/discord.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,25 @@ See [Slash commands](/tools/slash-commands) for the command catalog and behavior
790790

791791
</Accordion>
792792

793+
<Accordion title="Subagent progress on the source message">
794+
Set `channels.discord.subagentProgress: true` to show background child activity on the Discord message that started the parent run.
795+
796+
```json5
797+
{
798+
channels: {
799+
discord: {
800+
subagentProgress: true,
801+
},
802+
},
803+
}
804+
```
805+
806+
While child runs are active, OpenClaw keeps Discord typing active and replaces one count reaction (`1️⃣` through `🔟`) as the concurrent count changes; `🔟` also represents 10 or more. The count reaction is removed after the final child ends. A failed, timed-out, or killed child leaves a `🔴` reaction.
807+
808+
This is opt-in and uses fixed internal timing and emoji defaults. The bot needs **Add Reactions** permission for reaction feedback. Account-level `channels.discord.accounts.<id>.subagentProgress` overrides the top-level value.
809+
810+
</Accordion>
811+
793812
<Accordion title="Persistent ACP channel bindings">
794813
For stable "always-on" ACP workspaces, configure top-level typed ACP bindings targeting Discord conversations.
795814

extensions/discord/src/config-ui-hints.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ export const discordChannelConfigUiHints = {
115115
label: "Discord Thread Spawn Context",
116116
help: 'Default native subagent context for thread-bound spawns. "fork" starts from the requester transcript; "isolated" starts clean. Default: "fork".',
117117
},
118+
subagentProgress: {
119+
label: "Discord Subagent Progress",
120+
help: "Show active subagent count reactions and typing on the source message. Default: false.",
121+
},
118122
"ui.components.accentColor": {
119123
label: "Discord Component Accent Color",
120124
help: "Accent color for Discord component containers (hex). Set per account via channels.discord.accounts.<id>.ui.components.accentColor.",

extensions/discord/src/subagent-hooks.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ import {
1717
unbindThreadBindingsBySessionKey,
1818
} from "./monitor/thread-bindings.js";
1919

20+
export {
21+
handleDiscordSubagentProgress,
22+
recoverDiscordSubagentProgress,
23+
} from "./subagent-progress.js";
24+
2025
function summarizeError(err: unknown): string {
2126
if (err instanceof Error) {
2227
return err.message;

0 commit comments

Comments
 (0)