Repository navigation
Description
Description
Once managed llama.cpp state exists under the NemoClaw state directory, no uninstall variant can remove it. The failure is raised during "[1/6] Stopping services" and aborts the entire uninstall - the product states it "did not start the remaining uninstall steps" - so a single managed-llama.cpp cleanup failure also prevents removal of the gateway, the sandbox, the CLI binary and the state directory, none of which are related to llama.cpp.
The host is left with containers running, ports still bound, the state directory populated and the CLI still on PATH, and the product offers no command that recovers from it. On both affected hosts the only way back to a usable state was manual filesystem removal.
This was reproduced on two independent DGX Sparks through two different entry paths, which is why it is reported as one defect rather than a one-off state corruption. Both hosts refuse every documented uninstall variant, and both refuse the forward path as well, so the user is stuck in both directions:
forward: reinstalling managed llama.cpp is refused because a persisted
engine authority for 'host-local-inference' already exists
backward: every uninstall variant exits non-zero and removes nothing
A secondary leak was observed on the same path: after the containers were removed and the state directory deleted, a private-bridge helper process was still running and still holding the llama.cpp port, forwarding to a container address that no longer existed. It survived every uninstall attempt and had to be killed by PID.
Test impact: this blocks execution of the managed llama.cpp function-test cases, because a host cannot be returned to a known-clean state between cases without manual filesystem surgery.
Platform scope: Reproduced on two DGX Sparks (aarch64, Ubuntu 24.04) only; other platforms not tested.
Regression: Unknown - earlier versions not tested for this path. Managed llama.cpp onboarding is recent functionality.
Environment
Device: DGX Spark (NVIDIA GB10) - two independent units
OS: Ubuntu 24.04.3 LTS / Ubuntu 24.04.4 LTS
Architecture: aarch64
Node.js: v22.22.1 / v22.22.0
npm: 10.9.4
Docker: 28.3.3 / 29.2.1
OpenShell CLI: 0.0.101
NemoClaw: v0.0.110
OpenClaw: N/A (host could not be returned to a clean state)
Steps to Reproduce
Scenario A - interrupted managed llama.cpp onboarding
1. Run: nemoclaw onboard --name llama-cpp-local
At the inference provider prompt select a Managed llama.cpp entry.
2. While the model download is in progress, terminate the onboard process.
3. Run: nemoclaw uninstall --yes
4. Run: NEMOCLAW_CLEANUP_GATEWAY=1 nemoclaw uninstall --yes --destroy-user-data
5. Run: nemoclaw uninstall --yes --all-gateway-ports --destroy-user-data
6. After all of the above, check what remains:
docker ps -a
ss -ltn
ls ~/.nemoclaw
which nemoclaw
Scenario B - completed managed llama.cpp installation
1. Complete a managed llama.cpp onboarding so the create journal reaches
phase "finalized" and the engine serves requests:
curl http://127.0.0.1:8081/v1/models -> HTTP 200
2. Run each of these and record the exit code without piping the output,
so the recorded status is the uninstaller's own:
nemoclaw uninstall --yes
nemoclaw uninstall --all-gateway-ports --yes
nemoclaw uninstall --destroy-user-data --yes
3. Attempt the forward path instead: re-run the managed llama.cpp install.
4. Attempt recovery: nemoclaw onboard --resume
5. Re-check containers, listening ports and the state directory as in
Scenario A step 6.
Expected Result
Uninstall removes managed llama.cpp resources - container, bound ports, engine
authority and receipt - along with the rest of the installation, and exits 0.
If one component genuinely cannot be cleaned, the uninstaller reports that
component, continues with the remaining steps, and still removes everything it
can, rather than aborting the whole operation at step 1 of 6.
In either case the product provides a documented way for the user to reach a
clean state without deleting files by hand.
Actual Result
Scenario A - all three uninstall variants fail, and the abort is explicit:
NemoClaw Uninstaller
This will remove NemoClaw resources owned by gateway 'nemoclaw'.
--destroy-user-data set; purging user data under the state directory.
[1/6] Stopping services
Managed llama.cpp cleanup for sandbox 'llama-cpp-local' on gateway port 8080
did not complete: Qualified container endpoint does not match persisted
authority.. NemoClaw did not start the remaining uninstall steps.
Uninstall completed with errors. Some state may remain on disk; see warnings above.
exit = 1
Two of the variants failed earlier still, on lock acquisition:
Uninstall could not acquire or release portable host authority: Failed to
acquire lock on the portable host lock after 120 retries
exit = 1
After all attempts: 1 container still present, ports 8080 and 8081 still bound,
state directory still populated with 10 entries, CLI still on PATH.
Scenario B - all three variants produce identical output and identical status:
Running local uninstall script: {state dir}/source/uninstall.sh
NemoClaw Uninstaller
This will remove all NemoClaw resources.
Portable lifecycle state is unsafe: Completed onboarding session authority is incomplete
nemoclaw uninstall --yes exit = 1
nemoclaw uninstall --all-gateway-ports --yes exit = 1
nemoclaw uninstall --destroy-user-data --yes exit = 1
After all three: both the llama.cpp and vLLM containers still up, ports 8000 and
8081 still bound (4 listeners), state directory present, CLI present.
The forward path is refused as well:
Managed llama.cpp install failed: Persisted engine authority already exists
for 'host-local-inference'.
And recovery is refused:
Cannot resume non-interactive onboard: the previous run was interrupted before
sandbox creation completed, so no sandbox name was recorded.
Re-run with --name {sandbox} (or set NEMOCLAW_SANDBOX_NAME).
The onboard session records no sandbox to resume - sandboxName, provider, model
and agent are all null - while the llama.cpp receipt on disk simultaneously
records a finalized, healthy runtime. The two views of the same install
disagree, and neither the forward nor the backward path accepts the state.
Secondary leak, Scenario A: after containers were removed and the state
directory deleted, this process was still alive and still holding port 8081 on
both bound addresses, forwarding to a container address that no longer existed:
node {state dir}/source/dist/lib/onboard/runtime-provider/
docker-llama-cpp-private-bridge-process.js
--transaction {txn} --target-host {gone} --target-port 8081
--listen-port 8081 --bind-address 127.0.0.1 --bind-address {docker bridge}
It had to be killed by PID before the port was released.
Logs
Scenario B on-disk state at the time all three uninstalls were refused:
managed-llama-cpp/receipt.json
engineAuthority.operation host-local-inference
engineAuthority.engineId docker
endpoint host.openshell.internal:8081
runtime.kind container
runtime.name nemoclaw-llama-cpp
model.recipeId llama-cpp.nemotron-3-nano-30b-a3b.spark-single.v1
model.sizeBytes 22833947424
managed-llama-cpp/host-local-create-journal/{txn}.json
phase finalized
managed-llama-cpp/runtime-provider-authority/host-local-inference.json
present, matching the receipt's authorityId and bindingSha256
onboard-session.json
sandboxName null
provider null
model null
agent null
Engine health at the same moment, i.e. the runtime being refused for cleanup was
fully functional:
docker ps nemoclaw-llama-cpp Up 48 minutes
ss -ltn 8081 bound on loopback and on the docker bridge address
curl http://127.0.0.1:8081/v1/models HTTP 200
Scenario A on-disk state after the onboard was terminated mid-download:
managed-llama-cpp/receipt.json present
managed-llama-cpp/host-local-create-journal/{txn}.json
phase finalized
managed-llama-cpp/runtime-provider-authority/host-local-inference.json
present
onboard.lock present
Related
Not a duplicate of #9573, although Scenario B shares one error string with it.
The two differ on trigger, exit code, and whether a workaround exists:
#9573 onboard failed at preflight; nothing was ever allocated
(runtimeAuthority.kind = "unset", lastCompletedStep = null)
uninstall exits 0 and silently removes nothing
workaround: onboard --fresh clears the failed session
this report a managed llama.cpp runtime was actually allocated - container
created, port bound, engine serving, journal finalized, authority
file written
uninstall exits 1
onboard --fresh does not recover: it fails on a different and
unrelated condition (the gateway port already held), so the
documented workaround for #9573 does not apply here
Scenario A additionally fails with a completely different message
("Qualified container endpoint does not match persisted authority") that does
not appear in #9573 at all, and aborts the remaining uninstall steps, which
#9573 does not describe.
If dev determines the two share one root cause in the portable lifecycle safety
check, the abort-the-whole-uninstall behaviour and the orphaned bridge process
described here still need separate handling.
Activity
wangericnv commentedon Aug 19, 2026
Additional evidence — a minimal reproduction of the same authority defect. A minimal reproduction of the same authority defect, from a state where no runtime was ever created. This is the cleanest form of the problem seen so far and needs no uninstall to trigger.
Found while running the managed llama.cpp acquisition-interrupt test case on
v0.0.110, DGX Spark, aarch64, Ubuntu 24.04.
Reproduction
Clear the shared Hugging Face cache for the managed llama.cpp model so the
next onboarding performs a real download.
Start managed llama.cpp onboarding non-interactively:
NEMOCLAW_EXPERIMENTAL=1 NEMOCLAW_PROVIDER=install-llama-cpp NEMOCLAW_YES=1
nemoclaw onboard --fresh --non-interactive --name {sandbox}
Interrupt with Ctrl+C while the GGUF is still downloading, before any
container is created. Confirmed at about 2.8 GiB of a 16 GiB download.
Re-run the identical command from step 2, unchanged.
What is on disk after the interrupt
The state directory contains an authority record and nothing else:
managed-llama-cpp/
owner.json
runtime-provider-authority/host-local-inference.json 268 bytes
host-local-create-journal/ EMPTY
no receipt.json
no journal entry
containers 0
listeners on the port 0
private-bridge processes 0
llama.cpp docker networks 0
So the authority record refers to a runtime that was never created. There is
nothing for it to conflict with.
What the re-run does
The identical command fails in about 5 seconds:
Managed llama.cpp install failed: Persisted engine authority already exists
for 'host-local-inference'.
[non-interactive] Aborting: Persisted engine authority already exists for
'host-local-inference'.
Onboarding did not finish. Resume from the step that failed with:
nemoclaw onboard --resume --name {sandbox}
Note the command already carried --fresh. The option whose stated purpose is to
start over does not clear this record.
Afterwards, status, doctor and an agent request all exit 1, and the endpoint
returns no connection - correct, since nothing was ever installed, but the user
has no supported way forward.
Confirming the authority record is the sole blocker
Deleting the managed-llama-cpp state directory by hand and re-running the same
command with no other change lets onboarding proceed immediately - it resumes
straight into acquiring and verifying the GGUF. Nothing else was altered.
Why this is worth adding here rather than filed separately
It is the same persisted-authority record described in this report, reached
without any uninstall and without any runtime ever existing. That makes it a
much smaller reproduction for the underlying defect: the authority record is
written before the runtime it describes exists, is not rolled back when the
operation is interrupted, and is not cleared by --fresh.
The partial 2.8 GiB download is retained in the cache, which is reasonable on
its own - the problem is only the orphaned authority record.
wangericnv commentedon Aug 19, 2026
Additional evidence — reproduced through the documented uninstall flow. Reproduced through the documented uninstall test case, with both required sandboxes healthy. This run has none of the manual cleanup that preceded the earlier reproductions in this report.
Platform: DGX Spark (aarch64), Ubuntu 24.04, NemoClaw v0.0.110, OpenShell 0.0.101
Preconditions, established the documented way and verified before starting
my-assistant provider vllm-local model nvidia/Qwen3.6-35B-A3B-NVFP4
created by the hosted installer with --local-model-runtime=vllm
Inference: healthy
lcpp-a provider llama-cpp-local model nvidia-nemotron-3-nano-30b-a3b
created through the interactive managed llama.cpp flow
Inference: healthy
4 containers running, shared Hugging Face cache 22833947500 bytes
Step: run the plain documented uninstall and answer its confirmation
nemoclaw uninstall
The confirmation prompt is displayed in full and was answered:
NemoClaw Uninstaller
This will remove all NemoClaw resources.
What will be removed:
- All OpenShell sandboxes, gateway, and NemoClaw providers
- Related Docker containers, images, and volumes
- the state directory (preserves rebuild-backups/, backups/, sandboxes.json by default)
- the OpenShell and NemoClaw config directories
- Global NemoClaw CLI (npm package: nemoclaw)
- Ollama models: kept
- Shared Hugging Face model cache: kept
Proceed? [y/N]
Answering the prompt produces one line and stops:
Portable lifecycle state is unsafe: Completed onboarding session authority is incomplete
exit = 1
Nothing in the list above was removed
nemoclaw list both my-assistant and lcpp-a still present
containers all 4 still running
state directory still populated
CLI still on PATH
listeners 6 on the managed ports
The forward path is refused as well. Re-running the managed llama.cpp install for
a new sandbox name is rejected because the sandbox uninstall just failed to
remove still holds the reservation:
Managed llama.cpp install failed: Managed llama.cpp on this gateway is already
reserved by sandbox 'lcpp-a'.
exit = 1
Why this matters for triage
The two reproductions originally filed here both followed sessions where the host
had been cleaned and rebuilt by hand, so it was fair to ask whether leftover state
was contributing. This one does not: both sandboxes were created through the
documented flows in the same session, both reported healthy immediately before the
uninstall, and the uninstall is the plain form with no flags.
This is the standard uninstall path on a normally-provisioned host, so any user who
onboards managed llama.cpp and later runs uninstall is expected to hit it.
fix(uninstall): preserve failed llama.cpp cleanup state (#9678)
test(inference): pin the managed llama.cpp bridge stop on the destroy…
fix(sandbox): retain llama.cpp cleanup authority (#9953)