Skip to content

[Bug]: beta.2 update candidate config read exits 1 and leaves the systemd unit unchanged #170331

Closed

Description

@DonnieFi

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

During openclaw update from 2026.10.5-beta.1 to 2026.10.5-beta.2, the candidate config reader failed three times, the systemd unit was left unchanged, and the Gateway was restarted from that unit.

Steps to reproduce

  1. npm-global OpenClaw 2026.10.5-beta.1 (f283c3c) on Debian 13, user systemd service openclaw-gateway.service running.
  2. Run openclaw update --channel beta --tag 2026.10.5-beta.2 --yes.
  3. Watch the activating phase, after the updater stops the managed Gateway.

Expected behavior

A config read that fails during the pre-stop unit refresh should surface the child error. The unit refresh should either complete or stop the swap. Previously filed as #169261, which was closed on 2026-10-12. This run still hit the failure on the way to 2026.10.5-beta.2.

Actual behavior

The update printed this once while stopping the Gateway, still on beta.1:

[update:warning:candidate-config-read-failed] Candidate config read failed; the existing service definition was left unchanged. Retry with the updated CLI.
Stopped systemd service: openclaw-gateway.service

After the package on disk was 2026.10.5-beta.2 (467e83d), the same step printed twice:

[update:warning:candidate-config-read-failed] Candidate config read failed: reader process exited with code 1 without a result. The existing service definition was left unchanged. Retry with the updated CLI.

The log then said Gateway service definition left unchanged; ask its deployment owner to repair stale metadata if needed. The service was restarted and the updater recorded Gateway: restarted and verified. The final result was OpenClaw updated to 2026.10.5-beta.2 (from 2026.10.5-beta.1).

The installed beta.2 dist/io.runtime.js builds that warning in finish(). On a non-zero exit with no result frame, failureReason() returns reader process exited with code N without a result. The async reader calls child.stderr.resume() and does not include stderr in the warning.

OpenClaw version

2026.10.5-beta.1 (f283c3c) updating to 2026.10.5-beta.2 (467e83d)

Operating system

Debian GNU/Linux 13 (trixie), Linux 6.12.111+deb13-amd64

Install method

npm global, Node v24.16.0

Model

NOT_ENOUGH_INFO

Provider / routing chain

NOT_ENOUGH_INFO

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs

Stopping managed gateway service before package update...
[update:warning:candidate-config-read-failed] Candidate config read failed; the existing service definition was left unchanged. Retry with the updated CLI.
Stopped systemd service: openclaw-gateway.service
[update:warning:candidate-config-read-failed] Candidate config read failed: reader process exited with code 1 without a result. The existing service definition was left unchanged. Retry with the updated CLI.
[update:warning:candidate-config-read-failed] Candidate config read failed: reader process exited with code 1 without a result. The existing service definition was left unchanged. Retry with the updated CLI.
Gateway service definition left unchanged; ask its deployment owner to repair stale metadata if needed.
Restarting service...
Gateway: restarted and verified.

Screenshots, recordings, and evidence

Follow-up to closed #169261. That report's review said main still discards compatibility-reader failure details. This run is a live beta.1 to beta.2 reproduction, and the later warnings now include reader process exited with code 1 without a result.

Impact and severity

Affected: this npm-global Linux update of the user Gateway service.
Severity: the swap completed, but the unit metadata was left stale and the child failure reason was not logged.
Frequency: 3 failures in this one update (1 before the stop, 2 after the new package was on disk).
Consequence: the operator is told to retry with the updated CLI while that CLI is already running, and to repair stale service metadata after a verified restart.

Additional information

Final phases: requested 35.03s, staging 1.49s, validating 551.93s, activating 764.41s, restarting 83.72s, verifying 92.13s. Gateway downtime recorded as 724.83s. Recorded verification: service running (2026.10.5-beta.2); version verified; channels ready; HTTP ready.

