---
name: sandbox-commands
description: Use when running, reviewing, or troubleshooting arbitrary one-shot commands inside a Remix app sandbox, including command output, history, cwd, timeout, mutations, or sandbox diagnostics.
---

# Sandbox Commands

Use this skill when the user wants to run an arbitrary one-shot shell command inside an app sandbox, inspect command output, rerun a previous command, view command history, or perform sandbox diagnostics.

This skill is for ad hoc command execution. It is not for persistent dev servers or web previews; use runtime targets for those.

Mental model:

- Sandbox commands run once in the app's E2B sandbox.
- They can mutate files, install tools, change runtime state, and dirty the app repository.
- Output is redacted, truncated, and persisted in command history.
- Defaults are `cwd=/home/user`, `environment=development`, and `timeoutMs=120000`.

Recommended sequence:

1. Use `remix_collab_sandbox_command_history` first when the user asks what ran before or refers to previous output.
2. Use `remix_collab_sandbox_command_run` for explicit one-shot diagnostics, tests, builds, file inspection, or tool checks.
3. Set `commandCwd` only when the command should run somewhere other than `/home/user`.
4. Set `timeoutMs` deliberately for commands expected to take longer than the default.
5. If the user wants a server to stay running or wants a preview URL, switch to runtime targets instead.

Important rules:

- Do not run destructive, broad, or state-changing commands unless the user clearly asked for them.
- Do not use local terminal commands when the user's intent is to inspect or modify the Remix app sandbox.
- Avoid env dumps and secret-printing commands. Backend redaction helps, but the agent should still minimize secret exposure.
- Treat missing output beyond the truncation marker as an output-size limit, not necessarily command failure.
- Use command history as the source of recent sandbox command context rather than guessing from chat memory.
- Explain that sandbox command mutations may affect later runtime targets or collaboration apply steps if they dirty the repo.
