openclaw - ✅(Solved) Fix [Bug]: gateway restart returns exit=null on systemd instead of exit=0 (2026.4.15) [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#68109Fetched 2026-04-18 05:53:51
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1referenced ×1

Error Message

unnecessary rollbacks or error handling.

Fix Action

Fixed

PR fix notes

PR #68302: Fix/systemd restart exit null

Description (problem / solution / changelog)

Summary

Describe the problem and fix in 2–5 bullets:

If this PR fixes a plugin beta-release blocker, title it fix(<plugin-id>): beta blocker - <summary> and link the matching Beta blocker: <plugin-name> - <summary> issue labeled beta-blocker. Contributors cannot label PRs, so the title is the PR-side signal for maintainers and automation.

  • Problem:
  • Why it matters:
  • What changed:
  • What did NOT change (scope boundary):

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #
  • Related #
  • This PR fixes a bug or regression

Root Cause (if applicable)

For bug fixes or regressions, explain why this happened, not just what changed. Otherwise write N/A. If the cause is unclear, write Unknown.

  • Root cause:
  • Missing detection / guardrail:
  • Contributing context (if known):

Regression Test Plan (if applicable)

For bug fixes or regressions, name the smallest reliable test coverage that should catch this. Otherwise write N/A.

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file:
  • Scenario the test should lock in:
  • Why this is the smallest reliable guardrail:
  • Existing test that already covers this (if any):
  • If no new test is added, why not:

User-visible / Behavior Changes

List user-visible changes (including defaults/config).
If none, write None.

Diagram (if applicable)

For UI changes or non-trivial logic flows, include a small ASCII diagram reviewers can scan quickly. Otherwise write N/A.

Before:
[user action] -> [old state]

After:
[user action] -> [new state] -> [result]

Security Impact (required)

  • New permissions/capabilities? (Yes/No)
  • Secrets/tokens handling changed? (Yes/No)
  • New/changed network calls? (Yes/No)
  • Command/tool execution surface changed? (Yes/No)
  • Data access scope changed? (Yes/No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS:
  • Runtime/container:
  • Model/provider:
  • Integration/channel (if any):
  • Relevant config (redacted):

Steps

Expected

Actual

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios:
  • Edge cases checked:
  • What you did not verify:

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? (Yes/No)
  • Config/env changes? (Yes/No)
  • Migration needed? (Yes/No)
  • If yes, exact upgrade steps:

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk:
    • Mitigation:

Changed files

  • src/daemon/systemd.ts (modified, +5/-0)
  • src/gateway/openai-http.ts (modified, +29/-12)

Code Example

CMD: openclaw gateway restart
OUT: Restarted systemd service: openclaw-gateway.service
Process exit code: null
RAW_BUFFERClick to expand / collapse

Environment

  • OpenClaw: 2026.4.15
  • OS: Ubuntu / systemd user service

What happened

openclaw gateway restart exits with null instead of 0 on success.

Note: this was confirmed using the 2026.4.15 CLI binary directly.

Log:

CMD: openclaw gateway restart
OUT: Restarted systemd service: openclaw-gateway.service
Process exit code: null

Expected behavior

When the gateway restarts successfully, the process should exit with code 0. Exiting with null makes it impossible for automation scripts to reliably determine whether the restart succeeded or failed.

Impact

Any automated upgrade or deployment pipeline that checks exit codes will mistakenly treat a successful restart as a failure, potentially triggering unnecessary rollbacks or error handling.

Suggestion

Ensure openclaw gateway restart returns exit 0 on success across all platforms (systemd, launchd, pm2, etc.).

extent analysis

TL;DR

The openclaw gateway restart command should be modified to return a non-null exit code, specifically 0, when the restart operation is successful.

Guidance

  • Verify the current implementation of the openclaw gateway restart command to identify why it's returning null instead of 0 on success.
  • Check the systemd service configuration for openclaw-gateway.service to ensure it's properly set up to return exit codes.
  • Consider adding error handling to the openclaw gateway restart command to catch and handle any exceptions that might be causing the null exit code.
  • Review the automation scripts that rely on the exit code of openclaw gateway restart to determine success or failure, and consider adding temporary workarounds to handle the current null exit code.

Example

No code snippet is provided as the issue lacks specific implementation details.

Notes

The fix may require changes to the OpenClaw codebase, specifically the openclaw gateway restart command, to ensure it returns the correct exit code on success.

Recommendation

Apply a workaround to the automation scripts to temporarily handle the null exit code until the underlying issue with openclaw gateway restart is resolved, as the root cause of the problem is not explicitly stated and may require further investigation.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

When the gateway restarts successfully, the process should exit with code 0. Exiting with null makes it impossible for automation scripts to reliably determine whether the restart succeeded or failed.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: gateway restart returns exit=null on systemd instead of exit=0 (2026.4.15) [1 pull requests, 1 participants]