When an agent runs inside a sandbox, its exec commands are confined to the sandbox environment. Elevated mode lets the agent break out of ordinary agent-configured sandboxing and run commands outside the sandbox instead, with configurable approval gates. Sessions whose creator role requires sandboxing cannot use elevated mode to escape.

Elevated mode only changes behavior when the agent is sandboxed. For unsandboxed agents, exec already runs on the host.

Directives

Control elevated mode per-session with slash commands:

Directive What it does
/elevated on Run outside the sandbox on the configured host path, keep approvals
/elevated ask Same as on (alias)
/elevated full Run outside the sandbox on the configured host path and skip approvals when the mode/host approval policy is already permissive
/elevated off Return to sandbox-confined execution

Also available as /elev on|off|ask|full.

Send /elevated with no argument to see the current level.

How it works

Check availability

Elevated must be enabled in config and the sender must be on the allowlist:

```json5
{
  tools: {
    elevated: {
      enabled: true,
      allowFrom: {
        discord: ["user-id-123"],
        whatsapp: ["+15555550123"],
      },
    },
  },
}
```

Set the level

Send a directive-only message to set the session default:

```text
/elevated full
```

Or use it inline (applies to that message only):

```text
/elevated on run the deployment script
```

Commands run outside the sandbox

With elevated active, `exec` calls leave the sandbox. The effective host is
`gateway` by default, or `node` when the configured/session exec target is
`node`. In `full` mode, exec approvals are skipped when the resolved exec
mode/host approval policy is already fully permissive (security `full`,
ask `off`); otherwise the normal approval policy still applies. In
`on`/`ask` mode, configured approval rules always apply.

Resolution order

  1. Inline directive on the message (applies only to that message)
  2. Session override (set by sending a directive-only message)
  3. Global default (agents.defaults.elevatedDefault in config)

Availability and allowlists

Allowlist entry formats:

Prefix Matches
(none) Sender ID, E.164, or From field
name: Sender display name
username: Sender username
tag: Sender tag
id:, from:, e164: Explicit identity targeting

What elevated does not control

The bash chat command (! prefix; /bash alias) is a separate gate that requires tools.elevated to be enabled in addition to its own tools.bash.enabled flag. Disabling elevated locks ! shell commands out as well.

Related

Exec tool

Shell command execution from the agent.

Exec approvals

Approval and allowlist system for `exec`.

Sandboxing

Gateway-level sandbox configuration.

Sandbox vs Tool Policy vs Elevated

How the three gates compose during a tool call.

Multi-agent sandbox and tools

Per-agent sandbox and tool limits.

Thinking levels

The reasoning budget an elevated run uses.