> This page is for v0.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemoclaw/llms.txt.

# Understand Gateway Lifecycle Control

> Understand how NemoClaw invokes native gateway lifecycle commands and verifies recovery.

Built-in OpenClaw and Hermes images leave agent gateway lifecycle with the native agent runtime.
OpenShell owns sandbox containment and the authoritative sandbox lifecycle phase.
NemoClaw resolves the registered sandbox, invokes the native command through that OpenShell sandbox, and observes the result.

| Component            | Responsibility                                                                                                                            |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| OpenShell            | Selects and contains the sandbox, projects approved credentials, and records the authoritative sandbox lifecycle phase.                   |
| Native agent runtime | Owns the agent gateway, background work, cron work, hooks, and child processes.                                                           |
| NemoClaw host CLI    | Resolves the registered sandbox and agent, invokes the native lifecycle command, verifies gateway health, and repairs host-side forwards. |

The NemoClaw host CLI leaves process signaling and respawning to the selected runtime.
It does not add a second gateway lifecycle controller inside the sandbox.

## Verify Recovery Health

`gateway restart` invokes the native OpenClaw or Hermes lifecycle command through the selected OpenShell sandbox.
For OpenClaw, NemoClaw polls `/readyz` for HTTP `200` and JSON `{"ready":true}` before it repairs host-side forwards or reports success.
For Hermes, NemoClaw polls the agent health endpoint for the timeout declared in the agent manifest.
It waits through the shared settle window and requires the gateway to remain healthy before it reports success.

`recover` checks the native health endpoint.
A healthy gateway is not restarted.

If the OpenClaw gateway is stopped, `recover` reports it without relaunching it.

For other stopped gateways or a forced runtime reload, use `gateway restart`.
If the native command cannot run, restart the sandbox through OpenShell.

## Fail Closed on Unsupported Runtimes

NemoClaw runs the lifecycle command only after it resolves a supported gateway runtime for the registered sandbox.
Terminal agents fail as unsupported because they do not have an agent gateway.
An absent agent definition or a native command failure stops the operation before host-forward repair.

For gateway lifecycle, NemoClaw does not fall back to direct provider-container mutation or manual process signaling.
If the sandbox cannot run the current native lifecycle command, update its image:

```bash
nemoclaw <name> rebuild --yes
```

## Related Topics

* [Recover and Rebuild Sandboxes](../operate-sandboxes/recover-and-rebuild-sandboxes) for recovery commands and rebuild fallback.
* [`gateway restart` or `recover` reports `privileged control unavailable`](../../reference/troubleshooting#gateway-restart-or-recover-reports-privileged-control-unavailable) for native lifecycle remediation.
* [Trusted Computing Base](../../security/trusted-computing-base) for the broader security boundary.