Skip to content

bug: sandbox --env is not passed to the initial command #3377

Description

@kaofelix

User Story

As an OpenShell user launching an application in a sandbox, I want values
supplied with sandbox create --env to be available to the initial command, so
that the application starts with its requested configuration.

Problem Statement

OpenShell 0.0.117-dev.155+gb3e4ad457 accepts
--env REPRO_SENTINEL=present, but the initial sandbox command observes the
variable as unset.

The same reproduction reports present on OpenShell v0.0.116.

Impact / Why This Matters

Applications launched as the sandbox's initial command can start without
required configuration. Later exec sessions may still observe the configured
environment, which can make the sandbox appear correctly configured during
diagnosis.

This affected an OpenClaw hosted-inference validation for
NVIDIA/NemoClaw#11810.

Current workarounds are to remain on OpenShell v0.0.116 or change the
application image or launch command to supply the configuration another way.

Acceptance Criteria

  • The initial command receives values supplied through
    sandbox create --env.
  • The initial command and later sandbox exec sessions observe the same
    configured environment.
  • A Docker-backed regression test covers this behavior.
  • The reproduction below prints observed=present.

Reproduction Steps

Run against a healthy gateway using OpenShell
0.0.117-dev.155+gb3e4ad457:

openshell sandbox create \
  --name env-repro \
  --from ghcr.io/nvidia/openshell-community/sandboxes/base@sha256:aeef1c63f00e2913ea002ccb3aaf925f338b5c5d70e63576f0d95c16a138044e \
  --env REPRO_SENTINEL=present \
  --detach \
  --no-tty \
  --no-auto-providers \
  -- /bin/sh -c 'printf "%s\n" "${REPRO_SENTINEL:-missing}" > /sandbox/env-result; sleep 300'

printf 'observed='
openshell sandbox exec \
  --name env-repro \
  --no-tty \
  --no-login-shell \
  -- /bin/cat /sandbox/env-result

openshell sandbox delete env-repro

Expected:

observed=present

Actual:

observed=missing

No credentials or external inference endpoints are required.

Environment

  • OpenShell: 0.0.117-dev.155+gb3e4ad457
  • Revision: b3e4ad4579e24dacfb285924876473b50a04b988
  • Artifacts:
    Release Dev run 35055785361
  • Host: macOS 26.5.2, Apple Silicon
  • Runtime: Docker Desktop
  • Docker client/server: 29.8.0
  • Docker VM: Linux ARM64, LinuxKit 7.0.12
  • Sandbox image:
    ghcr.io/nvidia/openshell-community/sandboxes/base@sha256:aeef1c63f00e2913ea002ccb3aaf925f338b5c5d70e63576f0d95c16a138044e

The same failure was reproduced on a separate Linux ARM64 Docker host.

Control result:

  • OpenShell v0.0.116 with the same sandbox create command and its supported
    sandbox exec syntax: observed=present

Logs

Created sandbox: env-repro

[0.0s] Requesting compute...
[0.0s] Sandbox allocated
[0.0s] Image already present
[0.1s] Starting sandbox Container created
observed=missing

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:triage-neededOpened without agent diagnostics and needs triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions