> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.astropods.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.astropods.com/_mcp/server.

# ast sandbox

List a deployed agent's sandboxes, or the ones your `ast dev` session holds, and open a shell in one.

```bash
ast sandbox <subcommand> [--id <deployment> | --env <name> [--blueprint <name>] | --name <agent> | --agent <name>]
```

Pick whose sandboxes with one flag:

| Flag                        | Sandboxes                                                                                                                                                                      |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--id`, `--env` or `--name` | A deployed agent's, chosen the same way as for [`ast agent`](/cli/agent). Opening a shell needs operate access to the agent.                                                   |
| `--agent`, or no flag       | The ones your own `ast dev` session holds for the agent. With no flag, the agent comes from `astropods.yml` in the current directory. Run `ast dev` in another terminal first. |

## sandbox list

```bash
ast sandbox list [target flags]
```

Lists each sandbox's name and state. A deployed agent's list shows its most recent sandboxes and says when it holds more. An agent has no sandbox until it first attaches one.

## sandbox shell

```bash
ast sandbox shell [<name>] [target flags]
```

Opens an interactive root shell in the sandbox, in `/workspace`. With no name, the shell opens in the only sandbox that is not stopped. When there is more than one, name it. Run `exit` to leave. A dev session's shell also ends when `ast dev` stops, because closing the session removes its sandboxes.

A sandbox that is still being set up prints a notice, and the shell connects once it is ready.