Repository navigation
Labels
Description
Repo: coder/coder
Scope: When user sends a message to a paused task, automatically resume and deliver.
Changes:
- Attempt to send message via
POST /tasks/{task}/send - If 409 response (task paused):
- Store message in component state (not persisted)
- Call
POST /tasks/{task}/resumeendpoint - Poll task status until active or build fails (see Polling logic below)
- Show build progress indicator with workspace build details
- Retry send with stored message when task is active
- Clear stored message on successful send
- Transition to live chat interface
Polling logic:
- Poll task status every 5 seconds
- Exit when
task.Status === "active"(workspace running, agent ready, AgentAPI responding) - Exit on terminal build failure (build job status is failed/canceled)
Local state handling:
- Message stored in component state during resume (not persisted)
- Message persists in input field during resume (user sees what they typed)
- Message cleared from state on successful send
- Message kept in input field on error (user can edit and retry)
- Message lost if user navigates away (acceptable - no warning needed, standard web behavior)
Error handling:
- 409 on send, resume build fails: Show build error modal, keep message in input field for retry
- 409 on send, resume succeeds, retry send fails: Show "Failed to send message" error, keep message in input field for retry
- Non-409 send error: Show send error (network/AgentAPI issue), keep message in input field
Files:
site/src/pages/TaskPage/TaskPage.tsx
Acceptance criteria:
- Send to active task works normally (no change in behavior)
- Send to paused task receives 409, triggers resume, waits for active, retries send
- Message remains visible in input field during entire resume process
- Build progress indicator shown during resume with workspace build status
- Polling exits when task.Status === "active" and send succeeds
- Terminal build failure stops polling, shows build error, preserves message
- Retry send failure after successful resume shows send error, preserves message
- Successful send clears message from input and transitions to live chat
- User can navigate away during resume (message lost, no warning - standard behavior)
Dependencies:
References:
Activity
SasSwart commentedon Feb 25, 2026
Update:
After consultation with @jakehwll and @mafredri, I've implemented this first iteration:
Screen.Recording.2026-02-25.at.10.44.45.mov
I'm still verifying that it behaves exactly as intended.
SasSwart commentedon Feb 25, 2026
Update:
Testing this on a running system has brought a few issues to light. I'm working through them.
When resuming a task, this is what the build status indicator looks like:
This is consistent with the Edit Prompt experience and communicates clearly.
SasSwart commentedon Feb 25, 2026
The happy path has been implemented here:
coder/coder#22302
This effort was assisted by an LLM. I am reviewing the results before requesting external review.
SasSwart commentedon Feb 26, 2026
Update:
Digging into the weeds of the PR have been slow-going. Tedious bits include:
I'm still working through getting the PR completely ready for review, but getting closer.
SasSwart commentedon Mar 2, 2026
Update:
The PR has now been handed over for review.
feat: allow sending follow-up prompts to a task when resuming (#22302)