fix(discord): avoid duplicate typing keepalive for tool replies#84288
fix(discord): avoid duplicate typing keepalive for tool replies#84288dr00-eth wants to merge 1 commit into
Conversation
|
Codex review: needs maintainer review before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. Source inspection shows current main wires both the shared typing controller and Discord callback keepalive, and the PR body supplies live Discord after-fix log evidence; I did not run live Discord in this read-only review. PR rating Rank-up moves:
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. PR egg Rarity: 🥚 common. What is this egg doing here?
Real behavior proof Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the scoped Discord fix if maintainers accept the message-tool-only typing UX tradeoff and coordinate merge order with the broader Discord typing lifecycle PR. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main wires both the shared typing controller and Discord callback keepalive, and the PR body supplies live Discord after-fix log evidence; I did not run live Discord in this read-only review. Is this the best way to solve the issue? Yes, with maintainer acceptance of the UX tradeoff. The follow-up scopes one-shot typing to Discord message-tool-only runs without explicit typingMode while preserving shared defaults, which is the narrow maintainable fix path. Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 3d96111a5afe. |
5e8971f to
3439ab1
Compare
|
@clawsweeper re-review Follow-up for the compatibility/rank-up note is pushed in What changed:
Validation:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
message_tool_onlyruns, and disable the Discord plugin's nested callback keepalive.typingKeepalive?: booleanto reply options, kept shared reply typing periodic by default, passtypingKeepalive: falsefrom Discord only whensourceReplyDeliveryMode === "message_tool_only"and no explicittypingModeis configured, and set the Discord channel callback keepalive interval to0.agents.defaults.typingMode/session.typingModecontinues to win, non-Discord channels keep the existing shared keepalive default unless they opt out, typing is not disabled by default, ack reactions are unchanged, and this does not add a Discord "stop typing" call because Discord does not expose one.Motivation
messagetool delivery. That made it look as if a second response was still being generated even when the transcript showed no fallback or second assistant run.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
#founders-club(channel id ending5258), Pi runtime,openai/gpt-5.5,messages.groupChat.visibleReplies: "message_tool".#founders-club.1506376771032056000.gpt-5.5tool call at2026-05-19T19:23:44.803Z.2026-05-19T19:23:45.823Z.messagetool result at2026-05-19T19:23:45.982Zwith primary Discord message id1506376839398952981.pnpm build && pnpm check && pnpm test; I ran focused validation for the touched auto-reply and Discord extension surfaces.Root Cause (if applicable)
messagetool, a late refresh can outlive the actual response and appear as phantom typing.Regression Test Plan (if applicable)
src/auto-reply/reply/reply-utils.test.tsextensions/discord/src/monitor/message-handler.process.test.tstypingModepreserves the core keepalive path.User-visible / Behavior Changes
typingMode, OpenClaw still sends the initial typing cue but does not periodically refresh it. Explicitly configured typing behavior and non-Discord shared defaults are preserved.Diagram (if applicable)
Security Impact (required)
Yes/No): NoYes/No): NoYes/No): NoYes/No): NoYes/No): NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
openai/gpt-5.5, Pi runtimemessages.groupChat.visibleReplies: "message_tool", no explicittypingModeSteps
message(action=send).Expected
Actual
Evidence
Focused validation run on this branch:
Human Verification (required)
sourceReplyDeliveryMode === "message_tool_only"and typing mode is not configured.Review Conversations
Compatibility / Migration
Yes/No): YesYes/No): NoYes/No): NoRisks and Mitigations
agents.defaults.typingModeorsession.typingModecontinues to opt into configured behavior; non-Discord channels keep their existing shared keepalive default unless they explicitly opt out.