Skip to content

fix: run workspace updates in interactive task#945

Draft
EhabY wants to merge 3 commits intomainfrom
fix/api-workspace-update-defaults
Draft

fix: run workspace updates in interactive task#945
EhabY wants to merge 3 commits intomainfrom
fix/api-workspace-update-defaults

Conversation

@EhabY
Copy link
Copy Markdown
Collaborator

@EhabY EhabY commented May 7, 2026

Summary

  • Runs coder update through an interactive VS Code task when CLI update is supported, so parameter prompts can be answered in a real terminal.
  • Keeps the existing API fallback for environments without CLI update support.
  • Returns the fresh workspace after update and carries it through the connection state machine before agent readiness checks.

Fixes #939.

Tests

  • pnpm test:extension ./test/unit/api/workspace.test.ts ./test/unit/remote/workspaceStateMachine.test.ts
  • pnpm typecheck
  • pnpm lint
  • pnpm format:check
  • pnpm build
Supporting plan and decision context

The issue is caused by coder update prompting for parameter values while the extension streams CLI output to a read-only VS Code OutputChannel.

Chosen approach: use a VS Code Task with ShellExecution for updates so the CLI keeps owning parameter resolution and prompts, while the extension can await task completion via vscode.tasks.onDidEndTaskProcess.

Why this path:

  • --use-parameter-defaults is insufficient because required parameters without defaults still need input and the flag is version-dependent.
  • Reimplementing dashboard-style parameter prompts in the extension is larger and risks diverging from CLI/API behavior, especially for dynamic parameters.
  • A VS Code task provides an integrated terminal and completion events, which is a better fit than a read-only output channel or a plain terminal without reliable completion detection.

Non-goals:

  • Do not change when the update happens; it still runs after window reload during remote setup.
  • Do not build a custom parameter editor in VS Code.
  • Do not change the coder start path.

Generated by Coder Agents.

@EhabY EhabY changed the title fix: update workspaces via API defaults fix: prompt for workspace update parameters May 7, 2026
@EhabY EhabY changed the title fix: prompt for workspace update parameters fix: run workspace updates in interactive task May 8, 2026
@EhabY EhabY self-assigned this May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't provide values/input for new workspace parameters when updating via extension pop-up?

1 participant