BUILD / set-default-selected-permission-in-grok-build

Build

Set the default selected permission row in Grok Build

Set the default selected permission row in Grok Build

default_selected_permission picks which row is highlighted on the first permission prompt of a session. You still confirm the prompt. Official: Settings reference, Permissions.

Values

Value Preselected row
always_allow_all_sessions (default) Always allow on all sessions
allow_command_always Always allow this command (scoped to the action)
allow_once Yes / allow once
reject Reject

User config:

[ui]
default_selected_permission = "allow_once"

Process override:

export GROK_DEFAULT_SELECTED_PERMISSION=allow_once

Precedence: env → config.tomlalways_allow_all_sessions. Values match case-insensitively; an unrecognized value falls back to the default.

Sticky cursor after the first answer

After you confirm the first prompt, later prompts preselect whatever you last chose (across edit, bash, and MCP prompts) until you restart the TUI. This key only sets the starting highlight.

allow_command_always stays scoped to the specific action under approval. Global allow-everything is always_allow_all_sessions. Per-command Always allow rows appear while remember_tool_approvals is on (default) — Remember tool approvals.

How it fits with modes and rules

Control Role
permission_mode / /auto / /always-approve Whether tools prompt at all — Configure permissions
default_selected_permission Which row is highlighted when a prompt does appear
[permission] allow / deny / ask Explicit patterns; deny always wins

Pitfalls

  • Put [ui] in user config. Project .grok/config.toml cannot hold this key.
  • Expecting the setting to re-apply on every prompt — only the first prompt of the session uses it; then the sticky last choice wins until restart.
  • Hiding per-command Always allow with remember_tool_approvals = false while still selecting allow_command_always — that row needs the remember options visible.