You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MacOS] Gateway destroy kills sandbox session with Broken pipe instead of graceful error #992
NV QABugs found by the NVIDIA QA Teamarea: cliCommand line interface, flags, terminal UX, or outputarea: installInstall, setup, prerequisites, or uninstall flowarea: onboardingOnboarding FSM, provider setup, sandbox launch, or first-run flowplatform: macosAffects macOS, including Apple Silicon
When the OpenShell gateway is destroyed while a sandbox session is active, the sandbox connection is abruptly terminated with a Broken pipe error and exit code 255. The user receives no graceful error message indicating the gateway is restarting, and there is no automatic recovery once the gateway comes back. Active inference requests that were in-flight complete successfully, but subsequent requests and the sandbox session itself are killed without warning.
Steps to reproduce
Complete nemoclaw setup successfully
Set inference route: openshell inference set --provider ollama-local --model llama3.2:1b
Connect to sandbox in Terminal 1: nemoclaw connect
Start a looping inference request inside the sandbox:
for i in $(seq 1 20); do
echo --- Request $i at $(date +%H:%M:%S) ---
curl -s -m 5 https://inference.local/v1/chat/completions \
-H Content-Type: application/json \
-d '{ model : llama3.2:1b , messages :[{ role : user , content : say hi }]}' \
| head -c 120
echo
sleep 2
done
In Terminal 2 (host), destroy and restart the gateway:
Picking this up as part of a broader onboard.ts decomposition effort.
The fix for this bug, done right, creates reusable infrastructure that improves destroy, rebuild, stop, status, list, connect, and uninstall. The core issue isn't just the Broken pipe UX — it's that no destructive operation in the CLI checks for active SSH sessions before proceeding.
Proposed approach
Create a shared sandbox-session-state.ts module with an getActiveSandboxSessions(sandboxName) utility that detects active SSH connections (via openshell forward list output and/or process detection). This module would be consumed by:
Consumer
File
Behavior
sandboxDestroy()
nemoclaw.ts
Warn: "⚠️ Active SSH session detected. Destroy anyway?"
sandboxRebuild()
nemoclaw.ts
Same warning pattern
cleanupGatewayAfterLastSandbox()
nemoclaw.ts
Check before automatic cleanup
destroyGateway()
onboard.ts
Graceful disconnect before teardown
stopAll()
services.ts
Warn about active sessions before stopping
sandboxStatus()
nemoclaw.ts
Show "Connected: yes" in status output
nemoclaw list
nemoclaw.ts
Show active indicator next to connected sandboxes
sandboxConnect()
nemoclaw.ts
Warn "Already connected in another terminal"
This earns its place in the refactoring plan not because the destroy function itself needs extraction from onboard.ts, but because the solution creates a new typed, testable shared module that addresses a cross-cutting concern across 9 call sites in 4 files — exactly the architectural pattern we're driving toward.
NV QABugs found by the NVIDIA QA Teamarea: cliCommand line interface, flags, terminal UX, or outputarea: installInstall, setup, prerequisites, or uninstall flowarea: onboardingOnboarding FSM, provider setup, sandbox launch, or first-run flowplatform: macosAffects macOS, including Apple Silicon
Activity
wscurran commentedon Apr 1, 2026
✨
Possibly related open PRs:
jyaunches commentedon Apr 20, 2026
Architectural Context — Active Session Detection
Picking this up as part of a broader onboard.ts decomposition effort.
The fix for this bug, done right, creates reusable infrastructure that improves destroy, rebuild, stop, status, list, connect, and uninstall. The core issue isn't just the Broken pipe UX — it's that no destructive operation in the CLI checks for active SSH sessions before proceeding.
Proposed approach
Create a shared
sandbox-session-state.tsmodule with angetActiveSandboxSessions(sandboxName)utility that detects active SSH connections (viaopenshell forward listoutput and/or process detection). This module would be consumed by:sandboxDestroy()sandboxRebuild()cleanupGatewayAfterLastSandbox()destroyGateway()stopAll()sandboxStatus()nemoclaw listsandboxConnect()This earns its place in the refactoring plan not because the destroy function itself needs extraction from onboard.ts, but because the solution creates a new typed, testable shared module that addresses a cross-cutting concern across 9 call sites in 4 files — exactly the architectural pattern we're driving toward.
feat(cli): add active session detection before destructive sandbox op…
[-][NemoClaw] [MacOS] Gateway destroy kills sandbox session with Broken pipe instead of graceful error[/-][+][MacOS] Gateway destroy kills sandbox session with Broken pipe instead of graceful error[/+]PrachiShevate-nv commentedon Apr 29, 2026
Verified this issue on Nemoclaw v0.0.30, this is now resolved. Closing the bughttps://nvbugspro.nvidia.com/bug/5982642