Toolchain upgrades: CLIs, images and diagnostics

CLI installation, runtime image reuse and console/control-plane updates are independent. Projects may have several managed containers, including sessions from compatible repositories sharing the same-owner runtime. Operator upgrades act on the selected physical container scope; cross-user sharing never occurs. See architecture and container scope.

To move an existing session to the latest CLI, select it in Projects or Sessions and press Shift+R. The direct Restart session · Latest CLI dialog shows its launched and target versions. Y prepares a handoff, stops only that provider process and resumes its existing conversation in the same container; the runtime checks and updates the CLI before launch. The dialog does not edit or save parameter templates. Other sessions keep running. A missing native resume ID blocks this action rather than silently starting a new conversation. s still opens the parameter editor. The button and keyboard action use the same React workflow in TUI and web.

Upgrade scope

Before starting another session in an existing container, devctrl verifies its newest trusted installed Claude or Codex executable and compares it with the official latest release. An older image label or an older running session is not the update baseline. If another session already installed the latest client, later sessions reuse it without another download or installation. An installed version newer than a temporarily lagging upstream release tag is kept. Each running session retains its immutable executable and its own update marker. This reuse is per physical container and per client; a new container has its own installed versions.

In Projects, select a Project/session, press Shift+U, then Shift+U to confirm. The default upgrade installs the latest managed Claude/Codex CLIs in the selected Project's running containers. It preserves provider processes, terminal sessions and active AgentRuns. A saved official conversation ID is not required because the operation does not stop or resume providers. Groups offer All Projects in this group; Dashboard Shift+U selects eligible Projects on online hosts.

./devctl toolchain upgrade --project example-project
./devctl toolchain upgrade --projects project-a,project-b
./devctl toolchain rebuild-image --project example-project
./devctl toolchain rebuild-image --project example-project --build-only
./devctl toolchain restart-plan --project example-project

CLI upgrades skip stopped containers. New or resumed provider processes ensure the required managed CLI is installed before launch, so a stopped container can receive the new version when it is next used. Already running processes keep their original executable until the user restarts them. Updating CLI files does not change the container's image or its immutable image version labels.

Starting an existing container preserves its image and configuration. For a new container, devctl first uses the prepared current image. If that image is unavailable, a cached older base image for the same template can start it, and the selected CLI is updated before the session starts. Feature overlays require a matching prepared image or their normal build because an unrelated overlay must never silently replace the requested Features. With no cached image, the initial image build is still required.

Before starting a new process, the host checks the controller's current workspace ownership, explicit Internet policy and native folder lease. A legacy container keeps its existing network boundary when no explicit restriction was selected. An explicitly restricted Project cannot start a new process in an unrestricted legacy container until an explicit container rebuild applies that policy. Already enforced restrictions and current native folder grants are always verified. Reattaching to an existing provider preserves its process and launch state.

toolchain rebuild-image explicitly prepares images, recreates selected running Project containers, and resumes their saved official conversations. It retains the existing provider identity checks and active AgentRun protection. --build-only belongs to this image action and prepares images without restarting Project containers/sessions. Stopped containers stay stopped. Management components may refresh and reconnect transport used by other Projects during image preparation.

Installing CLIs through the host cache

The host downloads and caches the selected npm packages under $DEVCTL_DATA_DIR/managed-cli-cache (default /var/lib/devctl/managed-cli-cache). Archives are keyed by package, version, Linux architecture and libc. The host supplies a cache archive to the managed container, which installs with npm --offline; container DNS and outbound npm registry access are not prerequisites. Network failures while filling the host cache fail that update without stopping existing provider processes. The runtime ensures the managed CLI before each new provider launch as well as during an explicit CLI upgrade.

Managed installs use separate immutable directories under /opt/devctl/agent-cli/<claude|codex>/<version>/, with a current link for the selected version. A complete install is verified before that link changes; new providers execute the concrete version path. Existing versions remain available to processes that already started from those paths, and an update does not overwrite their package files. A matching executable baked into the image can be reused. This separates package download, container installation and future-launch selection in progress reporting.

