Skip to content

[All Platforms][Agent&Skills] sandbox becomes not ready during OpenClaw agent tool call with local Ollama model #8468

Description

@lyral-commits

Sandbox process becomes unavailable and SSH connection drops while OpenClaw agent is executing tool calls using a locally hosted Ollama model. Onboard with Ollama provider succeeds and the sandbox is confirmed reachable and able to reach Ollama (steps 1 and 2 pass), but when the OpenClaw agent attempts to execute a shell tool call, the sandbox transitions to a not-ready state mid-execution.

Platform scope: Reproduced on macOS, Ubuntu 22.04, Ubuntu 24.04, Ubuntu 24.04 GPU, DGX Spark (5 platforms, same failure at the same step). WSL ARM and Brev skip by design (Ollama not available on those hosts).

Regression: Unknown — first CI run covering this scenario.

Environment

Device:        Multiple (macOS, Ubuntu 22.04/24.04/24.04-GPU servers, DGX Spark)
OS:            macOS / Ubuntu 22.04 / Ubuntu 24.04 / Ubuntu 24.04 GPU / DGX Spark
Architecture:  x86_64 (Linux platforms), arm64 (macOS)
Node.js:       v22.22.x
npm:           10.9.x
Docker:        28.x / 29.x
OpenShell CLI: openshell 0.0.85
NemoClaw:      v0.0.102
OpenClaw:      unknown (sandbox unreachable before version could be captured)

Steps to Reproduce

  1. Install NemoClaw v0.0.102:
    curl -fsSL https://www.nvidia.com/nemoclaw.sh | NEMOCLAW_INSTALL_TAG=v0.0.102 bash
  2. Ensure Ollama is installed on the host and the qwen2.5:1.5b model is pulled:
    ollama pull qwen2.5:1.5b
  3. Onboard with local Ollama provider:
    NEMOCLAW_PROVIDER=ollama NEMOCLAW_SANDBOX_NAME=my-ollama-sandbox \
    nemoclaw onboard --non-interactive --yes-i-accept-third-party-software
  4. Verify sandbox is reachable (expect: contains sandbox-alive):
    nemoclaw my-ollama-sandbox connect
  5. Verify Ollama is reachable from inside the sandbox (expect: exit 0, model list shown):
    nemoclaw my-ollama-sandbox exec "ollama list"
  6. Run one agent turn via the NemoClaw CLI:
    nemoclaw my-ollama-sandbox agent --agent main -m "List the files in the current directory"
    (The test harness equivalent is connectAndChat("my-ollama-sandbox", "List the files in the current directory") in src/helpers/install.ts, which calls sandboxExec to run openclaw agent --agent main -m "..." --session-id <id> inside the sandbox. openclaw itself has no --sandbox flag.)

Expected Result

OpenClaw agent executes the tool call and returns the actual file listing as the response, not a plain-text description of how to list files.

Actual Result

The agent call fails mid-execution. The sandbox transitions to "not ready" state and the SSH connection closes:

agent call failed:
Error: x code: 'The system is not in a state required for the operation's
execution', message: "sandbox is not ready": expected 255 to be +0

kex_exchange_identification: Connection closed by remote host

[ensureShieldsDown] shields down failed for my-ollama-sandbox (exit 1):
  Capturing current policy snapshot...Cannot capture current policy.
  Is the sandbox running?

Steps 1 (sandbox reachable) and 2 (Ollama reachable from sandbox) pass successfully. The failure occurs exclusively at step 3 when the agent attempts tool execution.

Note: the [ensureShieldsDown] line in the log above is printed by the test harness's beforeAll in a subsequent test, not by the failing agent turn itself. ensureShieldsDown runs before the openclaw agent call and succeeded; the sandbox crashed during tool execution. The [ensureShieldsDown] failure is a consequence of the crash, not its cause.

Logs

Ubuntu 22.04:
  agent call failed:
  Error: x code: 'The system is not in a state required for the operation's execution',
  message: "sandbox is not ready": expected 255 to be +0
  kex_exchange_identification: Connection closed by remote host

macOS:
  agent call failed:
  Error: x code: 'The system is not in a state required for the operation's execution',
  message: "sandbox is not ready": expected 255 to be +0

DGX Spark:
  agent call failed:
  Error: x code: 'The system is not in a state required for the operation's execution',
  message: "sandbox is not ready": expected 255 to be +0

Metadata

Metadata

Assignees

Labels

NV QABugs found by the NVIDIA QA TeamUATIssues flagged for User Acceptance Testing.area: local-modelsLocal model providers, downloads, launch, or connectivityintegration: openclawOpenClaw integration behaviorprovider: ollamaOllama local model provider behavior

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions