Expand description
An agent asking to upgrade AgentMux: RequestUpgrade
(docs/specs/SPEC_UPGRADE_FOR_USERS_AND_AGENTS_2026_10_15.md §5.1, phase 4).
A restart stops every agent and interrupts the user, and an agent can be prompt-injected, so an agent’s word alone never starts one:
- the user’s own turn asked for it (
self_quit::gate_upgrade: as forQuitSelf, but a Swarm broadcast doesn’t count): the upgrade starts — the release is downloaded if it isn’t yet, then AgentMux restarts once every agent has finished its turn; - anything else is a sensitive request (
server/sensitive_handlers.rs): the super agent decides, the person can veto the countdown, and the agent is told each step as an[AgentMux]note. When the countdown ends,sagas/sensitive_runners.rsstarts the same upgrade.
The prompt every window used to show for the second case is gone; answer,
list and UpgradeRequest below only serve any left from before.
Either way the restart is already decided by then, so the launcher asks
nothing more (crates/launcher/src/upgrade_restart.rs), and only a release
the update check found, verified against GitHub’s checksum, is installed:
the agent can’t name a file or a URL.
Structs§
- Upgrade
Request - An agent’s request waiting for the user.
- Upgrade
Request Answer - The user’s answer, relayed by the host (
POST /api/v1/host/upgrade_request). - Upgrade
Requests Event app:upgraderequests: the agents’ upgrade requests waiting for the user.
Enums§
- Outcome
- What
RequestUpgradeanswers the agent.
Functions§
- answer
- The user’s answer to request
id, for the release the prompt showed (relayed by the host:POST /api/v1/host/upgrade_request). Upgrade now answers every request for that release, since there is one AgentMux to upgrade; if the update check has found a newer release since, it installs nothing and the agent is told to ask again. - installable
- The release a request may install, or why there is none.
wantedis the version the agent named, if any: only the latest release can be installed. - list
- The requests waiting for the user (
app.upgrade-requests). - resolve_
started - The user’s own turn started the upgrade to
version: requests for it that were waiting are answered by that, and their agents told so. - start_
upgrade - Download
versionif it isn’t yet, then restart once every agent has finished its turn (the restart is already decided, so the launcher asks nothing more). Only whileversionis still the latest release: the download and restart take the latest, so a newer one appearing meanwhile stops the flow. The agents inaskers(their panes) are told if it stops short, and why.