Container cache seeds use temporary operation directories under /opt/devctl/agent-cli/.cache/ and are removed after installation or failure. npm installs as UID 65534 with isolated staging directories and configuration; verified version directories and the current link belong to root. A container lock serializes publication. Host downloads require host Internet access and leave the Project's existing Internet grants unchanged. Host archives are retained for reuse; removing an unused host download archive does not affect installed CLI versions. Executable version directories are never automatically deleted while sessions may depend on them.

The package installation route uses the providers' npm distributions; see the official Claude Code setup documentation and OpenAI Codex example. Host caching and immutable directory selection are devctl runtime behavior.

Three independent reuse checks

Component Reuse condition Build/update trigger
Local control plane All three components run on current image IDs and matching checkout fingerprints Changed fingerprint/image or missing/stopped component
Remote host-agent Runs current devctl:remote with the expected fingerprint Fingerprint/image mismatch or missing running agent
Project runtime Desired image exists and its specification label matches Changed template/toolchain/Feature, missing image or mismatched label

Local components are devctl-controller-1, devctl-client-agent-1 and devctl-local-host-agent-1. The control plane is devctrl management code, not a Project image. Its fingerprint covers apps, packages, docker, templates, agent-defaults, patches, manifests/locks and Dockerfile. UI, tests and documents inside these trees invalidate reuse. Root README and docs/ are outside that fingerprint. Generated dist, dependencies, logs, .devctl and .git are excluded.

Explicit image rebuilding checks both management code and Project runtime. Cached runtime does not suppress a management refresh after devctrl source changes. Direct install-host --upgrade forces host-agent upgrade; image preparation passes --reuse-current instead. The default CLI update does not require rebuilding a Project image.

Runtime tags are devctl-project-runtime:<template>-<spec hash>, with io.devctl.project-runtime.base-spec-sha256 and io.devctl.project-runtime.spec-sha256 labels. Matching final specification finishes preparation before Docker build. Projects with the same template/Features on one host share the prepared image. Prebuilding runtime image describes preparation, not proof that a build ran.

Without changed source, locks or runtime specification, later compatible Projects can skip management and runtime builds. Explicit image recreation still takes command-queue wait, provider stop, checkout permissions, Docker-sidecar readiness, container creation, tool checks and resume. Host commands run during reconciliation after inventory; stage timing includes dispatch wait. Sidecars are reused only when labels/security options match.

Progress in TUI and web

Projects/list and mosaic show the update's current stage and waiting for other planned targets. Default CLI progress covers host package caching, container installation and selection for future launches; provider processes continue running. Explicit image rebuild progress additionally includes stopping providers, recreating containers and resuming conversations. Its planned sessions remain visible while their processes are stopped. Markers clear after completion.

Three version sources have different meanings:

Source Meaning Update behavior
Session launchedCliVersion CLI used by the observed provider process Changes only when matching provider/process-generation inventory reports a new process version
Container observedCliVersions CLI currently selected for a new launch Can change after an in-container install while existing sessions keep running older CLIs
Image io.devctl.toolchain.<tool>.version labels CLI originally built into the image Immutable; changes only with a different image/container

⚠ OLD CLAUDE <version> or ⚠ OLD CODEX <version> describes a session whose CLI predates the latest release. ⚠ OLD IMAGE describes image specification or baked CLI drift independently. Installing a new CLI can leave both an old running session and an old image warning; restarting the session clears its CLI warning only after the new process is observed. Rebuilding from an image containing the latest CLIs clears image drift. Legacy sessions without process version evidence use immutable image labels or show an unknown version; a fresh container CLI probe is not evidence of their running executable.

Esc/Enter closes progress while the operation continues; Shift+U reopens it. Restarting an interface preserves operation state without automatically opening a historical FAILED screen.

The launching machine's .devctl/ipc/ holds:

Capture a long CLI run to a private local log, for example:

./devctl toolchain upgrade --project example-project > ./upgrade.log 2>&1

Review logs before publishing them. Read-only diagnostics include /v1/workspaces/<id>/progress, image identity/creation time and operation scope/timings. Do not clear image caches or repeat live restarts merely to test reuse. A removed queue command is not proof of successful resume: verify the operation result, container/session state and preserved provider conversation ID.

BuildKit and Docker Hub access

Management/runtime images include Docker Buildx with Docker CLI. Each image checks docker buildx version before publication. With Buildx available, docker build uses BuildKit and builds only dependencies of the requested target rather than every preceding Dockerfile stage.

