Description
There is no way to execute a single command inside a sandbox without starting an interactive shell session. The current workaround requires two steps:
openshell sandbox ssh-config my-assistant > /tmp/ssh-config
ssh -T -F /tmp/ssh-config openshell-my-assistant "echo hello"
Proposal
openshell sandbox exec my-assistant -- echo hello
openshell sandbox exec my-assistant -- python3 /sandbox/script.py
openshell sandbox exec my-assistant -- cat /sandbox/.openclaw-data/openclaw.json
Similar to docker exec — runs the command inside the sandbox and prints stdout/stderr.
Use Cases
- Debugging: Quick checks without starting interactive shell
- Automation: CI/CD pipelines that need to run commands in sandbox
- Bridges: Telegram/Slack bridges that relay messages via command execution (currently use the
ssh-config + SSH workaround)
- Health checks: Cron jobs that verify sandbox state
Context
The ssh-config + SSH pattern is used by NemoClaw's telegram-bridge.js and any custom bridge scripts. A native exec command would simplify these integrations.