Skip to content

[Fix] Discord request_user_input pauses again after user answers#583

Merged
mrubens merged 3 commits into
developfrom
fix/discord-request-user-input-2xiyizeolznbn
Jul 19, 2026
Merged

[Fix] Discord request_user_input pauses again after user answers#583
mrubens merged 3 commits into
developfrom
fix/discord-request-user-input-2xiyizeolznbn

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Opened on behalf of Matt Rubens. Follow up by mentioning @roomote-roomote, in the web UI, or in Discord.

What changed

Discord now supports structured request_user_input the way Slack does:

  • When an agent asks a structured question, Roomote posts a Discord prompt with option buttons (and cancel)
  • Thread replies like minor / 1 / option labels are parsed against the pending prompt
  • Button clicks are validated against the active request and queued as structured answers
  • Workers deliver those answers to the harness before treating the reply as a plain follow-up
  • Concurrent answers use a Slack-style atomic Redis claim so only one reply can mark the prompt submitted and enqueue into the harness

This fixes the release-flow failure where answering “Minor” still left the agent paused waiting for the bump level.

Why this change was made

Discord had lifecycle tools and guidance for request_user_input, but no end-to-end rendering/answer path. The harness stayed blocked on the OpenCode question tool while Discord only forwarded plain text, so the agent often re-asked after the user had already answered.

Impact

On Discord-started tasks, structured questions can be answered in-thread via buttons or text and the run resumes, matching Slack’s behavior for the common single-question case. Multi-question prompts accept one answer per line of text; option buttons are limited to single-question prompts.

mrubens added 2 commits July 19, 2026 14:25
Post structured prompts with option buttons in Discord, queue answers from
text replies and button clicks, and deliver them to the harness so agents
resume instead of re-asking after replies like "Minor".
@roomote-roomote

roomote-roomote Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

No code issues found. See task

  • apps/api/src/handlers/discord/request-user-input.ts:76 The answer queue and submitted state are now claimed atomically with the submitted state, and only the winning claim updates actingUserId.

Reviewed 1943229

Use a Slack-style Redis compare-and-set so concurrent Discord replies cannot
both enqueue an answer and flip submitted state before the harness resumes.
@mrubens
mrubens marked this pull request as ready for review July 19, 2026 14:49
@mrubens
mrubens merged commit d9d9b7e into develop Jul 19, 2026
18 checks passed
@mrubens
mrubens deleted the fix/discord-request-user-input-2xiyizeolznbn branch July 19, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant