Repository navigation
fix(agent): allow a remote update when the offer is not downloaded yet - #1424
Merged
Merged
Conversation
A paired computer whose verified update was Available but not yet downloaded showed "A verified update is not ready" and a disabled "Update remotely…" button. The version difference was never the block: every layer required the execution computer's updater to be Ready. Now an unblocked Available offer can be requested. The execution desktop downloads and verifies that exact candidate through its ordinary updater before it stops anything, publishes the resulting Ready status on the command's own lease, checks admission again, and only then takes the existing stop-and-install path. A failed download restores the Available offer (no local error banner, retry stays possible) and records a controlled "could not download or verify" receipt. Hosts advertise remote_update_download_v1. Older hosts (0.0.16 and earlier) report Available as not ready; the controller still asks them, they refuse before admitting any work, and the controller says the update must be downloaded on that computer first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AnthonyRonning
force-pushed
the
codex-rupd-remote-download
branch
from
November 2, 2026 01:48
b205452 to
ddad97c
Compare
AnthonyRonning
marked this pull request as ready for review
November 2, 2026 04:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A paired computer whose verified update was Available (offered, not yet downloaded) showed "A verified update is not ready on this computer." and a disabled Update remotely… button. The client/remote version difference was never the block; every layer (
Controller::remote_status, the client'sinstall_blocked, the controller's re-probe, host admission and the desktop'smay_begin) required the execution computer's updater to be Ready.Now an unblocked Available offer can be requested:
desktop/remote_updates.rs,update.rs):may_beginreturnsInstall(Ready, unchanged path),Download(Available, not manual-only) orRefuse. ForDownload,Controller::download_remotedownloads and verifies exactly the requested candidate through the ordinary updater (download_inner: signed envelope, package staging), while this computer keeps working. Nothing is closing and no restart prompt is shown yet. Only a Ready snapshot for the sameReleaseIdentitycontinues. The desktop then publishes that status on the command's own lease and checks admission again (account, store, quitting, local restart prompt). After that it takes the existing stop-and-install path, which revalidates the feed and keeps every typed-stop check.remote_updates.rs): requests admit an unblocked Ready or Available offer with the exact target (admits_request). The typed stop (authorize_stop) still requires a published Ready/Installing offer. That is why the desktop publishes after the download. Publications now read the updater snapshot after taking the registration lock, so an older snapshot cannot overwrite a newer one.remote_update_download_v1.PROTOCOL_VERSIONstays7.1.0, following Agent: summarize tool calls as they start #1261 (tool_summary_start_v1): capabilities, not minors, gate behaviour.UpdateNotReady. The controller still lets you ask (PeerInfo::install_requestable). The old host refuses in its broker before creating a receipt, so nothing is queued, stopped or left stuck. The controller maps that refusal toInstallRefusal::DownloadRequired: "That computer must download the update first. Turn on automatic downloads there, or update it locally." A new status check is required before asking again, the same as for every other declined request.Unchanged: exact candidate binding at every hop, no replay, fail-closed revalidation, refusal for password-protected computers, receipts, and the confirmation dialog.
Screenshots
These come from a local-only preview build with mocked
PeerInfo(no real update feed in Dev builds). The preview hook is not committed.Before (master): Available, button disabled

After: Available, Update remotely… enabled

Older host asked anyway: short, definite refusal (the reply is simulated in the preview; the mapping is

remote/manager.rs)Tests
just ci(fmt, clippy-D warningsfor every feature set, workspace tests, headless tests): green. The pre-commit hook (ci-lint+ci-test) also passed.update::tests::remote_download_prepares_only_the_exact_available_candidatefailed_remote_download_restores_the_retryable_offer_without_a_local_errorremote_download_refuses_changed_busy_or_manual_offers_without_downloadingdesktop::remote_updates::tests::an_available_offer_is_downloaded_before_anything_is_stoppeda_failed_download_reports_its_controlled_reason_oncethe_downloaded_offer_is_published_only_on_the_commands_own_leaseremote_updates::tests::requests_admit_only_the_exact_unblocked_ready_or_available_offera_failed_remote_download_is_recorded_without_arbitrary_desktop_errorsremote::update::tests::available_offers_are_requestable_from_download_capable_and_older_hostsui::remote::tests::an_available_offer_can_be_requested_without_downloading_it_firstupdate_button_is_enabled_for_an_available_offer_on_new_and_older_hostsan_older_hosts_download_refusal_is_definite_and_shortNot verified
324fc47c(lease.status.state != Ready→ "no longer ready"), and the client mapping is unit-tested.🤖 Generated with Claude Code