Repository navigation
Install OpenClaw as a self-updating copy under ~/.openclaw - #13296
Conversation
The first E2E run of the migration found that the new runtime cannot install its gateway service while the old package's gateway, still running from deleted files, holds the state directory, so that service is stopped first. Removal also takes the unit backups `openclaw update` leaves behind. Codex's review found the rest: upstream's installer takes over any loaded gateway service, so a gateway running another OpenClaw, a foreign command on PATH or an openclaw shadowing it are refused before anything is set up; root is refused before --check runs the user's wrapper; --check needs the package, since --now would otherwise run pacman where no terminal can ask for a password; and moving a service clears the selectors that would aim the install at another unit. Co-Authored-By: Codex XHigh <noreply@openai.com>
Upstream's installer runs `gateway install --force` on any gateway it finds loaded, so the old package's gateway has to be stopped before seeding rather than after, and a stop that fails ends the run. The profile selectors are cleared for the whole command, installer included, and every refusal now comes before the package is installed. Co-Authored-By: Codex XHigh <noreply@openai.com>
Removing the runtime while keeping ~/.openclaw left state that its own updates had migrated past the packaged release, and reinstalling seeded a release that refused to open it; even `openclaw update` refused. Removal now takes openclaw off PATH and leaves the runtime inside ~/.openclaw with the state, where a reinstall picks it back up; deleting ~/.openclaw still takes both.
Upstream's installer rewrites a loaded gateway onto the new copy but only warns when it will not start, which let the install finish with no gateway running. A service that was running before the move now has to be running after it, or the install fails and says the service is stopped; a failed seed says so too. Co-Authored-By: Codex XHigh <noreply@openai.com>
A unit is Omarchy's or the old package's by the program its ExecStart runs or the script it hands that program, not by a path appearing anywhere in the line, so a gateway that merely names ~/.openclaw in an argument is not taken over. The state directory and config overrides are cleared with the profile selectors, since Omarchy's OpenClaw is the default one. Any failure after a running service was stopped for the move names that service, a partial stop included. Co-Authored-By: Codex XHigh <noreply@openai.com>
|
End-to-end review of abf2f75 together with omacom/omarchy-pkgs#651, on four disposable Omarchy workers built from the ISO template, with this branch dev-linked and Before, on the current package (2026.9.4-1): Setup > Default Agent > OpenClaw, clean machine. Install > AI > OpenClaw, clean machine. Same seed, plus the web app. The Control UI's Update Gateway went from 2026.9.5 to 2026.9.6 and restarted the gateway on it. Remove > AI then took the service, web app, package and Existing install on the old package. With 2026.9.4-1 onboarded and its gateway running, the package upgrade printed the one-time notice and left the gateway running from deleted files. The migration (run directly, because All screenshots and the three run logs: https://gist.github.com/spencerbull/28a59f7434d54e7a993a640924b873e1 Suite: Second opinion: Codex at xhigh, five passes, and it changed the work each time. It found that upstream's installer rewrites whatever gateway it finds loaded, so every refusal now comes before anything is installed. Its other findings: the old gateway has to be stopped before seeding, a failed restart must fail the install, root is refused before Known and accepted: the landing order is this first, then #651. If a service move fails after upstream has already rewritten the unit, a rerun finds nothing left to move; the unit stays enabled and starts at the next login or app launch. A TUI already open during an update refuses the migrated state until it is relaunched; that's upstream's schema guard. Waiting on the maintainer. 🤖 Generated by Fable 5.1 in Claude Code. Reviewed by Codex XHigh. |
OpenClaw's CLI takes a terminal on stdin out of raw mode as it exits, and the onboarding watcher's `openclaw dashboard --json` probes inherited the wizard's terminal. Current releases write the config partway through the wizard, so the probes started while prompts remained, and every two seconds the terminal fell back to line mode: typing at the channel prompt echoed instead of selecting. The probes now read from /dev/null.
The probes do not take the wizard's terminal out of raw mode: a raw pty stays raw across `openclaw dashboard --json`, and the channel search takes keys normally in foot and Ghostty with the probes running, with or without the change. The break seen at the channel prompt has another cause.
Since 2026.9.6 upstream's installer keeps the Node a gateway service already ran when it rewrites the unit, so moving a gateway the old package installed left it running the runtime's code on /usr/bin/node, from the nodejs package the old openclaw package pulled in and the seed no longer depends on. A moved service now counts as moved only once its program is under ~/.openclaw, and the reinstall pins the runtime's Node with --runtime-path, which gives the same unit a fresh install gets.
Judging a moved service by whether its program sat under ~/.openclaw missed a retry after a half-finished move, whose unit already ran the runtime's script on /usr/bin/node and so was never selected again; misread a symlinked home against the resolved Node it pins; and would have moved a gateway the user runs on Bun. A service now needs moving while it runs the old package's script, or the runtime's script on /usr/bin/node, the Node the old package pulled in; any other runtime is left alone. Co-Authored-By: Codex XHigh <noreply@openai.com>
A service counted as the runtime's, or as a half-moved old one on /usr/bin/node, whenever it ran anything under ~/.openclaw, so a script of the user's in that directory could be stopped and rewritten, and seeding could go ahead beside it. The runtime is now OpenClaw's own script as upstream's installer lays it out, under ~/.openclaw/tools/*/lib/node_modules/openclaw, and both checks use that one definition. Co-Authored-By: Codex XHigh <noreply@openai.com>
Installing a service enables and starts it, so moving an old-package gateway or node host the user had stopped or disabled turned it back on. What was running and enabled is read before the move and put back after it. Co-Authored-By: Codex XHigh <noreply@openai.com>
The wizard writes its config while prompts remain, so the watcher starts probing a gateway that is not up yet; each probe hangs until its 10 second timeout, and OpenClaw's CLI, killed by it, takes the terminal it inherited on stdin out of raw mode on the way out. The wizard does not set raw mode again, so from then on its prompts echo keys instead of reading them: the first letter typed at the channel search landed and the next one was printed below the prompt. The probes now read from /dev/null. This is the change reverted earlier on a test that only ever saw probes that exited on their own, never one the timeout killed.
|
Second end-to-end review, now at 9ace84e, with omacom/omarchy-pkgs#651 rebased to a696e31 ( Pushed in this review
Round 3 on 9ace84e, all passing
Tests: Second opinion: Codex at xhigh, one pass per fix, until a pass found nothing. Declined:
Codex could read this session, so where it merely agreed, that agreement is not independent. Branch state: 31 commits behind quattro but merges cleanly, and was tested merged. Evidence: https://gist.github.com/spencerbull/a0c56fd1f22abfcd1f3446d58303f913 Lands before omacom/omarchy-pkgs#651. Waiting on the maintainer. 🤖 Generated by Fable 5.1 in Claude Code. Reviewed by Codex XHigh. |
This reverts f6b9267 (#651), at pkgrel 3 so it replaces 2026.9.6-2. OpenClaw rides the fast ring, so the seed package went straight to edge, rc and stable, where omarchy is still 4.0.4: nothing there seeds ~/.openclaw or moves an existing install, so every OpenClaw user lost the openclaw command on their next update while 4.0.4's --check went on calling it installed. The seed comes back with the Omarchy release that carries omacom/omarchy#13296.
This reverts fe15488 (#796), restoring #651's recipe exactly with pkgrel 4 so it replaces the runtime rollback's 2026.9.6-3. The package carries the release a self-updating OpenClaw under ~/.openclaw starts from, which only an Omarchy carrying omacom/omarchy#13296 and omacom/omarchy#14212 can set up.
Restores #651's recipe and install script exactly, at the 2026.9.9 release master now tracks and pkgrel 2 so it replaces the runtime package's 2026.9.9-1. The package carries the release a self-updating OpenClaw under ~/.openclaw starts from, which only an Omarchy carrying omacom/omarchy#13296 and omacom/omarchy#14212 can set up. The tarball has to be at least as new as any OpenClaw a user has already run: an older one refuses the state a newer one migrated.
Restores #651's recipe and install script exactly, at the 2026.10.1 release master now tracks and pkgrel 2 so it replaces the runtime package's 2026.10.1-1. The package carries the release a self-updating OpenClaw under ~/.openclaw starts from, which only an Omarchy carrying omacom/omarchy#13296 and omacom/omarchy#14212 can set up. The tarball has to be at least as new as any OpenClaw a user has already run: an older one refuses the state a newer one migrated.
Restores #651's seed at the 2026.10.1 release master now tracks, at pkgrel 2 so it replaces the runtime package's 2026.10.1-1. The package carries the release a self-updating OpenClaw under ~/.openclaw starts from, which only an Omarchy carrying omacom/omarchy#13296 and omacom/omarchy#14212 can set up. The tarball has to be at least as new as any OpenClaw a user has already run: an older one refuses the state a newer one migrated. Since 2026.10.1 upstream's install-cli.sh loads install-policy.sh from beside itself, and #651's recipe shipped only install-cli.sh, so every setup failed with "install-policy.sh: No such file or directory". The package now ships every install-*.sh in the tarball, and the build fails if install-cli.sh loads a helper it does not ship, so the next one upstream adds stops this build instead of users' updates.
Restores #651's seed at the 2026.10.1 release master now tracks, at pkgrel 2 so it replaces the runtime package's 2026.10.1-1. The package carries the release a self-updating OpenClaw under ~/.openclaw starts from, which only an Omarchy carrying omacom/omarchy#13296 and omacom/omarchy#14212 can set up. The tarball has to be at least as new as any OpenClaw a user has already run: an older one refuses the state a newer one migrated. Since 2026.10.1 upstream's install-cli.sh loads install-policy.sh from beside itself, and #651's recipe shipped only install-cli.sh, so every setup failed with "install-policy.sh: No such file or directory". The package now ships every install-*.sh in the tarball, and the build fails if install-cli.sh loads a helper it does not ship, so the next one upstream adds stops this build instead of users' updates.
Install OpenClaw as a self-updating copy under ~/.openclaw (cherry picked from commit a85e29a)








OpenClaw could not update itself on any machine that installed it through Omarchy. The
openclawpackage put it in/usr/lib/node_modules/openclaw, owned by root and by pacman, and upstream's updater refuses that install:openclaw updatestops withglobal-install-foreign-destinationorEACCES, and the Control UI's Update Gateway fails withEACCES: permission denied, mkdtemp '/usr/lib/node_modules/.openclaw.update-stage-…', which is why the manual told people not to press it. Choosing OpenClaw under Setup > Default Agent and installing it under Install > AI both led there.Both paths now set up the OpenClaw that upstream's own
install-cli.shmakes: a private Node and the package in~/.openclaw, owned by the user, whichopenclaw updateand the Control UI replace in place before restarting the gateway on the new version. It is the shape Hermes took in #12844: the package is the seed and the runtime lives in the home.omarchy-install-openclaw-cli --nowinstalls theopenclawpackage, runs the installer that shipped inside it against the exact tarball it carries (omacom/omarchy-pkgs#651), and points~/.local/bin/openclawat the result;omarchy-install-ai-openclawis that plus the web app. The CLI, the default agent's TUI, the gateway service and the web app all run that one copy, so an update from the terminal or from the app reaches all of them. A runtime that already answers is never reseeded, since its own updates may have taken it past the packaged release.Nothing in the home is touched until three things are clear:
~/.local/bin/openclawis absent or already Omarchy's link, no otheropenclawcomes first onPATH(Omarchy puts/usr/binand mise's shims ahead of~/.local/bin, and the default agent runs whateverPATHfinds), and no gateway service runs some other OpenClaw, because upstream's installer rewrites whatever gateway it finds loaded. Whose a service is comes from the program itsExecStartruns, or the script handed to that program, rather than any path in the line.--checkalso requires the package, so the default agent never skips the floating terminal and then needs a sudo password where nobody can type it, and root is refused before either mode runs the user's wrapper. The profile, unit and state-directory selectors are cleared for the whole command, since Omarchy's OpenClaw is the default one in~/.openclaw.Existing installs move with a migration that runs
--nowon machines with the package. The package upgrade leaves the old gateway running from deleted files and holding the state directory, so a service the old package installed is stopped before anything is seeded, then reinstalled from the runtime with--runtime-pathpinning the runtime's own Node: upstream's installer keeps whatever Node a unit already ran, and left alone it would run the runtime's code on the/usr/bin/nodethe old package pulled in and #651 no longer depends on. A service counts as the old package's while it runs that package's script, or OpenClaw's script from~/.openclaw/toolson/usr/bin/node; any other Node, Bun or script of the user's is left alone. A service that was running has to be running again afterwards, one the user had stopped or disabled is put back that way, and any failure after the stop names the service it left stopped. The migration stays pending with a message until the package is the seed, as the Neovim clipboard migration does, so this lands first and omacom/omarchy-pkgs#651 right after it; the package alone would remove the runtime under a running gateway with nothing on the machine to move it.Onboarding's watcher gives its gateway probes
/dev/nullfor stdin. The wizard writes its config while prompts remain, a probe of a gateway not yet up hangs until its timeout, and OpenClaw's CLI, killed by it, takes the terminal it inherited out of raw mode on the way out; the wizard never sets raw mode again, so the channel search echoed keys instead of reading them.Remove > AI takes the service, the web app, the package and the
openclawlink off the machine, along with the unit backupsopenclaw updateleaves beside the unit. The runtime stays inside~/.openclawwith the state unless the user deletes that directory when asked: an update migrates the state past the packaged release, which then refuses to open it, so a reinstall picks the kept runtime back up rather than seeding an older one. Deleting~/.openclawalso takes the update snapshots kept beside it.🤖 Generated by Fable 5.1 in Claude Code. Reviewed by Codex XHigh.