Repository navigation
Description
Bug type
Auto-update / managed-service handoff bug
Summary
On a Linux systemd user-service install, the stable auto-update reached its rollout window and attempted to apply an available npm package update. The update failed because the spawned updater still detected itself as running inside the Gateway process tree and refused to stop/restart the Gateway that owns it.
This appears to violate the documented managed-service update contract: package-manager updates requested through the live Gateway should start a detached handoff outside the running Gateway process, then let the normal openclaw update --yes --json path stop the service, replace the package, refresh service metadata, restart, and verify reachability.
Environment
- OS: Linux, systemd user service
- Install method: global npm install
- Channel: stable
- Auto-update: enabled
- Before: OpenClaw
2026.6.1 - Target/latest: OpenClaw
2026.6.5 - Gateway service:
openclaw-gateway.servicemanaged bysystemctl --user - Gateway bind: loopback
Relevant auto-update config
{
update: {
channel: "stable",
checkOnStart: true,
auto: {
enabled: true,
stableDelayHours: 6,
stableJitterHours: 12,
betaCheckIntervalHours: 1
}
}
}Timeline
- Gateway detected
2026.6.5while running2026.6.1. - Stable rollout defer behaved as expected until the deterministic jitter window elapsed.
- Auto-update attempted to apply the update.
- The attempt failed with
auto-update attempt failed reason: non-zero-exit. - A manual CLI update from a shell outside the Gateway service succeeded, and the Gateway now runs
2026.6.5.
Observed log excerpt
[gateway] auto-update attempt failed
openclaw update detected it is running inside the gateway process tree.
Gateway PID <redacted> is an ancestor of this process, so this updater cannot safely stop or restart the gateway that owns it.
Run `openclaw update` from a shell outside the gateway service, or stop the gateway service first and then update.
auto-update attempt failed reason: non-zero-exit
Expected behavior
For a managed Linux systemd user-service install, the Gateway auto-update path should either:
- Start a truly detached update handoff outside
openclaw-gateway.servicebefore invokingopenclaw update --yes, or - Refuse before attempting the update and report a clear actionable message that auto-update cannot safely run in this service topology.
It should not start an update path that immediately fails because the updater is still a descendant of the Gateway process it needs to stop/restart.
Actual behavior
The auto-update attempt invoked an updater that was still in the Gateway process tree. The CLI self-protection correctly refused to continue, so the update did not apply automatically.
Manual external update worked:
OpenClaw 2026.6.5
Gateway version: 2026.6.5
Connectivity probe: ok
Related notes
This is adjacent to other managed-service update handoff issues, but the concrete failure mode here is Linux/systemd user-service auto-update failing before package swap because the updater has not escaped the Gateway process tree. It is not the stale hashed-bundle case and not a macOS launchd recovery case.
The local service file was refreshed successfully after manual update. The service is now healthy; the report is about the auto-update handoff path that failed before the manual workaround.
Privacy note
Hostnames, IP addresses, user paths beyond standard OpenClaw/systemd locations, session identifiers, chat/channel identifiers, and private configuration values were intentionally omitted/redacted.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 10, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 11, 2026, 6:30 PM ET / 22:30 UTC.
Summary
Codex review failed: retryable codex transport failure (exit 1).
Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.
Ways to help us reproduce this
Next step
Review did not complete, so no work-lane recommendation was made.
Review details
Best possible solution:
Retry the Codex review after fixing the execution failure.
Do we have a high-confidence way to reproduce the issue?
Unclear. The review failed before ClawSweeper could establish a reproduction path.
Is this the best way to solve the issue?
Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.
AGENTS.md: unclear because the file could not be read completely.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 301213a05f2f.
Label changes
Label changes:
issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.clawsweeper:needs-info: Current issue advisory state selects this label.P2: Current review triage priority is none.clawsweeper:fix-shape-clear: Current issue advisory state no longer selects this label.clawsweeper:queueable-fix: Current issue advisory state no longer selects this label.clawsweeper:source-repro: Current issue advisory state no longer selects this label.issue-rating: 🦞 diamond lobster: Current issue advisory state no longer selects this label.impact:other: Current review selected no impact labels.Evidence reviewed
What I checked:
OPENCLAW_SERVICE_MARKER=openclaw,OPENCLAW_SERVICE_KIND=gateway) previously was not classified as supervised, so startup auto-update could spawnopenclaw update --yes --channel ... --jsonas a child of the live Gateway process. This patch classifies that Linux marker set assystemd, which routes auto-update throughstartManagedServiceUpdateHandoffand avoids invoking the direct updater under the Gateway process tree.\n- Real environment tested: PR fix(update): route Linux service auto-updates through handoff #91833 head1fd06a257acfe83531400b19e954e4704a011e28; local source checkout/Users/andy/openclaw-91823-auto-update-handoff; live Lima Ubuntu Linux aarch64 VM with user systemd running; transient user serviceopenclaw-gateway.servicestarted bysystemd-run --user; compiled PR bundle fromnode scripts/tsdown-build.mjs.\n- Exact steps or command run after this patch:\n ```sh\n node scripts/run-vitest.mjs src/infra/update-startup.test.ts src/infra/supervisor-markers.test.ts src/infra/update-managed-service-handoff.test.ts src/infra/process-respawn.test.ts src/cli/update-cli.test.ts\n pnpm exec oxfmt --check --threads=1 src/infra/update-startup.test.ts src/infra/supervisor-markers.ts src/infra/supervisor-markers.test.ts src/infra/update-startup.ts src/infra/process-respawn.test.ts\n git diff --check\n node scripts/tsdown-build.mjs\n limactl shell memory-mcp-tes.Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.joshavant commentedon Jun 12, 2026
Thanks for the report, @hanyizuo.
This was a real Linux service auto-update breakage. Older/stale user systemd gateway services could have only the generic OpenClaw service markers (
OPENCLAW_SERVICE_MARKER=openclaw,OPENCLAW_SERVICE_KIND=gateway) without the newer systemd-specific hints. In that shape, startup auto-update did not recognize the gateway as managed by systemd, so it tried to runopenclaw updateinside the live Gateway process tree. The updater then correctly refused to mutate the active gateway service process.Fixed by #92282, merged as 8673c65. The fix keeps generic supervisor detection unchanged, but makes the update-specific paths recognize OpenClaw’s Linux gateway service markers and route auto-update through the existing managed-service handoff.
We verified both sides with a real user systemd service on Testbox:
auto-update handoff startedauto-update attempt failedClosing this as fixed. Thanks again for catching it.