Skip to content

[Feature]: Add openshell sandbox exec <name> -- <command> for non-interactive command execution #762

@nv-ddave

Description

@nv-ddave

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

  1. Debugging: Quick checks without starting interactive shell
  2. Automation: CI/CD pipelines that need to run commands in sandbox
  3. Bridges: Telegram/Slack bridges that relay messages via command execution (currently use the ssh-config + SSH workaround)
  4. Health checks: Cron jobs that verify sandbox state

Context

The ssh-config + SSH pattern is used by NemoClaw's telegram-bridge.js and our custom slack-bridge.js. A native exec command would simplify both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions