Skip to content

feat(cli): add coder task resume command#22066

Merged
DanielleMaywood merged 4 commits intomainfrom
danielle/coco-3-tasks-cli-resume-command
Feb 17, 2026
Merged

feat(cli): add coder task resume command#22066
DanielleMaywood merged 4 commits intomainfrom
danielle/coco-3-tasks-cli-resume-command

Conversation

@DanielleMaywood
Copy link
Contributor

@DanielleMaywood DanielleMaywood commented Feb 12, 2026

Complements #22012 by adding a coder task resume command

Closes COCO-3 / Closes coder/internal#1264

@DanielleMaywood DanielleMaywood force-pushed the danielle/coco-3-tasks-cli-resume-command branch 3 times, most recently from f7dd0e9 to 2427bca Compare February 13, 2026 14:24
@DanielleMaywood DanielleMaywood force-pushed the danielle/coco-3-tasks-cli-resume-command branch from 2427bca to d3998d8 Compare February 13, 2026 15:41
@DanielleMaywood DanielleMaywood changed the title feat(cli): task resume command feat(cli): add coder task resume command Feb 13, 2026
@DanielleMaywood DanielleMaywood marked this pull request as ready for review February 13, 2026 16:32
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! My main concern is around blocking resumption unless paused, which can lead to some user desperation (see comment). It could perhaps be resolved by an actionable error message for now.


display := fmt.Sprintf("%s/%s", task.OwnerName, task.Name)

if task.Status != codersdk.TaskStatusPaused {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some other states that we need to figure out how the user can resolve, e.g.:

  • Error (this could mean the workspace build failed, or is cancelled)
  • Unknown (unexpected state)

We don't necessarily have to solve them in resume, but we do need to figure out how we tell users to escape these situations. Ideally the error message would help here. Off the top of my head, resume could auto-resolve, or suggest pausing first. Or perhaps we need to tell them to go manage the workspace build directly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Status Can resume? Action
pending no none
initializing no none
active no none
paused yes resume
unknown no investigate
error no investigate

For pending / initializing / active, resume is a no-op.
For unknown and error, I guess we want to direct the user to investigate / troubleshoot?

- Move `resp.WorkspaceBuild` check further up
- Inline `if err = cliui.WorkspaceBuild`
- Be consistent with task display format
- More user friendly "resuming task in background" message
@coder-tasks
Copy link
Contributor

coder-tasks bot commented Feb 16, 2026

Documentation Check

Updates Needed

  • docs/ai-coder/cli.md - Add link to new task resume command in the CLI reference list (also missing task pause which exists but is not listed)

    ⚠️ Still not addressed - the file currently lists: create, delete, list, logs, send, status but is missing both pause and resume

The auto-generated CLI reference documentation (docs/reference/cli/task_resume.md) and manifest updates are already included in this PR. However, the Tasks CLI overview page at docs/ai-coder/cli.md should be updated to include both the existing task pause and new task resume commands in its list of CLI reference links for completeness.


Automated review via Coder Tasks

@DanielleMaywood DanielleMaywood merged commit d737f8c into main Feb 17, 2026
29 checks passed
@DanielleMaywood DanielleMaywood deleted the danielle/coco-3-tasks-cli-resume-command branch February 17, 2026 16:24
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tasks: CLI resume command

3 participants