Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions content/manuals/ai/sandboxes/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,16 @@ sandbox instead of on your host.
> the sandbox. The agent process can read it directly. Only use this for
> credentials where proxy-based injection isn't available.

Variables in `/etc/sandbox-persistent.sh` are sourced automatically when
bash runs inside the sandbox, including interactive sessions and agents
started with `sbx run`. If you run a command directly with
`sbx exec <name> <command>`, the command runs without a shell, so the
persistent environment file is not sourced. Wrap the command in `bash -c`
to load the environment:
Variables in `/etc/sandbox-persistent.sh` are sourced automatically for
interactive sessions and for agents started with `sbx run`.

A variable only takes effect for sessions and agents started *after* it's

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LOW] Italics used for mid-sentence emphasis

The style guide says to use italics sparingly — notable exceptions are titles of articles, blog posts, or specification documents, not in-sentence emphasis. Consider rewording to avoid the need for emphasis: "A variable only takes effect for sessions and agents that start after you add it."

added. If an agent is already running when you append to the file, restart
it (or stop and start the sandbox) to pick up the new value.

Running commands directly with `sbx exec <name> <command>` does not invoke
a shell, so the persistent environment file is not sourced. Wrap the
command in `bash -c` to load the environment:

```console
$ sbx exec <sandbox-name> bash -c "your-command"
Expand Down