A sandboxed session runs its commands and its file tools in a container of the operating system. What it can read, write and reach is what its sandbox allows, whatever its permission mode. A prompt slipped into a web page or an issue cannot then read your credentials, change files outside the project, or leave behind something that runs later on your computer.
The sandbox is off by default. Turn it on for every session, or only where you want it: a provider, a model, a space, a project, one session.
In a sandboxed session:
~/.alta), your SSH keys and the credentials of providers and clouds..git/config, git hooks, the .alta settings and plugins, the settings of editors and of other coding agents.It does not protect against what you allow: a command you let run outside the sandbox runs with your rights. The model provider still receives what the session sends it.
In CodeAlta Desktop, Settings > Sandbox has:
A sandbox is also chosen:
When several say something, the most specific wins: the session, then its model, its provider, its project, its space, then every session. Not sandboxed can be chosen at each level, for example for a project you trust.
The chip shows a small mark on a sandboxed session; its tooltip names the profile and where it comes from.
In CodeAlta TUI, the sandbox follows the same settings; it is set in CodeAlta Desktop, in config.toml, or with alta session.
Two profiles come with CodeAlta:
| Profile | Network | Run outside |
|---|---|---|
workspace |
The package registries: NuGet, npm, Yarn, PyPI and crates.io | Asked each time |
strict |
None | Never |
New profile makes a profile of your own, which starts from the profile shown and adds to it:
*.example.com for a domain and its subdomains), Off or On.In ~/.alta/config.toml:
[sandbox]
all_sessions = "workspace"
[sandbox.profiles.company]
extends = "workspace"
hosts = ["pkgs.dev.azure.com", "*.company.com"]
local_ports = [5432]
mcp_servers = ["docs"]
[providers.ollama]
sandbox = "strict"
A [sandbox] table in the .alta/config.toml of a repository is ignored: a repository does not choose its own sandbox.
A command that cannot work in the sandbox, such as a publish that needs your API key, can ask to run outside it, with the reason. You are asked each time, in every permission mode, Bypass permissions included:
Run outside the sandbox?
dotnet nuget push bin/Lib.1.2.0.nupkg --source nuget.org in C:\code\Lib
"Publishing needs the API key in your NuGet.Config, which the sandbox cannot read."
[Allow once] [Deny]
git fetch from reaching GitHub: the agent asks to run it outside, and says why.The timeline marks the commands that ran outside. With the strict profile, or Never, no command leaves the sandbox: the agent asks you to run it.
When the sandbox blocks a command, the agent is told what blocked it, a host or a file, so that it does not try again the same way.
The tools of CodeAlta itself run outside the container, so a sandboxed agent uses only the ones that keep it inside:
An agent can turn a sandbox on for a session it creates, never turn one off.
A sandboxed session runs on the providers whose model CodeAlta drives with its own tools (the API providers, Codex, GitHub Copilot), on Claude Code and on the ACP agents:
claude setup-token, then CLAUDE_CODE_OAUTH_TOKEN) or an API key.COPILOT_GITHUB_TOKEN, CURSOR_API_KEY or XAI_API_KEY. Its variables reach the sandbox with their values.A fallback never moves a sandboxed session to a provider it cannot run on.
The sandbox is built on MXC, Microsoft's policy-driven isolation and containment of processes, with the native sandbox of each system: the process container of Windows, Seatbelt on macOS and Bubblewrap on Linux. CodeAlta never falls back to a weaker sandbox of its own.
-m:1). Before build .9550, the tests of VSTest do not run with a profile that reaches hosts, such as workspace (see troubleshooting).git, python3) and of Homebrew run there. MSBuild builds with one node (-m:1), and dotnet test does not run: no process of a sandbox listens on a port. A test project of Microsoft.Testing.Platform runs as a program: dotnet build <tests> -m:1, then dotnet run --project <tests> --no-build (see troubleshooting).bubblewrap, and slirp4netns for a network.On macOS and Linux, a sandbox with a network reaches it through a proxy of CodeAlta, which programs find in HTTPS_PROXY: a program that ignores that variable reaches no host.
Check says what is missing. Where the sandbox cannot run, a sandboxed session runs no command at all: it never runs them without the sandbox.
alta session create --project Lib --sandbox strict --title "Review PR #42"
alta session send <session-id> --sandbox workspace --stdin
altacli run --sandbox workspace "Fix the failing test"
alta session choices, info, status and list show the sandbox of a session. alta sandbox tells what the profiles allow, for you and for your agents:
alta sandbox list the profiles, their network and folders
alta sandbox show workspace what a profile allows: hosts, folders, ports, variables, MCP servers
alta sandbox status --session <id> the sandbox of a session, whether it runs here, the hosts it refused last
A sandboxed agent reads its own profile and the sandbox of its own sessions only. See command line for altacli.