Skip to content

Add runtime update checks and upgrades - #46

Merged
xxchan merged 2 commits into
mainfrom
feat/runtime-upgrade
Oct 1, 2026
Merged

xxchan merged 2 commits into
mainfrom
feat/runtime-upgrade

Conversation

@xxchan

@xxchan xxchan commented Oct 1, 2026

Copy link
Copy Markdown
Member

Adds two optional runtime capabilities, independent of sessions like accountUsage, plus oar upgrade. Design agreed in #core (task #5).

runtime.checkUpdate(installation): the version the runtime's own updater would install, with its source and channel. Unreadable answers are unavailable with a reason, never "current".

runtime.upgrade(installation): runs the runtime's own updater (oar never installs anything itself), non interactively, and judges the result by --version of the same executable before and after: upgraded, current (nothing ran), unchanged, failed, unsupported. The updater output comes back verbatim. oar never calls it on its own.

Runtime check upgrade
claude release pointer or npm dist tag by install method and autoUpdatesChannel claude update
codex codex doctor --json codex update
grok grok update --check --json grok update
kimi code.kimi.com/code.kimi.ai latest by region kimi upgrade -y (0.43.0+)
cursor about --format json, release service for older builds cursor-agent update
antigravity ACP registry (newer only) none
pi none (bundled) none

Why the version read back: in sandbox probes every updater exited 0 without upgrading in some case (codex after a failed download, claude for Homebrew copies, grok updating another copy, kimi without -y). Evidence: docs/runtimes/update.md; contract: docs/spec/update.md.

Verification:

  • pnpm run check: typecheck, lint, 421 tests, sea trial 18/18.
  • New tests: the upgrade flow against a fake updater (upgraded, claims success without change, failure, prompt reads EOF, no run when current, package script marker scrubbed), each runtime's check parsing, release sources served locally. Removing closeStdin makes the prompt test time out.
  • Live, in sandboxed homes against older installs: claude native 2.1.280 to 2.1.286, codex npm 0.155.0 to 0.159.3, grok script 1.0.44 to 1.0.46 under npm_config_user_agent, kimi native 2.1.0 to 2.1.1, cursor 2026.08.11 to 2026.09.28; kimi npm reported unchanged with kimi's own refusal; kimi 0.38.0 requires_terminal. Checks against this host's real installs only (read only).

Also documents grok's silent self update on grok agent stdio launches from ~/.grok/bin.

🤖 Generated with Claude Code

exe.dev user and others added 2 commits October 1, 2026 12:06
…ater

runtime.checkUpdate(installation) reports the version the runtime's own
updater would install and the source of that answer: grok's
`update --check --json`, codex's `doctor --json`, cursor's
`about --format json` (older builds ask the release service), and for
claude and kimi the release pointer their updater reads, by install
method, channel and region. Antigravity's check reads the ACP registry and
counts only a newer version; Pi moves with oar.

runtime.upgrade(installation) runs that updater with stdin closed and no
package script markers in the environment, then judges the outcome by the
version the same executable reports afterwards: every updater was observed
to exit 0 without upgrading. Kimi before 0.43.0 is unsupported, since only
a terminal prompt upgrades it.

`oar upgrade [runtime]` runs the updaters one at a time; `--check` only
reports. docs/spec/update.md is the contract, docs/runtimes/update.md the
sandbox evidence, and the grok page records its silent self update on
`grok agent stdio` launches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Updaters start npm or `curl | sh`, so a timeout that only stopped the
direct child could cut an install off midway or leave it running. They now
run without stdin or a controlling terminal, in their own session and
process group on POSIX, and a timeout stops the whole group (the process
tree on Windows); checks use the same runner.

Also: `oar upgrade` reports a runtime whose probe throws instead of losing
the reports already made; the version read back allows 30 s, as the
cursor and kimi probes do; `--timeout` reaches the check inside an upgrade;
claude falls back to its recorded installMethod for shims (pnpm, Windows
npm) and honors minimumVersion; kimi counts only a newer release, as its
upgrade does; codex's `manual or unknown` update action is
unmanaged_installation. Live reruns include a codex standalone install.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@xxchan
xxchan merged commit c0b795d into main Oct 1, 2026
12 checks passed
@xxchan
xxchan deleted the feat/runtime-upgrade branch October 1, 2026 12:26
@xxchan xxchan mentioned this pull request Oct 1, 2026
xxchan added a commit that referenced this pull request Oct 1, 2026
Bump both packages to 0.11.0: #46 adds `runtime.checkUpdate`,
`runtime.upgrade` and `oar upgrade` (new optional capabilities; nothing
existing changes).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: exe.dev user <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
stamp-build Bot added a commit that referenced this pull request Oct 29, 2026
<!-- stamp:review:v1 -->
<sup><img
src="https://cdn.slock.ai/avatars/6aabf32c-20bc-4cba-b55a-2aa72b60999b/8ba4452ceb890f1930886ef4286fdb99.webp"
width="16" height="16" align="absmiddle" alt=""> <b>Otter</b> from
open-agent-runtime opened this pull request through
Stamp</sup><br><sup><a
href="https://stamp.build/review?receipt=prc_4fb7a3defd9d614e2c5b0f200308e703"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img
src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg"
width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp
→</a></sup>

---
<!-- /stamp:review:v1 -->

Verify Kimi 2.4.0, Qwen 0.26.3/0.26.4, Antigravity ACP 1.4.4 and
OpenCode v2 2.2.1, and update the native Kimi CI pins and login fixture
to 2.4.0. Runtime pages and the dated report retain the observed
failures and capability boundaries. The product's existing Kimi login
minimum stays 2.3.3.

A new OAR-free OpenCode probe reproduces concurrent cold database
startup failures in two batches, with sequential and warm controls
passing. The known limitation and an upstream issue draft for maintainer
review explain the host option to serialize its first startup. No
adapter retry, lock or timeout change is introduced. Qwen's extension
lock and thinking/text snapshot issues remain reproducible; both
upstream issues are added to the inspection checklist.

Validation: Linux native/shared/login checks are detailed in
`experiments/runtime-version-checks/2026-10-29.md`, including the
initial Kimi hook timeout and all OpenCode failures. Full local `CI=1
pnpm run check` passes. Kimi macOS/Windows login and macOS ACP will be
checked by PR CI; a manual `acp-windows.yml` run on this branch is
requested before merging the pin update. No package version, Cursor peer
or Pi/undici dependency changes.

Raft task #46. Upstream issue publication belongs to Cindy after review.

Co-authored-by: Otter <[email protected]>
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.

1 participant