Shipped shared-runtime and managed-Feature builds use docker build --network host, allowing their trusted installers to use the server's resolver/network, including Debian packages. Imported repository builds retain their Dev Container networking. Set DEVCTL_MANAGED_RUNTIME_BUILD_NETWORK=default in host-agent to use standard BuildKit networking; accepted values are host/default. This does not change host daemon, DNS or IPv6 configuration.

Transient registry metadata/token transport errors retry at most twice after one and two seconds. All attempts share the original 15-minute build deadline; cancellation interrupts retry/wait. Authentication, package-version and installer-script errors do not retry automatically. A matching prepared image skips the build entirely.

DEPRECATED: The legacy builder is deprecated means the builder CLI could not find Buildx or DOCKER_BUILDKIT=0 disabled it. Check docker exec devctl-host-agent-1 docker buildx version: a plugin installed on the host is not automatically in host-agent.

auth.docker.io/token ... dial tcp [IPv6]:443: i/o timeout is a Docker Hub connectivity failure requiring separate server/builder IPv6, DNS and HTTPS checks. Buildx presence does not prove connectivity. Image preparation precedes provider stop, so failure here preserves existing containers/conversations. Retry the explicit image action after repairing access.

Tailscale SSH confirmation

ConnectTimeout covers connection establishment, not a later Tailscale SSH check. Installation/upgrades use a separate watchdog: 30 seconds for unresponsive preflight, 60 seconds for browser confirmation. TUI/web show the real URL and TAILSCALE SSH · CONFIRM ACCESS.

If the original connection remains stuck after confirmation, the watchdog terminates it and repeats only the safe true probe once. A second timeout fails the operation; confirm access and retry Shift+U. Remote build commands are not automatically repeated, and this watchdog does not limit build duration. ServerAliveInterval=15 and ServerAliveCountMax=3 detect lost transport.

For an explicit image rebuild, host-agent publication and runtime preparation occur before stopping Project sessions. SSH failure during preparation does not stop or recreate them. Default CLI updates preserve provider processes throughout their operation.

A measured cached-image rebuild

One historical image recreation completed in 172 seconds. This is a measured example of the explicit image operation, not the default CLI update or a promised duration:

Stage Seconds
Resolve versions 2
Local control plane 47
Remote host-agent 37
Prepare runtime 11
Stop session 18
Recreate container 53
Resume session 4

Claude 2.1.289 and Codex 0.160.0 were unchanged. The prepared runtime image already existed; post-upgrade inspection confirmed the same image ID and creation time. Of the 53 recreation seconds, about 23 were dispatch wait, 20 were Docker-sidecar work and one was main container creation. Checkout preparation and checks occupied the remainder. The same official provider conversation resumed. Read-only checks then confirmed management/host-agent reuse eligibility. This measurement did not itself implement queue optimization or split management/runtime upgrades.

Recovering an official Codex conversation ID

Host-agent periodically recovers missing identity from the official rollout opened by the running Codex process. It verifies account, HOME, checkout and available process generation; an old resumed conversation's timestamp need not postdate the process. Entering the terminal or pressing Enter is not required. The controller rejects observations from another host/account/generation and never overwrites a conflicting known ID.

Current controller and host-agent are required. Explicit image rebuild planning waits up to its existing 90-second identity deadline; failure leaves all sessions running and preserves their conversations. Default CLI upgrade planning waits for selected hosts to reconnect, without waiting for provider identity recovery. Heartbeat Docker probes have a shared five-second transport/read deadline; streams arriving late are closed.

A shared prepared runtime can serve subsequent repositories without another build. No sessions does not make an existing old image current: clearing image drift requires explicit recreation from an updated image. A CLI install can update new provider launches in that same old container. If no container exists, its next start can use the prepared image and ensure the selected CLI before launching a provider.

Official CLI release notes

Context-tool releases offer per-tool automatic-update preferences, manual live updates and per-container tooling history. Automatic updates are opt-in and apply only to selected tools already installed and enabled in your running containers; they do not restart agent processes or rebuild images. The same history also records actual agent CLI and runtime-tool version observations, keeping requested targets distinct from verified results.

