Skip to content
2 changes: 2 additions & 0 deletions docs/reference/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3073,6 +3073,8 @@ Earlier releases only stopped `openshell forward` processes, so those orphans ac

For Local Ollama setups, uninstall also stops matching Ollama auth proxy processes before deleting `~/.nemoclaw` state so stale proxy listeners do not block a later reinstall.

For Hermes setups, uninstall verifies and stops the selected gateway's managed port-forward watcher and sandbox-scoped forward before deleting their state. If either cleanup cannot be confirmed, uninstall returns nonzero and preserves the watcher state so the cleanup can be retried without touching sibling gateways.

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
On Linux, uninstall removes `~/.local/state/nemoclaw`, which contains Docker-driver gateway SQLite data, audit logs, VM-driver state, and standalone-fallback gateway PID files.

| Flag | Effect |
Expand Down
31 changes: 31 additions & 0 deletions src/lib/actions/uninstall/hermes-forward-watcher-cleanup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import {
type HermesForwardWatcherHost,
stopHermesForwardWatcherProcess,
stopHermesSandboxForward,
} from "../../adapters/openshell/hermes-forward-watcher";
import { readHermesForwardWatcherState } from "../../state/hermes-forward-watcher";

export function stopHermesForwardWatchers(
nemoclawStateDir: string,
host: HermesForwardWatcherHost,
): boolean {
const state = readHermesForwardWatcherState(nemoclawStateDir);
if (!state.readable) {
host.warn(`Failed to inspect Hermes forward watcher state under ${nemoclawStateDir}.`);
return false;
}
if (state.watchers.length === 0) {
host.log("No Hermes forward watchers found");
return true;
}

let allStopped = true;
for (const watcher of state.watchers) {
if (!stopHermesForwardWatcherProcess(watcher, host)) allStopped = false;
if (!stopHermesSandboxForward(watcher, host)) allStopped = false;
}
return allStopped;
}
Loading
Loading