fix(coderd): use BuildReasonTaskAutoPause for task workspaces by johnstcn · Pull Request #22126 · coder/coder

@johnstcn

When a workspace with a TaskID hits its deadline, use BuildReasonTaskAutoPause
instead of BuildReasonAutostop. This allows downstream systems to distinguish
between regular autostop and task workspace pauses.

@johnstcn self-assigned this

Feb 16, 2026

johnstcn

@johnstcn johnstcn changed the title fix(autobuild): use BuildReasonTaskAutoPause for task workspaces fix(coderd): use BuildReasonTaskAutoPause for task workspaces

Feb 16, 2026

@johnstcn

@johnstcn johnstcn marked this pull request as ready for review

February 17, 2026 12:47

Copilot AI review requested due to automatic review settings

February 17, 2026 12:47

@johnstcn

- Add task_auto_pause to buildReasonLabels with label 'Task Auto-Pause'
- Add task_auto_pause to systemBuildReasons array
- Add task_auto_pause to getDisplayWorkspaceBuildInitiatedBy (returns 'Coder')
- Add test case for task_auto_pause in getDisplayWorkspaceBuildInitiatedBy
- Update TaskPausedTimeout story to use task_auto_pause reason

mafredri

DanielleMaywood

@johnstcn

@johnstcn

@johnstcn johnstcn deleted the cj/task-lifecycle-autopause branch

February 17, 2026 15:11