fix(harness-desktop): update Claude and Codex on startup - #843
Draft
ynadge wants to merge 2 commits into
Draft
Conversation
8 tasks
ynadge
changed the base branch from
main
to
feat/desktop-managed-agent-runtime
September 6, 2026 05:54
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.
Primary change type
Problem and motivation
Studio disables Codex's own update check but previously kept using an older installed CLI across restarts. That can leave users with an outdated model picker. Installed Claude Code had the same update gap.
Summary and scope
Check both installed providers against npm
latestbefore starting sessions. Use #845's isolated installer, verify the executable, then atomically select it. Failed/offline updates retain the working CLI; newer or unrecognized local builds are preserved. Cancel updates when quitting during setup and bound doctor probes.Progress uses the existing startup screen. Dev/smoke and
SAPIOM_DISABLE_AGENT_UPDATES=1skip update traffic. Provider configuration and history are preserved; model access still depends on the account. Old install directories remain available to running processes.Related work
Second of two stacked PRs; merge #845 first. This diff is based on its branch and contains only startup update policy/wiring, tests, and documentation: 546 additions + 10 deletions = 556 lines.
Validation
The workspace
pnpm testcheck during the split hit the same unchanged agent-core permission-test failure documented in #845. This VM can list directories with mode0111; Node 20/22 CI passed on the original combined change. Temporary build/test files use a memory filesystem. The subsequent macOS validation below exercised the real runtime and updater. Full GUI startup and Windows execution remain unverified.Real reproduction and update validation — 2026-09-06
Authenticated macOS comparison, using the same ChatGPT account/configuration and separate empty caches:
The PR's actual coordinator/installer/adapter ran under installed Sapiom 0.4.4's bundled Electron 33.4.11 / Node 20.18.3 and npm. It detected 0.143.0, downloaded and verified real 0.153.4, published the selection, passed adapter doctor, and reused the selection on a second coordinator call (one installation total). Its managed executable and adapter config flags produced the authenticated newer catalog. The original system installation remained 0.143.0. A separate packaged Linux run also installed real Codex 0.100.0 → 0.153.4 and reused it.
This validates a version-dependent picker omission and the production update path. Codex's TUI bootstrap consumes this
model/listcatalog. It does not establish the exact originally reported incident: that model/error was not supplied. No inference prompt, full GUI startup, real Claude update, or Windows run was tested here. Credentials stayed on the Mac; temporary installations and credential copies were removed. This reproduction was performed after implementation, not before it.Tests and documentation
Retained all update coverage: both providers, newer/beta/unknown versions, offline reuse, failed/incomplete installs, cancellation, immutable selection, and Windows npm layout. Shortened repetitive comments and the desktop README. A syntax-tree comparison confirmed all six updater functions retain their original implementations after extraction.
Compatibility and release impact
Security
AI assistance
Checklist