Press Shift+C in Dashboard with either panel focused, or in the content panel of Templates or Projects. You can also click release notes in the header. The same panel works in TUI and web. It reads Claude Code's official changelog and Codex's official GitHub releases, including available intermediate stable releases from the current version (exclusive) to the target (inclusive).

Optional agent packages can declare their own official release source. Antigravity uses Google's CLI changelog and native release manifest. Once a CLI version has been observed in a session or container, the server adds it to release tracking; the adapter package alone does not count as an installed executable. Existing processes keep their launched version and remain marked outdated after a newer binary is installed. New Antigravity processes select the latest verified binary without restarting other sessions. Release checking remains active with TUI and web closed.

Dashboard release notices are clickable: selecting Claude or Codex opens that CLI in the combined release browser. The Dashboard's range starts from the shared toolchain pin, a container's range starts from its selected CLI, and a selected session's range starts from its launched CLI when observed. Each range appears at the top. Both clients load independently; missing versions or a failed source for one do not hide the other. In TUI, use Shift+C. Reading notes does not trigger an upgrade or a Decisions call.

The initial view separates Agents, Context tools and, when present, Other tools, with compact release rows under each tool. Claude, Codex and Antigravity appear first in that order; installed custom agent packages join the Agents group. Agent headers use the same terminal marks or browser artwork as session headers. A blank row separates each group; cyan, bold, underlined headings remain distinct from selectable releases. Browser and desktop expose them as semantic headings. Group headings do not take keyboard focus. It shows versions, publication dates, coverage and importance badges; change text is collapsed. SESSION / SIGN-IN CHANGES is a release topic: the notes contain changes to conversation persistence, resume, login or authentication. It does not identify affected devctrl sessions or request a restart. The arrow before a version is the release row marker; Enter opens its change list. Publication dates are shown only when supplied by the official source. Use ↑/↓ to select a release, then Enter (or click it in web) to read only that release. Esc returns to the list and preserves selection; a second Esc closes the browser. Both CLI ranges remain visible even if one has a long history. t or a click on the range moves focus to another CLI without refetching its already-loaded notes.

For a selected workspace, the current release comes from the CLI version observed by the host, falling back to image version labels. For a selected provider session, its process-bound launched version takes precedence over container observations and image labels; stale generations cannot replace it. Legacy running sessions without a process-bound version use image evidence or remain unknown even if the container now selects the latest CLI. Cached, noninteractive claude --version / codex --version probes run as an unprivileged UID in the background with process/transport deadlines and bounded concurrency; they do not delay inventory or restart sessions. The next host heartbeat updates the open panel automatically when its version evidence changes. Stopped containers or failed probes can still use i to enter an observed version. Shared pins are never substituted for an unobserved container or session version. Newly built managed runtime images inherit io.devctl.toolchain.<tool>.version labels.

The observing host-agent must contain the version-probe implementation. An older host-agent cannot report versions for unlabelled containers; update that management component without rebuilding Project containers or restarting their agent processes. Probes decode Docker's framed stdout separately from stderr, so Codex startup warnings do not hide its version. They also wait for the exit status if Docker closes stdout before reporting process completion.

Use ↑/↓ or PgUp/PgDn to scroll the selected release and r to reload both ranges. Source links remain available on the release detail. Each release shows category counts such as Fixes 4 · Additions 2 · Sessions/sign-in 1, using the same classification and colors as its detail. Counts describe unique change points in that release's available official notes, not wrapped screen lines, headings, code examples or continuation lines. Repeated identical points count once. GitHub Full Changelog comparison links are metadata and do not count as changes. Inside a release, press s (or click the order control) to switch between source order and grouping by colored category; red critical/security/breaking changes come first. Sorting preserves each change and its continuation/code examples without another API request. A release can show counts without any server highlights or optional Decisions review; partial/unavailable source coverage stays visible and is never extrapolated into a complete change count. Security/breaking and session/authentication highlights apply only to matching source items. A generic mention of a model never generates a new-model badge: that importance is assessed by the configured Decisions provider, and does not guarantee subscription entitlement.

