Skip to content

cli: support pinning initial agent host version for upgrade testing#319671

Merged
connor4312 merged 2 commits into
mainfrom
connor4312/agent-host-initial-version-override
Jun 3, 2026
Merged

cli: support pinning initial agent host version for upgrade testing#319671
connor4312 merged 2 commits into
mainfrom
connor4312/agent-host-initial-version-override

Conversation

@connor4312
Copy link
Copy Markdown
Member

  • There was no way to exercise the agent host upgrade flow locally, since the CLI always starts the latest server version and has nothing older to upgrade from.
  • Adds a VSCODE_CLI_INITIAL_AH_VERSION env var that pins the commit the agent host is first downloaded and started at, while leaving subsequent upgrades to resolve the real latest version, so the full download + restart upgrade path can be driven on demand.

(Commit message generated by Copilot)

- There was no way to exercise the agent host upgrade flow locally, since
  the CLI always starts the latest server version and has nothing older to
  upgrade from.
- Adds a VSCODE_CLI_INITIAL_AH_VERSION env var that pins the commit the
  agent host is first downloaded and started at, while leaving subsequent
  upgrades to resolve the real latest version, so the full download +
  restart upgrade path can be driven on demand.

(Commit message generated by Copilot)
Copilot AI review requested due to automatic review settings June 3, 2026 03:28
@connor4312 connor4312 enabled auto-merge (squash) June 3, 2026 03:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an opt-in mechanism to help locally exercise the agent host upgrade path by pinning the initial resolved/downloaded agent host commit (via VSCODE_CLI_INITIAL_AH_VERSION), while allowing later upgrade checks to resolve the real latest version.

Changes:

  • Introduces VSCODE_CLI_INITIAL_AH_VERSION and helper initial_agent_host_version().
  • Ensures the first version resolution honors the override even when cached server versions exist.
  • Caches/logs the override-backed Release on first resolution, then resumes normal “latest” resolution thereafter.
Show a summary per file
File Description
cli/src/tunnels/agent_host.rs Adds env-var driven “initial commit” override and adjusts first-resolution logic so upgrade testing can start from an older downloaded agent host.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread cli/src/tunnels/agent_host.rs
Addresses PR review: the env var value flows into URL and filesystem
paths, so restrict it to hex digits (and trim whitespace) to prevent
path separators or traversal sequences.
@connor4312 connor4312 merged commit 8d1fba1 into main Jun 3, 2026
25 checks passed
@connor4312 connor4312 deleted the connor4312/agent-host-initial-version-override branch June 3, 2026 04:41
@vs-code-engineering vs-code-engineering Bot added this to the 1.124.0 milestone Jun 3, 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.

3 participants