Agent Diagnostic
- Docker driver overrides the image ENTRYPOINT with the supervisor binary and hardcodes its command to sleep
infinity (crates/openshell-driver-docker/src/lib.rs:1759-1762, :1669-1671). - Workload passed via openshell sandbox create ... -- /app/entrypoint.sh is not stored in the sandbox spec; CLI
runs it as a one-shot SSH exec session after the sandbox is Ready (crates/openshell-cli/src/run.rs:2169,
ssh.rs:399). - On gateway restart after reboot, resume_persisted_sandboxes() (crates/openshell-server/src/lib.rs:344) resumes
the container via a bare docker start (driver-docker/src/lib.rs:719,738), re-running only PID 1 (supervisor →
sleep infinity). - The original -- exec command is never persisted or replayed, so the workload does not return.
- ps aux confirms: first run shows bash /app/entrypoint.sh + openclaw; after restart only sleep infinity remains.
- Net: any command given to sandbox create is ephemeral to the CLI process and lost across gateway/host restarts,
even though the sandbox reports Ready/Running.
Description
Disclaimer: This could be a bug or feature request or a documentation update for proper usage.
I created a sandbox using my Dockerfile
openshell sandbox create \
--from "$INSTALL_DIR" \
--name "$SANDBOX_NAME" \
--provider "$PROVIDER_NAME" \
--policy "$POLICY_FILE" \
--no-tty \
--no-auto-providers \
--forward "$GATEWAY_PORT" \
-- /app/entrypoint.sh
I gave the my entrypoint.sh here because openshell defaults to the supervisor as the container's entrypoint. This script is run on the first run. But after the system restarts and the sandbox is relaunched. This command /app/entrypoint.sh is not run.
Openshell treats the command passed during sandbox creation as one off session command. But I want it to persist this and run it on every restart.
Workaround:
I can create a systemd service and do openshell sandbox exec sandbox_name--no-tty -- /app/entrypoint.sh once the gateway and sandbox is ready on system restart. I was anyway planning to do this because the port forward passed in openshell sandbox create command is also not coming up after system restart.
The ps aux results before and after restart confirm that the command is not run
ps aux results on first run:

ps aux after system restart:

I don't know if this is intentional but while creating a custom sandbox, the sandbox is not useful if the user's entrypoint is not run when the sandbox restarts. Also I couldn't find any documentation saying that the command passed during sandbox creation is temporary.
Reproduction Steps
- Run sandbox from custom image with a entrypoint command
openshell sandbox create \
--from "$INSTALL_DIR" \
--name "$SANDBOX_NAME" \
--no-tty \
--forward "$GATEWAY_PORT" \
-- /app/entrypoint.sh
- Restart the system
- The openshell gateway and sandbox is ready but the entrypoint command is not run
Environment
- OS: Ubuntu 19
- Docker: 29.4.1
- Openshell: v0.0.54
Logs
Agent-First Checklist
Agent Diagnostic
infinity (crates/openshell-driver-docker/src/lib.rs:1759-1762, :1669-1671).
runs it as a one-shot SSH exec session after the sandbox is Ready (crates/openshell-cli/src/run.rs:2169,
ssh.rs:399).
the container via a bare docker start (driver-docker/src/lib.rs:719,738), re-running only PID 1 (supervisor →
sleep infinity).
even though the sandbox reports Ready/Running.
Description
Disclaimer: This could be a bug or feature request or a documentation update for proper usage.
I created a sandbox using my Dockerfile
I gave the my entrypoint.sh here because openshell defaults to the supervisor as the container's entrypoint. This script is run on the first run. But after the system restarts and the sandbox is relaunched. This command
/app/entrypoint.shis not run.Openshell treats the command passed during sandbox creation as one off session command. But I want it to persist this and run it on every restart.
Workaround:
I can create a systemd service and do
openshell sandbox exec sandbox_name--no-tty -- /app/entrypoint.shonce the gateway and sandbox is ready on system restart. I was anyway planning to do this because the port forward passed inopenshell sandbox createcommand is also not coming up after system restart.The

ps auxresults before and after restart confirm that the command is not runps aux results on first run:
ps aux after system restart:

I don't know if this is intentional but while creating a custom sandbox, the sandbox is not useful if the user's entrypoint is not run when the sandbox restarts. Also I couldn't find any documentation saying that the command passed during sandbox creation is temporary.
Reproduction Steps
Environment
Logs
Agent-First Checklist
debug-openshell-cluster,debug-inference,openshell-cli)