Skip to content

bug: coder start does not respect template's require_active_version setting #22030

@uzair-coder07

Description

@uzair-coder07

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When a template has Require workspaces automatically update when started enabled (require_active_version = true), running coder start from the CLI (or via the VS Code extension, which calls coder start under the hood) starts the workspace with the old template version instead of updating to the active template version.

The web UI and server-side autostart correctly enforce the update, but the CLI does not.

Impact:
This also affects the VS Code Coder extension (tested with v1.12.2), which calls coder start --yes to start workspaces. Organizations relying on require_active_version to enforce template updates on start will find that the policy is not enforced when workspaces are started via the CLI or VS Code extension.

Relevant Log Output

N/A

Expected Behavior

coder start should update the workspace to the active template version before starting, matching the behavior of the web UI and server-side autostart.

Steps to Reproduce

  1. Create a template with Require workspaces automatically update when started enabled
  2. Create a workspace from the template
  3. Push a new version to the template
  4. Stop the workspace
  5. Run coder start <owner>/<workspace> from the CLI
  6. Observe that the workspace starts with the old template version

Environment

  • Host OS:
  • Coder version: 2.25.6, 2.26.6, 2.28.6, and 2.29.6 - Tests were performed on these versions but this issue predates these versions.

Additional Context

No response

Metadata

Metadata

Assignees

Labels

must-doIssues that must be completed by the end of the Sprint. Or else. Only humans may set this.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions