Apus has three related but different controls:

  1. Sandbox (agents.defaults.sandbox.*, agents.entries.*.sandbox.*, or a required creator-role policy) decides where tools run (sandbox backend vs host).
  2. Tool policy (tools.*, tools.sandbox.tools.*, agents.entries.*.tools.*) decides which tools are available/allowed.
  3. Elevated (tools.elevated.*, agents.entries.*.tools.elevated.*) is an exec-only escape hatch from ordinary sandboxing (gateway by default, or node when the exec target is configured to node). It cannot bypass a creator role's required sandbox.

Quick debug

Use the inspector to see what Apus is actually doing:

apus sandbox explain
apus sandbox explain --session agent:main:main
apus sandbox explain --agent work
apus sandbox explain --json

It prints:

Sandbox: where tools run

Sandboxing is controlled by agents.defaults.sandbox.mode:

agents.defaults.sandbox.workspaceAccess controls what the sandbox can see: "none", "ro", or "rw".

An operator role with sandbox: "required" overrides agent mode, cannot be escaped through elevated execution or host overrides, and fails closed when its sandbox cannot be provisioned. See Named operator roles.

See Sandboxing for the full matrix (scope, workspace mounts, images).

Bind mounts (security quick check)

For a per-agent configuration with several host folders, access modes, and the external-source safety opt-in, see Multiple folders for one agent.

Tool policy: which tools exist/are callable

Five layers matter:

Rules of thumb:

Tool groups (shorthands)

Tool policies (global, agent, sandbox) support group:* entries that expand to multiple tools:

{
  tools: {
    sandbox: {
      tools: {
        allow: ["group:runtime", "group:fs", "group:sessions", "group:memory"],
      },
    },
  },
}

Available groups:

For read-only agents, deny group:runtime as well as mutating filesystem tools unless sandbox filesystem policy or a separate host boundary enforces the read-only constraint.

For sandboxed MCP servers, the sandbox tool policy is a second allow gate. If mcp.servers is configured but sandboxed turns only show built-in tools, add bundle-mcp, group:plugins, or a server-prefixed MCP tool name/glob such as outlook__send_mail or outlook__* to tools.sandbox.tools.alsoAllow, then restart/reload the gateway and recapture the tool list. Server globs use the provider-safe MCP server prefix: non-[A-Za-z0-9_-] characters become -, names that do not start with a letter get an mcp- prefix, and long or duplicate prefixes may be truncated or suffixed.

apus doctor currently checks this shape for Apus-managed servers in mcp.servers. MCP servers loaded from bundled plugin manifests or Claude .mcp.json use the same sandbox gate, but this diagnostic does not enumerate those sources yet; use the same allowlist entries if their tools disappear in sandboxed turns.

Elevated: exec-only "run on host"

Elevated does not grant extra tools; it only affects exec.

Gates:

See Elevated Mode.

Common "sandbox jail" fixes

"Tool X blocked by sandbox tool policy"

Fix-it keys (pick one):

"I thought this was main, why is it sandboxed?"

In "non-main" mode, group/channel keys are not main. Use the main session key (shown by sandbox explain) or switch mode to "off".

Related