← All notes

Run agent tool work in an isolated sandbox, not in the main process

Answer: Give tool work a dedicated, isolated environment. Several of Inspect's standard tools require a sandbox. Gemini CLI isolates potentially dangerous operations from your host system.

Why it matters

In Inspect, model tool calls run in the main evaluation process. The work those tools perform, such as shell commands or Python code, often needs a dedicated, isolated environment. Several of Inspect's standard tools require a sandbox, including bash(), python(), and text_editor(). Docker support is built in. Provisioning a sandbox does not automatically run tools, agents or scorers in the container. Bind the sandbox at the Sample, Task, or eval() level, and then run the work there.

Gemini CLI sandboxing isolates potentially dangerous operations from your host system, including shell commands and file modifications. One benefit is to limit file system access to the project directory. You can also reduce risk when working with untrusted code. Enable it with a command flag, an environment variable, or a configuration file. Container-based Docker or Podman sandboxing gives cross-platform process isolation.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Inspect AI, Sandboxing, MIT; Gemini CLI, Sandboxing, Apache-2.0. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Inspect AI, Sandboxing, MIT; Gemini CLI, Sandboxing, Apache-2.0.

Cite this

Permanent ID: iil:note:1k8m4a51

iinventedlight. 2026. "Run agent tool work in an isolated sandbox, not in the main process." iinventedlight Library, iil:note:1k8m4a51, version of 2026-11-22. https://iinventedlight.com/library/notes/agent-sandbox-modes/. License: CC-BY-4.0.

@misc{iil_note_1k8m4a51,
  author = {{iinventedlight}},
  title = {{Run agent tool work in an isolated sandbox, not in the main process}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-22},
  url = {https://iinventedlight.com/library/notes/agent-sandbox-modes/},
  note = {Permanent ID iil:note:1k8m4a51. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/agent-sandbox-modes.md.