Activity

  1. DonnieFi commented on Oct 12, 2026

    @DonnieFi
    ContributorAuthor

    The open event was dispatched, but the ClawSweeper review queue returned HTTP 500 on all 4 attempts: https://github.com/openclaw/clawsweeper/actions/runs/38316484750

    Commenting so intake runs again.

  2. DonnieFi commented on Oct 12, 2026

    @DonnieFi
    ContributorAuthor

    /review

  3. clawsweeper commented on Oct 12, 2026

    @clawsweeper
    Contributor

    🦞👀
    Exact review queued.

    Re-review progress:

  4. added
    P2
    clawsweeper:needs-maintainer-review
    clawsweeper:no-new-fix-pr
    impact:ux-friction
    issue-rating: 🦪 silver shellfish
    on Oct 12, 2026
  5. clawsweeper commented on Oct 12, 2026

    @clawsweeper
    Contributor

    Codex review: this still needs some work.

    Summary
    Keep open: this issue reports a fresh failure on an official beta update, while the merged diagnostic repair covers error frames and exit facts without explaining this reader's exit.

    Reproducibility: The report supplies an official affected version and concrete logs, and source confirms the warning path; no deterministic reproduction of the unexplained Debian exit was established in this read-only review.

    Next step
    Establish a sanitized reproduction of the beta.2 reader exit and compare the retained unit with the intended definition before selecting a focused repair.

    Review details

    Best possible solution:

    Identify and repair the reader's unexplained exit while preserving best-effort updates, service ownership checks, and private config diagnostics.

    Do we have a high-confidence way to reproduce the issue?

    The report supplies an official affected version and concrete logs, and source confirms the warning path; no deterministic reproduction of the unexplained Debian exit was established in this read-only review.

    Is this the best way to solve the issue?

    Investigating why the reader fails before returning a usable frame is appropriate; echoing raw stderr or aborting every optional read failure would override documented behavior without establishing the cause.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The trigger for the Debian reader's exit without a usable frame remains unknown.
    • The report does not identify which unit fields remained stale or establish that the retained definition caused a runtime failure.

    Codex review notes: model internal, reasoning medium; reviewed against 861eb94f2630.

    Label changes

    Label changes:

    • add P2: An official update encountered repeated config-reader failures, but package activation and Gateway verification succeeded.
    • add impact:ux-friction: The exit-only warning and repeated updated-CLI advice leave the operator investigating skipped service preparation.
    • add issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.
    • add clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.
    • add clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.

    Label justifications:

    • P2: An official update encountered repeated config-reader failures, but package activation and Gateway verification succeeded.
    • impact:ux-friction: The exit-only warning and repeated updated-CLI advice leave the operator investigating skipped service preparation.
    Evidence reviewed

    What I checked:

    Likely related people:

    • Donnie Fiander: Raw commit f67c8ff adds scripts/lib/update-config-runtime-compat.mts:135 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f67c8ffc7287; files: scripts/lib/update-config-runtime-compat.mts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed October 12, 2026, 6:34 PM ET / 22:34 UTC.

  6. DonnieFi commented on Oct 12, 2026

    @DonnieFi
    ContributorAuthor

    Base info after the ClawSweeper review. No fix PR: the review labeled this clawsweeper:no-new-fix-pr because the reader exit still has no deterministic cause.

    What this run established:

    • One failure while beta.1 was stopping the Gateway, with the generic candidate-config-read-failed warning and no child reason.
    • Two more after the package on disk was 2026.10.5-beta.2 (467e83d): reader process exited with code 1 without a result.
    • The log then said the Gateway service definition was left unchanged, restarted the service, and recorded Gateway: restarted and verified.
    • Installed beta.2 dist/io.runtime.js finish() turns a non-zero exit with no result frame into that warning. The async reader calls child.stderr.resume() and does not put stderr in the warning.

    Still missing, which is why this is not a fix PR: which reader operation exited, the child error that produced no frame, and which unit fields differed from the intended definition. The update itself completed.

  7. DonnieFi commented on Oct 12, 2026

    @DonnieFi
    ContributorAuthor

    More detail from the installed 2026.10.5-beta.2 reader and this run's record. Still no fix PR.

    The two warnings after the package on disk used reader process exited with code 1 without a result. Installed dist/io.runtime.js failureReason() returns that sentence only when stdout is not a length-prefixed JSON frame. A frame with ok: false would have included the child message and code. This run did not have that frame.

    The async reader calls child.stderr.resume() and does not attach stderr to the warning. The worker writes its result frame with fs.writeFileSync(1, ...) after pointing console at stderr. Exit 1 with no frame means the child ended before that frame was written. The warning does not name the operation. The reader request is one of readBestEffortConfig, readConfigFileSnapshot, loadConfig, or readCurrentConfigForPolicyCheck.

    The update run record has no service-definition step and no stored field diff. The loaded user unit still starts node on the npm-global openclaw/dist/index.js gateway entry, and it has user drop-ins. I do not have a before/after of unit fields, so I cannot say which field was stale. The failed read's own message says the definition was left unchanged for every failed read. The later line Gateway service definition left unchanged; ask its deployment owner to repair stale metadata if needed. is the separate preserve-definition path: the service verdict is unresolved, or it is owned with refreshDefinition false.

    The doctor spinner repeated the earlier generic warning in the scroll capture. The distinct events are that pre-swap warning and the two no-frame warnings.

  8. steipete commented on Oct 13, 2026

    @steipete
    Contributor

    Thanks. On 2026.10.5-beta.2 the reader now reports the exit (#169284), but its stderr is still withheld, so the crash cause isn't visible. Leaving the unit unchanged is the intended best-effort fallback, and the Gateway restarted and verified. Could you run OPENCLAW_UPDATE_IN_PROGRESS=1 openclaw config get gateway (or openclaw doctor) on beta.2 and share any crash output? We'll also surface a bounded, redacted stderr tail.

  9. DonnieFi commented on Oct 13, 2026

    @DonnieFi
    ContributorAuthor

    Ran both on beta.2 (OpenClaw 2026.10.5-beta.2 (467e83d), Linux, Node v24.16.0 via nvm):

    • OPENCLAW_UPDATE_IN_PROGRESS=1 openclaw config get gateway returned exit 0 with the full gateway block on stdout and nothing on stderr.
    • openclaw doctor returned exit 0 ("Doctor complete.") with no crash or stack trace.

    So the candidate config read doesn't fail when it's run on its own outside the update. It only exits 1 inside the update flow. Doctor's findings, none of them config-read errors:

    • Runtime: no supported system Node, so it keeps the nvm Node 24.16.0
    • Security: plaintext secret fields (gateway.auth.password, models.providers.cursor-cli.apiKey), gateway bound to lan
    • Browser relay: allowLegacyAuth=true
    • Plugin: opencode duplicate id (config plugin overrides global), and it needs capability consent
    • Skills: workspace gog shadows the bundled one

    One thing that might matter: the opencode duplicate and capability-consent warning, if the update's candidate read validates plugins more strictly. I can rerun the update with any debug env you'd like.

  10. DonnieFi commented on Oct 13, 2026

    @DonnieFi
    ContributorAuthor

    Same failure on the update from 2026.10.5-beta.2 (467e83d) to 2026.10.5-beta.3 (1808b57), npm global on the same Debian 13 host, user systemd service openclaw-gateway.service.

    Command: openclaw update --tag 2026.10.5-beta.3 --yes. The run completed. Recorded verification: service running (2026.10.5-beta.3); version verified; channels ready; HTTP ready. Phases: requested 46.05s, staging 1.5s, validating 564.54s, activating 703.03s, restarting 83.86s, verifying 97.6s. Gateway downtime 727.46s.

    During activation, after post-install doctor and plugin convergence, the updater printed this twice, then left the unit alone and restarted it:

    [update:warning:candidate-config-read-failed] Candidate config read failed: reader process exited with code 1 without a result. The existing service definition was left unchanged. Retry with the updated CLI.
    [update:warning:candidate-config-read-failed] Candidate config read failed: reader process exited with code 1 without a result. The existing service definition was left unchanged. Retry with the updated CLI.
    Gateway service definition left unchanged; ask its deployment owner to repair stale metadata if needed.
    Gateway: restarted and verified.
    

    No child stderr or result frame was included. The warning still says to retry with the updated CLI while that CLI is the one performing the restart. Update report: ~/.openclaw/update-reports/0c7f82f7-1db5-4030-a55c-0ab416da07aa.md.

  11. added a commit that references this issue on Oct 14, 2026
    043614d
  12. added a commit that references this issue on Oct 15, 2026
    d037211
  13. added a commit that references this issue on Oct 16, 2026
    166c02d
  14. DonnieFi commented on Oct 19, 2026

    @DonnieFi
    ContributorAuthor

    Same warning once, updating npm-global Debian 13 from 2026.10.5-beta.4 (6b4b2a9) to 2026.10.10-beta.2, while stopping user systemd service openclaw-gateway.service:

    [update:warning:candidate-config-read-failed] Candidate config read failed: reader process exited with code 1 without a result. The existing service definition was left unchanged. Retry with the updated CLI.
    

    The updater then stopped the service and continued. The installed CLI now reports 2026.10.10-beta.2 (2b85c4c). The warning has not repeated in the post-install doctor output.

    #170373 (043614d9c34f3f6fe337079d3a4a4a038880c020) is in tag v2026.10.10-beta.2 (compare status ahead, behind_by 0). It is not in v2026.10.5-beta.4 (compare status diverged).

  15. added a commit that references this issue on Oct 22, 2026
    52d3cec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2clawsweeper:needs-maintainer-reviewclawsweeper:no-new-fix-primpact:ux-frictionissue-rating: 🦪 silver shellfish

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions