Description
After a host reboot, users must manually run multiple commands to reconnect to their sandbox: start Docker, restart the OpenShell gateway, check sandbox state, then connect. This is documented in the troubleshooting guide but could be a single command.
A nemoclaw reconnect command would automate the recovery sequence:
- Verify the container runtime is running
- Start the OpenShell gateway if it's not running (
openshell gateway start --name nemoclaw)
- Wait for the gateway to become healthy
- Check sandbox state (
openshell sandbox list)
- Start port forward and connect to the default (or named) sandbox
Context
Open questions
- Does
openshell gateway start --name nemoclaw work correctly when the gateway container exists but is stopped? Or does it require a destroy/recreate cycle?
- Is the CoreDNS fix needed again after a reboot, or only on first setup?
- Should this be a new
nemoclaw reconnect command, or should nemoclaw <name> connect be smarter about detecting and recovering from a stopped gateway?
Suggested implementation
async function reconnect(sandboxName) {
// 1. Check gateway
const gwInfo = runCaptureOpenshell(["gateway", "info", "-g", "nemoclaw"], { ignoreError: true });
if (!gwInfo || !gwInfo.includes("Running")) {
console.log(" Starting OpenShell gateway...");
runOpenshell(["gateway", "start", "--name", "nemoclaw"]);
// wait for health
}
// 2. Find sandbox
const name = sandboxName || registry.listSandboxes().defaultSandbox;
if (!name) {
console.error(" No sandbox registered. Run `nemoclaw onboard` first.");
process.exit(1);
}
// 3. Connect
sandboxConnect(name);
}
Related
Description
After a host reboot, users must manually run multiple commands to reconnect to their sandbox: start Docker, restart the OpenShell gateway, check sandbox state, then connect. This is documented in the troubleshooting guide but could be a single command.
A
nemoclaw reconnectcommand would automate the recovery sequence:openshell gateway start --name nemoclaw)openshell sandbox list)Context
sandboxConnect()inbin/nemoclaw.jshandles port forwarding and connectionbin/lib/onboard.jshas gateway start, health check, and CoreDNS fix logicregistry.listSandboxes()provides the default sandbox nameOpen questions
openshell gateway start --name nemoclawwork correctly when the gateway container exists but is stopped? Or does it require a destroy/recreate cycle?nemoclaw reconnectcommand, or shouldnemoclaw <name> connectbe smarter about detecting and recovering from a stopped gateway?Suggested implementation
Related