Skip to content

Tasks: Resume endpoint #1262

Closed
coder/coder
#21948
Closed

Description

@mafredri

Repo: coder/coder

Scope: Add API endpoint for resuming a paused task.

Changes:

  • Add POST /api/v2/tasks/{user}/{task}/resume endpoint
  • Triggers workspace start with task_resume build reason
  • Returns workspace build info for progress tracking
  • Validates task is in resumable state (must be paused)

Files:

  • coderd/aitasks.go
  • codersdk/aitasks.go
  • coderd/coderd.go (route registration)

Acceptance criteria:

  • Endpoint triggers workspace start build
  • Build reason is task_resume
  • Returns 409 if task not paused
  • Returns build ID/info for progress tracking
  • Authorization checks task ownership

Dependencies:

References:

Activity

  1. added theissue type on Jan 15, 2026
  2. assigned and unassigned on Jan 21, 2026
  3. SasSwart commented on Feb 6, 2026

    @SasSwart

    Update:

    • We've pushed an initial implementation as a draft PR.
    • Review feedback from the predecessor of this ticket will apply here as well, promising a faster resolution.
    • TODO: Implement tests
    • Based on progress made, I'm downgrading complexity for this issue to a 1. 2 points have already been accomplished this sprint.
  4. SasSwart commented on Feb 9, 2026

    @SasSwart

    Update:

    • All tests have been implemented and pass.
    • The endpoint is now functional.
    • Remaining work is non-functional in nature:
      • ensure that different kinds of testing is done at appropriate abstraction layers (cc @mafredri)
      • ensure pause and resume endpoints are factored to not contain unwanted duplicate code
  5. SasSwart commented on Feb 10, 2026

    @SasSwart

    Update:

    Given that:

    • the tests already functionally prove the endpoint
    • other tickets are blocked by this one

    We agreed in standup to split the testing refinements into their own PR so that we can unblock the other tickets. My primary focus today will be these testing refinements.

    The PR to implement this endpoint and unblock others has received review from @DanielleMaywood, and is now blocked by review/approval from @mafredri.

  6. SasSwart commented on Feb 10, 2026

    @SasSwart

    Update:

    • I've made good progress on refining the tests, but it is still WIP.
    • A comment from @mafredri has brought light to previously unknown scope in this issue. Task status is more complex than previously anticipated. I will look into this in more detail once done with the test refinements.
  7. SasSwart commented on Feb 12, 2026

    @SasSwart

    While the endpoint has been implemented, I'm still working on test quality and assessing task status management. So I'm opening the issue back up. Its not done yet.

  8. SasSwart commented on Feb 17, 2026

    @SasSwart

    Update:

    I lost a day due to illness yesterday. This is my current top priority.
    Bringing newer tests in line with the minutiae of existing tests has proven both nebulous and tedious.
    I am requesting synchronous assistance from @mafredri to help resolve the testing feedback.

  9. SasSwart commented on Feb 20, 2026

    @SasSwart

    Update:

    The unanticipated complexity involved in standardising the tests, considered alongside the fact that existing tests do functionally cover the feature, have convinced me to create a new issue to track the testing concerns specifically.

    I've opened this issue: #1362
    Which tracks this PR: coder/coder#22021

    Pause/Resume for tasks will release regardless of the test maintenance, so it does not make sense to artificially extend this issue.

  10. mafredri commented on Feb 20, 2026

    @mafredri
    MemberAuthor

    @SasSwart Thanks for the update, I've gone ahead and added that one under maintenance section in #1248 so we can continue tracking the related work in one place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions