fix(sandbox): respawn gateway after watchdog SIGTERM instead of exiting PID 1 - #6131
Conversation
…ng PID 1 The serving watchdog SIGTERMs a gateway that dropped its HTTP listener so the respawn loop can relaunch it, but OpenClaw exits 0 on a graceful SIGTERM. Both respawn loops treat a clean rc=0 exit as an operator-requested shutdown and exit PID 1, tearing down the whole sandbox instead of respawning it. Record an identity-scoped kill marker before the watchdog SIGTERM and consume it in both respawn loops, so a watchdog-induced clean exit respawns while a genuine operator clean exit still stops the sandbox. The marker is scoped to the exact pid and start identity being killed and consumed once, so a stale marker cannot force an unwanted respawn. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
📝 WalkthroughWalkthroughAdds a kill marker file in ChangesWatchdog kill marker
Estimated code review effort: 3 (Moderate) | ~25 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the Show a code coverage summary of the most covered files.
TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most covered files.
Updated |
PR Review Advisor — Changes requestedMerge posture: Do not merge yet Action checklist
Findings index
Review findings by urgency: 0 required fixes, 4 items to resolve/justify, 0 in-scope improvements
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
test/gateway-watchdog-kill-marker.test.ts (2)
37-50: 🎯 Functional Correctness | 🔵 Trivial | 🏗️ Heavy liftMarker tests don't exercise the actual respawn-loop integration.
runMarkerScenarioextracts and runsrecord_gateway_watchdog_kill/consume_gateway_watchdog_kill/_nemoclaw_safe_replace_tmp_filein an isolated bash harness, decoupled from the real respawn loops inscripts/nemoclaw-start.sh(context snippet 3, lines 4809-4820) that actually callconsume_gateway_watchdog_kill "${EXITED_GATEWAY_PID}:${GATEWAY_PID_START_IDENTITY}". This validates the marker helpers' internal contract well, but a wiring regression in the respawn loop itself (e.g., wrong identity string format, calling the function with swapped arguments, or forgetting to guard onRC -eq 0) wouldn't be caught by any test here. Per path instructions for test files, prefer observable outcomes through the public boundary over private-shape assertions — an end-to-end scenario driving the actual respawn loop (or at least thewhile :; do ... doneblock from context snippet 3) would give stronger behavioral confidence for the fix this PR is making.As per path instructions, "Prefer observable outcomes through the public boundary over source-text, private-shape, or mock-call assertions."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/gateway-watchdog-kill-marker.test.ts` around lines 37 - 50, The marker test is only validating the helper functions in isolation, so it can miss wiring bugs in the real respawn loop. Update the test around runMarkerScenario to exercise the actual scripts/nemoclaw-start.sh respawn path (the while-loop that calls consume_gateway_watchdog_kill with EXITED_GATEWAY_PID:GATEWAY_PID_START_IDENTITY) and assert observable behavior through the public boundary instead of extracting record_gateway_watchdog_kill, consume_gateway_watchdog_kill, and _nemoclaw_safe_replace_tmp_file directly. Keep the test focused on end-to-end outcomes that prove the marker is consumed correctly by the respawn-loop integration.Source: Path instructions
22-35: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueBrace-matching extraction is fragile for future edits to the shell script.
extractShellFunctionfinds the closing brace by looking for a line that is exactly"}". Ifrecord_gateway_watchdog_kill,consume_gateway_watchdog_kill, or_nemoclaw_safe_replace_tmp_fileever gain an indented nested block (e.g. anif/casewhose closing brace/fiisn't the very last unindented}), or another function definition sneaks in between, this silently extracts the wrong span (or throws a confusing "closing brace" error) without any indication that the shell function's actual structure changed. This is acceptable for the current flat function bodies, but it's a maintenance trap.♻️ Suggested hardening
- const endIndex = requireNonNegative( - lines.findIndex((line, index) => index > 0 && line === "}"), - `function ${name} missing closing brace in ${scriptPath}`, - ); + const endIndex = requireNonNegative( + lines.findIndex((line, index) => index > 0 && /^}\s*$/.test(line)), + `function ${name} missing closing brace in ${scriptPath}`, + );🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/gateway-watchdog-kill-marker.test.ts` around lines 22 - 35, The shell-function extraction in extractShellFunction is too brittle because it assumes the closing brace is a line containing only “}”. Update the helper so it locates the matching end of the function body more robustly for record_gateway_watchdog_kill, consume_gateway_watchdog_kill, and _nemoclaw_safe_replace_tmp_file, rather than relying on a single unindented brace line. Use the existing function-name marker and add structure-aware matching (or a safer parsing strategy) so nested blocks or intervening content do not produce incorrect spans or misleading errors.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/nemoclaw-start.sh`:
- Around line 4817-4818: The gateway stop handling in
mark_openclaw_gateway_stopped clears GATEWAY_PID_START_IDENTITY too early, so
consume_gateway_watchdog_kill receives an incomplete "${EXITED_GATEWAY_PID}:"
key and cannot match the watchdog record. Preserve the exited gateway start
identity in a temporary variable, or defer clearing GATEWAY_PID_START_IDENTITY
until after the consume_gateway_watchdog_kill call in the respawn loops, so the
full "${pid}:${start_identity}" value is used before deciding whether to exit 0.
---
Nitpick comments:
In `@test/gateway-watchdog-kill-marker.test.ts`:
- Around line 37-50: The marker test is only validating the helper functions in
isolation, so it can miss wiring bugs in the real respawn loop. Update the test
around runMarkerScenario to exercise the actual scripts/nemoclaw-start.sh
respawn path (the while-loop that calls consume_gateway_watchdog_kill with
EXITED_GATEWAY_PID:GATEWAY_PID_START_IDENTITY) and assert observable behavior
through the public boundary instead of extracting record_gateway_watchdog_kill,
consume_gateway_watchdog_kill, and _nemoclaw_safe_replace_tmp_file directly.
Keep the test focused on end-to-end outcomes that prove the marker is consumed
correctly by the respawn-loop integration.
- Around line 22-35: The shell-function extraction in extractShellFunction is
too brittle because it assumes the closing brace is a line containing only “}”.
Update the helper so it locates the matching end of the function body more
robustly for record_gateway_watchdog_kill, consume_gateway_watchdog_kill, and
_nemoclaw_safe_replace_tmp_file, rather than relying on a single unindented
brace line. Use the existing function-name marker and add structure-aware
matching (or a safer parsing strategy) so nested blocks or intervening content
do not produce incorrect spans or misleading errors.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 8c2fb25d-a116-4cf7-b569-3af8ccc64271
📒 Files selected for processing (2)
scripts/nemoclaw-start.shtest/gateway-watchdog-kill-marker.test.ts
PR Review Advisor (Nemotron Ultra) — Changes requestedMerge posture: Do not merge yet Action checklist
Findings index
🚨 Required before mergeAddress these before merging unless a maintainer explicitly overrides the advisor with rationale.
|
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Target RecommendationRequired E2E targets: Dispatch required E2E targets:
Full E2E target advisor summaryE2E Target AdvisorBase: Required E2E targets
Optional E2E targets
Relevant changed files
|
…l marker
mark_openclaw_gateway_stopped clears GATEWAY_PID_START_IDENTITY, and both
respawn loops ran it (directly, and via openclaw_reap_exited_gateway) before
consume_gateway_watchdog_kill. The consume argument therefore degraded to
"${pid}:" with an empty identity and never matched the watchdog's
"${pid}:${start_identity}" record, so a watchdog-induced clean exit still fell
through to exit 0 and tore down the sandbox.
Snapshot the start identity into EXITED_GATEWAY_START_IDENTITY alongside
EXITED_GATEWAY_PID before the stop clears it, and consume with the snapshot in
both loops. Add regression coverage for the snapshot-before-clear contract.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
…espawn-clean-exit
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/gateway-watchdog-kill-marker.test.ts`:
- Around line 100-125: The timing tests are duplicating the respawn-loop logic
instead of exercising the real ordering in the production script. Update the
`runMarkerScenario` harness in `gateway-watchdog-kill-marker.test.ts` to invoke
the actual respawn-loop critical section from `scripts/nemoclaw-start.sh` (or
extract that section into a callable helper) so the snapshot-before-clear
behavior is tested directly. Ensure the scenarios use the real
`EXITED_GATEWAY_START_IDENTITY` snapshot and `consume_gateway_watchdog_kill`
path from the loop, rather than hand-writing a copied assignment order or
consuming with `GATEWAY_PID_START_IDENTITY`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 8a22a4b3-aea2-4902-ad78-4205e8db61e3
📒 Files selected for processing (2)
scripts/nemoclaw-start.shtest/gateway-watchdog-kill-marker.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- scripts/nemoclaw-start.sh
…arker The prior ordering tests hand-wrote the loop's assignment order inline, so they would keep passing even if the production snapshot-before-clear ordering regressed. Extract the non-root respawn loop's critical section straight from scripts/nemoclaw-start.sh and run it with wait/mark_openclaw_gateway_stopped stubbed to model a clean exit and the identity clear, so a moved snapshot or wrong variable makes the tests fail. Cover respawn on a matching watchdog marker and teardown on both a no-marker operator exit and a non-matching marker. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/gateway-watchdog-kill-marker.test.ts (1)
137-149: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winNo equivalent coverage for the root respawn loop's critical section.
The PR objectives state both root and non-root respawn loops were updated to distinguish watchdog-induced exits from operator shutdowns, but
runRespawnCriticalSection/extractRespawnCriticalSectiononly target the non-root loop. If the root loop has an analogous critical section, consider adding a symmetric extraction + test to guard against the same regression there.#!/bin/bash # Check whether the root respawn loop has an analogous consume_gateway_watchdog_kill gate. fd -a nemoclaw-start.sh scripts | xargs -I{} rg -n -B3 -A3 'consume_gateway_watchdog_kill' {}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/gateway-watchdog-kill-marker.test.ts` around lines 137 - 149, The current tests only exercise the non-root respawn loop, so add symmetric coverage for the root respawn loop’s critical section as well. Update the test helpers around extractRespawnCriticalSection and runRespawnCriticalSection to also locate and execute the root loop’s analogous gate, then add assertions that a watchdog-recorded identity respawns while a clean exit or mismatched marker tears down. Use the root loop’s unique consume_gateway_watchdog_kill/respawn loop symbols to keep the test resilient if the script layout changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@test/gateway-watchdog-kill-marker.test.ts`:
- Around line 137-149: The current tests only exercise the non-root respawn
loop, so add symmetric coverage for the root respawn loop’s critical section as
well. Update the test helpers around extractRespawnCriticalSection and
runRespawnCriticalSection to also locate and execute the root loop’s analogous
gate, then add assertions that a watchdog-recorded identity respawns while a
clean exit or mismatched marker tears down. Use the root loop’s unique
consume_gateway_watchdog_kill/respawn loop symbols to keep the test resilient if
the script layout changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 628a4cf5-950b-4206-b8f4-5810fa093de4
📒 Files selected for processing (1)
test/gateway-watchdog-kill-marker.test.ts
## Summary - Add the `v0.0.72` release-note section with links to the deeper docs pages for installer recovery, command diagnostics, inference, policy, and sandbox repair changes. - Document the custom preset `allowed_ips` guard for user-authored policy files. ## Related Issue None. ## Source summary - #6132 -> `docs/about/release-notes.mdx`: Summarizes installer and upgrade recovery before generic onboarding, with links to quickstart and lifecycle docs. - #6087 -> `docs/network-policy/customize-network-policy.mdx`: Documents that user-authored custom presets reject `allowed_ips` for ordinary endpoints; also summarized in release notes. - #5975 -> `docs/about/release-notes.mdx`: Summarizes safer curl-based inference probes that keep API keys out of process arguments. - #6044 -> `docs/about/release-notes.mdx`: Summarizes compact `channels status` configuration reporting. - #6096 -> `docs/about/release-notes.mdx`: Summarizes OpenClaw EC2 metadata discovery disablement and links to security guidance. - #5980 and #5991 -> `docs/about/release-notes.mdx`: Summarizes `exec` multiline argument rejection and recovery guidance. - #6023 -> `docs/about/release-notes.mdx`: Summarizes registered-provider diagnostics for `inference set` failures. - #6074 -> `docs/about/release-notes.mdx`: Summarizes the refreshed NVIDIA Endpoints featured-model selection behavior. - #5969 -> `docs/about/release-notes.mdx`: Summarizes `credentials add` provider credential registration. - #6060 -> `docs/about/release-notes.mdx`: Summarizes mutable OpenClaw config permission restoration after `exec`. - #6134 -> `docs/about/release-notes.mdx`: Summarizes restored Tavily access for managed Python workflows. - #6089 -> `docs/about/release-notes.mdx`: Summarizes Hermes runtime version-scheme comparison during upgrade checks. - #6131 -> `docs/about/release-notes.mdx`: Summarizes OpenClaw gateway watchdog recovery behavior. - #5976 and #5990 -> `docs/about/release-notes.mdx`: Summarizes prompt stdin EOF cancellation behavior during onboarding. - #5540 -> `docs/about/release-notes.mdx`: Summarizes clarified host-level and per-sandbox status command scope. - #5978 and #6018 -> `docs/about/release-notes.mdx`: Summarizes policy-denial log breadcrumbs in connect shells. ## Testing - `npm run docs:sync-agent-variants` - `npm run docs` - Commit hooks passed during `git commit`, including commitlint and gitleaks. - Pre-push hook passed during `git push`, including TypeScript CLI and package/tag version sync. ## Checklist - [x] Documentation updated. - [x] `npm run docs` completed with 0 errors and 1 existing Fern warning. - [x] No source code or generated build artifacts committed. Signed-off-by: Miyoung Choi <miyoungc@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for v0.0.72 covering improved installer recovery, clearer CLI diagnostics, safer inference setup and provider switching, better credential handling, stronger policy boundaries, and more robust runtime repair behavior. * Updated network policy guidance to clarify when `allowed_ips` can be used, including a specific exception for the sandbox-to-host bridge endpoint. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
…ng PID 1 (NVIDIA#6131) <!-- markdownlint-disable MD041 --> ## Summary The in-sandbox OpenClaw gateway exits spontaneously on v0.0.71 and the sandbox is torn down, so the TUI and slash commands fail with "OpenClaw gateway is not running inside the sandbox (sandbox likely restarted)" and recovery also fails. This restores the respawn supervisor's intent so a watchdog-driven gateway kill relaunches the gateway instead of stopping PID 1. ## Related Issue Fixes NVIDIA#6107 ## Changes - The serving watchdog SIGTERMs a gateway that has dropped its HTTP listener so the respawn loop can relaunch it, but OpenClaw exits 0 on a graceful SIGTERM. Both PID-1 respawn loops treated a clean rc=0 exit as an operator-requested shutdown and called `exit 0`, tearing down the whole sandbox. - The watchdog now records an identity-scoped kill marker (`<pid>:<start-identity>`) immediately before its `kill -TERM`. - Both respawn loops (root and non-root) exit PID 1 on rc=0 only when the exit was not a watchdog kill; a watchdog-induced clean exit respawns, while a genuine operator clean exit still stops the sandbox. - The marker is consumed once and scoped to the exact pid and start identity, so a stale marker cannot force an unwanted respawn and self-clears on a non-matching read. - New unit coverage for the marker record/consume helpers (`test/gateway-watchdog-kill-marker.test.ts`). ## Type of Change - [x] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates <!-- Check all that apply. For any "covered by existing tests", "not applicable", or waiver entry, add a brief justification on the same line or in the Changes section. --> - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [ ] Docs updated for user-facing behavior changes - [x] Docs not applicable — justification: - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification <!-- Check each item you ran and confirmed. Leave unchecked items you skipped. Doc-only changes do not require npm test unless you ran it. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes - [x] Targeted tests pass for changed behavior - [ ] Full `npm test` passes (broad runtime changes only) - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) - [ ] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: Tinson Lai <tinsonl@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved gateway shutdown handling: intentional watchdog-triggered listener loss no longer stops the whole container when the event is recognized as safe. * Added a configurable watchdog kill-marker mechanism (via an environment setting) to ensure the gateway can restart without false container exits. * **Tests** * Added automated coverage for kill-marker matching/mismatching, missing/empty marker cases, and single-use consumption. * Validated respawn vs. teardown behavior for timing-sensitive gateway watchdog scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Tinson Lai <tinsonl@nvidia.com> Co-authored-by: Claude <noreply@anthropic.com>
## Summary - Add the `v0.0.72` release-note section with links to the deeper docs pages for installer recovery, command diagnostics, inference, policy, and sandbox repair changes. - Document the custom preset `allowed_ips` guard for user-authored policy files. ## Related Issue None. ## Source summary - NVIDIA#6132 -> `docs/about/release-notes.mdx`: Summarizes installer and upgrade recovery before generic onboarding, with links to quickstart and lifecycle docs. - NVIDIA#6087 -> `docs/network-policy/customize-network-policy.mdx`: Documents that user-authored custom presets reject `allowed_ips` for ordinary endpoints; also summarized in release notes. - NVIDIA#5975 -> `docs/about/release-notes.mdx`: Summarizes safer curl-based inference probes that keep API keys out of process arguments. - NVIDIA#6044 -> `docs/about/release-notes.mdx`: Summarizes compact `channels status` configuration reporting. - NVIDIA#6096 -> `docs/about/release-notes.mdx`: Summarizes OpenClaw EC2 metadata discovery disablement and links to security guidance. - NVIDIA#5980 and NVIDIA#5991 -> `docs/about/release-notes.mdx`: Summarizes `exec` multiline argument rejection and recovery guidance. - NVIDIA#6023 -> `docs/about/release-notes.mdx`: Summarizes registered-provider diagnostics for `inference set` failures. - NVIDIA#6074 -> `docs/about/release-notes.mdx`: Summarizes the refreshed NVIDIA Endpoints featured-model selection behavior. - NVIDIA#5969 -> `docs/about/release-notes.mdx`: Summarizes `credentials add` provider credential registration. - NVIDIA#6060 -> `docs/about/release-notes.mdx`: Summarizes mutable OpenClaw config permission restoration after `exec`. - NVIDIA#6134 -> `docs/about/release-notes.mdx`: Summarizes restored Tavily access for managed Python workflows. - NVIDIA#6089 -> `docs/about/release-notes.mdx`: Summarizes Hermes runtime version-scheme comparison during upgrade checks. - NVIDIA#6131 -> `docs/about/release-notes.mdx`: Summarizes OpenClaw gateway watchdog recovery behavior. - NVIDIA#5976 and NVIDIA#5990 -> `docs/about/release-notes.mdx`: Summarizes prompt stdin EOF cancellation behavior during onboarding. - NVIDIA#5540 -> `docs/about/release-notes.mdx`: Summarizes clarified host-level and per-sandbox status command scope. - NVIDIA#5978 and NVIDIA#6018 -> `docs/about/release-notes.mdx`: Summarizes policy-denial log breadcrumbs in connect shells. ## Testing - `npm run docs:sync-agent-variants` - `npm run docs` - Commit hooks passed during `git commit`, including commitlint and gitleaks. - Pre-push hook passed during `git push`, including TypeScript CLI and package/tag version sync. ## Checklist - [x] Documentation updated. - [x] `npm run docs` completed with 0 errors and 1 existing Fern warning. - [x] No source code or generated build artifacts committed. Signed-off-by: Miyoung Choi <miyoungc@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for v0.0.72 covering improved installer recovery, clearer CLI diagnostics, safer inference setup and provider switching, better credential handling, stronger policy boundaries, and more robust runtime repair behavior. * Updated network policy guidance to clarify when `allowed_ips` can be used, including a specific exception for the sandbox-to-host bridge endpoint. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
The in-sandbox OpenClaw gateway exits spontaneously on v0.0.71 and the sandbox is torn down, so the TUI and slash commands fail with "OpenClaw gateway is not running inside the sandbox (sandbox likely restarted)" and recovery also fails. This restores the respawn supervisor's intent so a watchdog-driven gateway kill relaunches the gateway instead of stopping PID 1.
Related Issue
Fixes #6107
Changes
exit 0, tearing down the whole sandbox.<pid>:<start-identity>) immediately before itskill -TERM.test/gateway-watchdog-kill-marker.test.ts).Type of Change
Quality Gates
Verification
Verifiedin GitHubnpx prek run --from-ref main --to-ref HEADpassesnpm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes only)Signed-off-by: Tinson Lai tinsonl@nvidia.com
Summary by CodeRabbit