> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# jaccard sandbox

> List an agent's sandboxes, copy files in and out of them, and run commands in them with jaccard sandbox, while a session is running or after it.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
jaccard sandbox list                                   # NAME AGENT PHASE LAST USED EXPIRES REASON AGE, newest first
jaccard sandbox list --agent report-writer             # one agent's
jaccard sandbox copy report-writer:out/report.pdf ./report.pdf
jaccard sandbox copy report-writer:out ./out           # a directory, relative to /workspace
jaccard sandbox copy ./fixtures report-writer:/workspace/fixtures
jaccard sandbox copy :out/report.pdf . --sandbox eve-sbx-0123456789abcdef
jaccard sandbox exec report-writer -- ls -la out
jaccard sandbox exec report-writer --workdir out --env LC_ALL=C -- sort -u names.txt
```

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
jaccard sandbox list [OPTIONS]
```

| Option | What it does |
| - | - |
| `--agent <AGENT>` | Only this agent's sandboxes. |

In `list`, `LAST USED` is how long ago a command last used the sandbox. `EXPIRES` is when a stopped sandbox and its disk will be deleted, `due` once that time has passed, and `-` while it runs. `REASON` is empty for a healthy sandbox. It shows `QuotaExceeded` when your organization's quota is refusing the sandbox, `EgressExceeded` when the sandbox has lost internet access at your organization's [network egress](/docs/operate/usage.md#network-egress) limit, or why its container can't start, such as `ErrImagePull`. The platform's message is on the next line. Or open the agent's **Sandboxes** tab in the [console](/docs/operate/console.md).

## sandbox copy

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
jaccard sandbox copy [OPTIONS] <SOURCE> <DESTINATION>
```

| Option | What it does |
| - | - |
| `--sandbox <NAME>` | Use this sandbox instead of the agent's newest. |
| `-q`, `--quiet` | No status lines on stderr. |

One side is local. The other is `<agent>:<path>` for the agent's newest sandbox, or `:<path>` with `--sandbox` to name one. Remote paths are relative to `/workspace` unless absolute. An upload's remote path is the full target path, never a directory to copy into.

Uploads are not atomic: if one fails part-way, the files already sent stay in the sandbox. A copy or `exec` wakes a stopped sandbox, so the first one takes longer. The sandbox then stays running until it [stops for lack of use](/docs/build/sandbox.md#what-lasts).

## sandbox exec

Runs everything after `--` in the sandbox and exits with its exit code. The command gets no stdin.

> [!WARNING]
>
> `--env` values can be recorded in the platform's audit log. Don't pass secrets this way.

* A child left running in the background keeps `exec` open until it closes its output. Redirect it (`>/dev/null 2>&1 &`) for `exec` to return at once.
* Ctrl-C stops `exec` and the command with it.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
jaccard sandbox exec [OPTIONS] [AGENT] [-- <COMMAND>...]
```

| Option | What it does |
| - | - |
| `[AGENT]` | The agent whose newest sandbox runs the command. Leave it out when you pass `--sandbox`. |
| `--agent <NAME>` | The agent, as a flag instead of the first argument. |
| `--sandbox <NAME>` | Use this sandbox instead of the agent's newest. |
| `--workdir <PATH>` | Directory to run in, relative to `/workspace` unless absolute. |
| `--env <KEY=VALUE>` | Environment for this command only, repeatable. |
| `-q`, `--quiet` | No status lines on stderr. |
| `[COMMAND]...` | The command and its arguments, after `--`. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.