Skip to main content

Module sandbox

Module sandbox 

Source
Expand description

The OS sandbox around a task or review agent, on unless workflow.sandbox is false. The policy and why it is shaped this way are in docs/plans/2026-10-28-agent-sandboxes.md

Structs§

SandboxFailed
The sandbox cannot start. It is the operator’s setup, so it blocks the task and counts against no agent
Scope
The parts of an agent run the sandbox policy depends on

Functions§

argv
The program and arguments that go before the agent command, or why the sandbox cannot start. The worktree’s .git file is the agent’s to write, so the common dir comes from the main checkout and the branch from orch’s records, and a git dir outside them refuses the run
cache_env
Compiler caches moved out of the per-user cache dir under /var/folders, which the sandbox does not let an agent write. clang and swiftc put their module cache there on macOS, so a Swift build fails. The new one sits under ~/Library/Caches, kept between runs and apart from the operator’s own builds, which never load a module an agent compiled
chat_argv
The sandbox prefix for a project chat agent. It reads the project and orch’s store and config, writes only its temp dir, and cannot read the rest of the home or any credential
control_argv
The sandbox prefix for the control chat, which Telegram and the other channels reach. It reads orch’s home and acts through orch, and cannot read the rest of the home or any credential. Inside another Seatbelt sandbox, which cannot nest, it runs in that one
enabled
Whether the project runs its agents in the sandbox. It is on unless workflow.sandbox is false in the project’s .orch.yml or the global config
enabled_globally
Like enabled from the global config alone, for a run whose project is unknown
gh_config_dir
The empty config dir gh gets in the sandbox, inside the run’s temp dir
package_config
Copies of the operator’s package manager settings without their credentials, written under temp, as (variable, file) for the agent’s environment, so an install inside the sandbox follows the operator’s rules, such as a minimum package age. .npmrc holds one setting a line and loses its credential lines. A TOML or INI file that holds a credential is not copied at all, since a dropped line can break it
run_temp_dir
The run’s own temp dir, so no socket of the operator’s apps in the shared one is in reach