2026-01-04 05:21:12 +00:00
---
2026-01-12 02:49:55 +00:00
summary: "Elevated exec mode and /elevated directives"
2026-01-04 05:21:12 +00:00
read_when:
- Adjusting elevated mode defaults, allowlists, or slash command behavior
---
# Elevated Mode (/elevated directives)
## What it does
2026-01-24 21:12:46 +00:00
- `/elevated on` runs on the gateway host and keeps exec approvals (same as `/elevated ask` ).
2026-01-22 05:32:13 +00:00
- `/elevated full` runs on the gateway host **and** auto-approves exec (skips exec approvals).
- `/elevated ask` runs on the gateway host but keeps exec approvals (same as `/elevated on` ).
2026-01-24 21:12:46 +00:00
- `on` /`ask` do **not** force `exec.security=full` ; configured security/ask policy still applies.
2026-01-18 04:27:33 +00:00
- Only changes behavior when the agent is **sandboxed** (otherwise exec already runs on the host).
2026-01-22 05:32:13 +00:00
- Directive forms: `/elevated on|off|ask|full` , `/elev on|off|ask|full` .
- Only `on|off|ask|full` are accepted; anything else returns a hint and does not change state.
2026-01-04 05:21:12 +00:00
2026-01-08 22:57:08 +01:00
## What it controls (and what it doesn’ t)
2026-01-09 20:42:16 +00:00
- **Availability gates**: `tools.elevated` is the global baseline. `agents.list[].tools.elevated` can further restrict elevated per agent (both must allow).
2026-01-22 05:32:13 +00:00
- **Per-session state**: `/elevated on|off|ask|full` sets the elevated level for the current session key.
- **Inline directive**: `/elevated on|ask|full` inside a message applies to that message only.
2026-01-09 02:52:44 +01:00
- **Groups**: In group chats, elevated directives are only honored when the agent is mentioned. Command-only messages that bypass mention requirements are treated as mentioned.
2026-01-24 21:12:46 +00:00
- **Host execution**: elevated forces `exec` onto the gateway host; `full` also sets `security=full` .
- **Approvals**: `full` skips exec approvals; `on` /`ask` honor them when allowlist/ask rules require.
2026-01-18 04:27:33 +00:00
- **Unsandboxed agents**: no-op for location; only affects gating, logging, and status.
2026-01-12 02:49:55 +00:00
- **Tool policy still applies**: if `exec` is denied by tool policy, elevated cannot be used.
2026-01-26 22:18:36 +00:00
- **Separate from `/exec` **: `/exec` adjusts per-session defaults for authorized senders and does not require elevated.
2026-01-08 23:17:02 +01:00
2026-01-04 05:21:12 +00:00
## Resolution order
1. Inline directive on the message (applies only to that message).
2. Session override (set by sending a directive-only message).
2026-01-09 12:44:23 +00:00
3. Global default (`agents.defaults.elevatedDefault` in config).
2026-01-04 05:21:12 +00:00
## Setting a session default
2026-01-22 05:32:13 +00:00
- Send a message that is **only** the directive (whitespace allowed), e.g. `/elevated full` .
- Confirmation reply is sent (`Elevated mode set to full...` / `Elevated mode disabled.` ).
2026-01-18 04:27:33 +00:00
- If elevated access is disabled or the sender is not on the approved allowlist, the directive replies with an actionable error and does not change session state.
2026-01-08 03:22:14 +01:00
- Send `/elevated` (or `/elevated:` ) with no argument to see the current elevated level.
2026-01-04 05:21:12 +00:00
## Availability + allowlists
2026-01-09 12:44:23 +00:00
- Feature gate: `tools.elevated.enabled` (default can be off via config even if the code supports it).
- Sender allowlist: `tools.elevated.allowFrom` with per-provider allowlists (e.g. `discord` , `whatsapp` ).
2026-01-09 20:42:16 +00:00
- Per-agent gate: `agents.list[].tools.elevated.enabled` (optional; can only further restrict).
- Per-agent allowlist: `agents.list[].tools.elevated.allowFrom` (optional; when set, the sender must match **both** global + per-agent allowlists).
2026-01-13 06:16:43 +00:00
- Discord fallback: if `tools.elevated.allowFrom.discord` is omitted, the `channels.discord.dm.allowFrom` list is used as a fallback. Set `tools.elevated.allowFrom.discord` (even `[]` ) to override. Per-agent allowlists do **not** use the fallback.
2026-01-09 20:42:16 +00:00
- All gates must pass; otherwise elevated is treated as unavailable.
2026-01-04 05:21:12 +00:00
## Logging + status
2026-01-12 02:49:55 +00:00
- Elevated exec calls are logged at info level.
2026-01-22 05:32:13 +00:00
- Session status includes elevated mode (e.g. `elevated=ask` , `elevated=full` ).