**Repo**: `coder/coder` **Scope**: Modify send endpoint to return 409 Conflict when task is paused, enabling client-side auto-resume. **Changes**: - Modify `POST /api/v2/tasks/{user}/{task}/send` to check task/workspace status early - Return 409 Conflict with clear error message if task is paused - Error response should indicate task is paused and suggest resuming **Files**: - `coderd/aitasks.go` **Acceptance criteria**: - [ ] Returns 409 when task is paused - [ ] Error message clearly indicates task is paused - [ ] Existing behavior unchanged for active tasks - [ ] Response includes enough information for clients to auto-resume and retry send **Dependencies**: - #1262 <!-- Issue 11 --> **References**: - [PRD: Start/Pause/Resume the Task Workspace](https://www.notion.so/coderhq/Start-Pause-Resume-the-Task-Workspace-2aad579be59280e5a15ef6bb6a93f246) - [RFC: Tasks: Start/Pause/Resume Lifecycle](https://www.notion.so/coderhq/Tasks-Start-Pause-Resume-Lifecycle-2cdd579be592805a929fc36d0c82d65d): API Changes (Modified endpoints), Auto-Resume Option A
Activity
feat(coderd): return 409 Conflict for non-active task states (#21887)