feat(discord): show subagent progress#95604
Conversation
|
Codex review: needs changes before merge. Reviewed July 17, 2026, 6:46 AM ET / 10:46 UTC. Summary PR surface: Source +1256, Tests +1151, Docs +19, Generated 0. Total +2426 across 32 files. Reproducibility: not applicable. this is a new opt-in Discord capability rather than a report of broken established behavior. The relevant review path is the supplied live Discord demonstration plus source-level lifecycle inspection. Review metrics: 3 noteworthy metrics.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Keep the generic event and plugin-owned Discord implementation, but dispatch started and ended presentation outside the accepted-spawn and canonical terminal critical paths through a bounded, serialized best-effort queue, with regression tests proving a never-resolving hook cannot delay lifecycle completion. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a new opt-in Discord capability rather than a report of broken established behavior. The relevant review path is the supplied live Discord demonstration plus source-level lifecycle inspection. Is this the best way to solve the issue? No, not yet: the generic event and Discord-owned presentation are the right architecture, but awaiting best-effort presentation inside core spawn and terminal lifecycle paths is not the safest implementation boundary. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d7056abbc81e. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +1256, Tests +1151, Docs +19, Generated 0. Total +2426 across 32 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (40 earlier review cycles; latest 8 shown)
|
abf892f to
f48f9f1
Compare
f73f56c to
6013499
Compare
2038b32 to
b608094
Compare
0af41a8 to
6a286e0
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. |
024fd0a to
a1bdc8f
Compare
d17f593 to
20a11bf
Compare
20a11bf to
0f0ea76
Compare
Co-authored-by: Kyle Klouzal <[email protected]>
Co-authored-by: Kyle Klouzal <[email protected]>
|
Merged via squash.
|
What Problem This Solves
Discord users can see a parent turn as idle while tracked subagents are still running. The source message provides no compact indication of concurrent child work or terminal failure.
Why This Change Was Made
Core now emits one generic typed
subagent_progresspresentation event with source-message provenance. The Discord plugin maps that portable event to typing plus one count reaction, and retains a red reaction after a non-OK child outcome. One opt-in switch,channels.discord.subagentProgress, controls the behavior; emoji, cadence, and the one-hour typing bound remain internal defaults.The maintainer rewrite deliberately keeps transport policy in Discord, routes native and tracked ACP spawns through the same core lifecycle, and persists only Discord reaction ownership and terminal outcome in plugin SQLite. Durable rows make count cleanup and failure presentation retry-safe across response loss and gateway restart without blocking subagent lifecycle delivery. Progress runtime code remains behind its own lazy import so the public Discord API and unrelated subagent hooks do not increase lightweight CLI startup memory.
User Impact
When enabled, the Discord source message shows
1️⃣through🔟as tracked child concurrency changes, removes the count after the final child ends, keeps typing active for up to one hour, and leaves🔴for error, timeout, or killed outcomes. Other channels ignore the generic event and keep current behavior.Evidence
node scripts/run-vitest.mjs extensions/discord/src/subagent-hooks.test.ts extensions/discord/src/subagent-progress.test.ts src/agents/subagent-registry.persistence.test.ts src/plugins/wired-hooks-subagent.test.ts— 90 passed across three shards.node --max-old-space-size=8192 --import tsx scripts/generate-plugin-sdk-api-baseline.ts --check— baseline current.git diff --check— clean.No linked issue. No changelog edit per maintainer instruction.