Missing endpoints or failed/limited source requests produce explicit partial/unavailable coverage instead of fabricated notes. Reads are coalesced and cached for 15 minutes when complete, or 30 seconds when partial/unavailable. At most two source reads run concurrently with up to 32 pending ranges and a 30-second deadline including queue time. Already-current tools bypass the network queue. GitHub pages contain five releases rather than asset-heavy 20-release responses; stripped page metadata is shared for 60 seconds, bounded to 4 MiB. One transient upstream retry is allowed within the deadline; long rate-limit cooldowns fail promptly with the HTTP status. Cached complete notes occupy at most 12 MiB. Ranges over 2 MiB or 512 releases are explicitly partial.

The shared TUI/web release detail colors additions green, fixes cyan, performance blue, new models magenta, and session changes yellow. Server-tagged security and breaking items are bold red, including wrapped continuation lines. A Decisions critical or new-model classification requires at least 80% confidence and an exact supporting change point from that release. The provider selects a supplied point; the controller validates it against the actual notes. The badge and that point share the corresponding red or magenta color. Version headings, code examples and invented quotations are not supporting evidence. Low-confidence assessments show a gray DECISIONS: uncertain (20% confidence) label without claiming critical or new-model importance; older cached assessments without a matching point show DECISIONS: no supporting change. Confidence is the optional advisor's certainty in its classification, not risk, update progress or a session status. Below 80%, the importance classification is ignored. Release details explain the threshold and any missing evidence. An inconclusive review does not block sessions or updates; users can read the official notes and update normally. A compact legend explains the colors.

Per-release confidence and overall update-priority confidence are separate. A verified normal release at 92% is not described as below the 80% threshold; missing overall confidence is reported as missing for that recommendation only.

d requests a Decisions API review of the selected CLI range. p selects the project whose existing Decisions budget pays for the review. When release-note assessment is enabled, a complete range of at most 16 releases is also assessed automatically once per project and range. Reviews use the existing provider credentials, accounting and history (kind=changelog), with validated choices and confidence. Larger histories remain readable, with an explicit unavailable assessment. The feature operates normally without a configured Decisions provider. Release text is treated as untrusted data and never executed.

The API is GET /v1/toolchain/changelog?toolId=claude&fromVersion=2.1.293&toVersion=2.1.296; clients select a managed CLI and versions, never a source URL. Optional inference is POST /v1/projects/:id/toolchain/changelog/review with those three fields. Non-operator users may read the public release notes; reviews require ownership of the project and a published Decisions resource. CLI source descriptors live in the shipped toolchain spec and installed, operator-trusted agent packages.

Update recommendation

Shift+C on Dashboard works with either navigation or content focus; Projects and Templates require content focus. The browser shows both clients and a compact list of releases; Enter opens one release and Esc returns to the list.

Known security or breaking-change notices produce an URGENT recommendation without a paid advisor call. Otherwise an enabled, configured Decisions provider assesses a complete range of at most 16 releases under the selected Project's budget. The result distinguishes urgent, recommended, routine and unknown. Advisor recommendations below 80% confidence remain unknown, including cached recommendations from older controllers. An urgent advisor recommendation also requires a reliable critical assessment tied to a matching release-note point; a conflicting overall verdict remains unknown. Official security notices do not depend on advisor confidence. The source identifies release notes or Decisions rather than presenting an advisor classification as an official critical notice. Unconfigured/disabled providers, incomplete history and failed evaluations do not produce an invented reassuring verdict. Identical project/range/provider requests share a cached assessment for 30 minutes. The recommendation never starts an upgrade or restarts a session automatically.

Optional context tools

Enabled RTK OSS, sgrep, ast-grep, Repomix and Graphify also participate in container CLI updates and launch preparation. Templates → Context tools sets private defaults; Projects → Shift+E installs or updates a container selection without restarting its sessions. Templates → Prepared images configures existing immutable images. Enabled context tools appear alongside Claude/Codex in release monitoring and the compact changelog, including tools selected only in templates or prepared images. Selection changes refresh release tracking without waiting for the hourly interval. Optional Decisions review uses the same workflow. Live installation shows one progress row and elapsed time per selected tool plus the total operation time; unknown stage counts use a spinner. Esc only closes the panel. Progress remains in the console header and all session rows/tiles sharing the target container. Successful context-tool installation refreshes each running session’s DEVCTRL.AGENTS.MD and queues its safe reread notification, including when reached through a general CLI update. Artifact and overlay caches include official versions, commit/digest, architecture and installer/build specification. No percentage of actual subscription savings is claimed.