Skip to content

agentHost: improve update pickup and fix startup-failure wedge#313541

Merged
connor4312 merged 1 commit into
mainfrom
connor4312/agent-host-update-improvements
Apr 30, 2026
Merged

agentHost: improve update pickup and fix startup-failure wedge#313541
connor4312 merged 1 commit into
mainfrom
connor4312/agent-host-update-improvements

Conversation

@connor4312
Copy link
Copy Markdown
Member

Two fixes to the agent host update logic in cli/src/tunnels/agent_host.rs:

  1. Shorten background update check interval from 24h to 6h. Newly published server versions are picked up sooner after the server auto-shuts down (via --enable-remote-auto-shutdown).

  2. Fix startup-failure wedge. When the child server process exited before signaling readiness, run_server would still store the (now-dead) Child into self.running and skip spawning the cleanup task. From then on running.is_some() was permanently true, so ensure_server would forever return the original opener's Err and never attempt a restart. The child is now left out of running on the early-exit path; self.ready still has the Err for the original caller, but subsequent ensure_server calls fall through to a fresh start_server.

No synchronous update check is added on the connection path, to keep boot time fast.

- Shorten background update check interval from 24h to 6h so newly
  published server versions are picked up sooner after auto-shutdown.
- Don't store the child into self.running when it exits before signaling
  ready. Previously a failed startup left a dead child in running
  forever, wedging ensure_server() so it could never restart the server.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 30, 2026 17:14
@connor4312 connor4312 enabled auto-merge (squash) April 30, 2026 17:14
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.

Copilot's findings

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

@connor4312 connor4312 merged commit cdf20ff into main Apr 30, 2026
44 of 45 checks passed
@connor4312 connor4312 deleted the connor4312/agent-host-update-improvements branch April 30, 2026 17:44
@vs-code-engineering vs-code-engineering Bot added this to the 1.119.0 milestone Apr 30, 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