Skip to content

fix: pause queued sends when plan/user-input response is required #428

@amanthanvi

Description

@amanthanvi

Summary

When an agent returns a plan ready for approval/changes (or asks for request-user-input), any queued messages can auto-send immediately once the turn goes idle. This causes the agent to continue based on queued messages instead of waiting for the user to accept/modify the plan or answer the question.

Repro

  1. Ensure Collaboration modes are enabled (Settings → Features).
  2. Select a collaboration mode that produces a plan (e.g. Plan).
  3. Send a prompt that makes the agent generate a plan.
  4. While the agent is processing, queue one or more messages (e.g. Tab-to-queue when Steer mode is enabled, or Enter-to-queue when Steer mode is disabled).
  5. When the plan output arrives and the UI shows “Plan ready” (accept/changes follow-up), observe that queued messages may auto-send immediately.

Result

Queued messages can advance the conversation and the “Plan ready” follow-up disappears, even though the user hasn’t responded to the plan yet.

Expected

  • When a Plan ready follow-up is waiting, queued-message auto-flush should pause until the user explicitly responds (accept or submit changes / any new user message).
  • When a request-user-input prompt is active, queued-message auto-flush should pause until the user submits answers.

Proposal

  • Add an app-wide setting (default ON): “Pause queued messages when response required”.
  • Implement as a gate on the queue auto-flush loop (see src/features/threads/hooks/useQueuedSend.ts).
  • Show a small UI hint in the queue list while paused (e.g. “Paused — waiting for plan accept/changes.”).

Relevant code paths

  • Queue auto-flush: src/features/threads/hooks/useQueuedSend.ts
  • Plan follow-up UI: src/features/messages/components/Messages.tsx + src/features/app/components/PlanReadyFollowupMessage.tsx
  • Plan accept/changes messages: src/features/app/hooks/usePlanReadyActions.ts + src/utils/internalPlanReadyMessages.ts
  • Request-user-input plumbing: src/features/threads/hooks/useThreadUserInput.ts + src/features/messages/components/Messages.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions