feat(site): add pause/resume actions to task page by EhabY · Pull Request #21952 · coder/coder

DanielleMaywood

DanielleMaywood

mafredri

Add the ability to pause a running task and resume a paused task directly
from the TaskPage. This includes showing contextual messages when a task
is paused (manual vs timeout) and proper error handling with dialogs for
API errors.

- Extract task action logic into reusable hooks (useTaskActions.ts)
- Add mutation configs for custom error handling scenarios
- Move TaskActionButton to modules/tasks for better organization
- Add pause button to TaskStartingAgent component
- Show appropriate state messages for transitioning states (pausing,
  canceling, deleting)
Move pauseTask/resumeTask mutation configs from useTaskActions.ts hook
wrappers into api/queries/tasks.ts, following the codebase convention of
defining mutation configs in api/queries/ and using useMutation inline.

@EhabY

@EhabY

@EhabY EhabY deleted the show-pause-resume-in-task-page branch

February 9, 2026 20:37