Repository navigation
fix: replace sandboxes that exited - #13493
Merged
Merged
Conversation
A sandbox that OpenShell reports in a terminal phase failed every refresh with SANDBOX_PHASE_ERROR, so the deployment could neither plan nor apply; only whole-deployment destroy recovered it. Observe the exit instead, as the sandbox's exited attribute, and plan a replacement of that sandbox. The plan reports why (#13467).
cv
enabled auto-merge (squash)
October 19, 2026 19:23
Contributor
This was referenced Oct 19, 2026
cv
added a commit
that referenced
this pull request
Oct 19, 2026
## Failure An exited sandbox reported `reason unknown` unless OpenShell's condition reason was one of four codes NemoClaw recognized. After a gateway restart, the plan from #13493 said `sandbox exited: SANDBOX_PHASE_ERROR, reason unknown, exit code 1`, although OpenShell reported a specific reason. ## Decision - **Pass the reason through:** report OpenShell's reason code as it reports it, rather than keeping NemoClaw's own list of codes it recognizes. - **Keep the message private:** the condition's message can contain credentials and never crosses. A reason that isn't shaped like a code (ASCII letters and digits, at most 64 characters) still appears as `unknown`. - **Unchanged:** the explanations for `IdentityResolutionFailed` and `ControlSupervisorStartFailed` remain; other reasons point to `openshell logs SANDBOX --source sandbox`. ## Validation - `terminal_sandbox_reports_known_failure_without_backend_text` gained cases: a reason NemoClaw doesn't explain (`ImagePullBackOff`) passes through, while text with spaces or hyphens, or longer than 64 characters, doesn't. It failed before the change. - `cargo ci` passed, including the bundle and lifecycle steps.
cv
added a commit
that referenced
this pull request
Oct 19, 2026
…#13497) ## Failure Managed Docker and Podman gateways kept `gateway.toml` in retained storage, written once when the deployment was created. Storage compared it on every refresh, so any change to `spec.gateway.config` from #13492 failed with "gateway storage configuration differs" and needed a fresh deployment UID. Completes #13473. ## Decision The file now belongs to the gateway container, and storage holds only data and credentials. - **Docker:** the launch data source renders the file, and `docker_container` uploads it when it creates the gateway container. The Docker provider replaces a container when its uploads change. - **Podman:** the provider writes the file into the gateway container before each start. The Podman gateway resource keeps `gateway_config` as an attribute, so a change replaces it. - **Storage** no longer writes or compares the file, and loses the `gateway_config` attribute, so a configuration change never replaces storage. Podman observation stops comparing the file too. - **Docs:** a configuration change replaces the gateway container and keeps its data. The restarted gateway restarts its sandboxes, where Fabric agents don't start again, so the next plan replaces them through #13493. ## Validation - **Tests:** - the compile test checks the upload; - a new data-source test checks the rendered file and rejection of keys NemoClaw owns; - the Podman mutation test checks that the file is written before each start; - the storage tests check that storage never reads it; - the lifecycle contract and readiness fixtures follow the new owner. - **Checks:** `cargo ci` (including the bundle and lifecycle steps), `cargo ci live-docker` (11 tests), and `cargo ci live-kind` (7 tests) passed after rebasing onto #13493. - **Live, on a DGX Spark with a managed Docker gateway and a Deep Agents sandbox:** - changing `openshell.gateway.log_level` planned only `delete → create` of the gateway container; - the new container's file had the new level, and the gateway's data was kept; - the sandbox then exited, and the next plan replaced it with its reason; - after apply the sandbox was `Ready` and the following plan was empty; - the deployment was destroyed and its objects removed. - **Not run live:** the Podman path. After merge, close #13473 by hand.
This was referenced Oct 19, 2026
Closed
cv
added a commit
that referenced
this pull request
Oct 19, 2026
) ## Failure After any gateway restart, Fabric's `fabric-agent-ctl serve` refuses to start in the restarted sandbox (`cleanup_unconfirmed`), so NemoClaw replaces the sandbox, deleting its files and conversation history (#13493). `docs/limits.md` didn't list this gap, which is Fabric's to fix. ## Decision Add it to the Inference limits beside NeMo-Fabric#420, linking NVIDIA/NeMo-Fabric#437, the replacement procedure, and the gateway configuration section. ## Validation `fern check` and `git diff --check` passed. Docs only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Failure
When OpenShell reports a sandbox in a terminal phase, every refresh failed with
sandbox unavailable: SANDBOX_PHASE_ERROR, so the deployment could neither plan nor apply. Only destroying the whole deployment recovered it (#13467).This happens after any gateway restart: OpenShell restarts its sandboxes, and Fabric's
fabric-agent-ctl serverefuses to start again ("Previous runtime cleanup is unconfirmed; replace the sandbox"). A host reboot is enough, and #13473's follow-up makes gateway restarts routine for configuration changes.Decision
exitedattribute (phase, reason, and exit code), instead of an error.replace_on_change, plans a replacement when that observation changes. The sandbox's agent runtime is replaced with it.reason, and the CLI prints it under the action, for examplesandbox exited: SANDBOX_PHASE_ERROR, reason unknown, exit code 1. The backend's message stays private.Validation
an_observation_that_asks_for_replacement_plans_one);an_exited_sandbox_is_observed_with_its_exit);a_replaced_exited_sandbox_reports_why);a_planned_replacement_shows_its_reason).cargo cipassed, including the bundle and lifecycle steps.Error;nemoclaw planshoweddelete → createfor the sandbox and its agent runtime, with the reason above;Ready, and the next plan was empty;After merge, close #13467 by hand.