Select one agent contract
The released root command exposes --agent for an agent name or definition file and --agents for inline subagent definitions as JSON. Inline JSON belongs in controlled tooling, not copied casually through shell history.
Use --no-subagents when the task must remain single-agent. A named agent does not automatically narrow the parent process permissions.
grok --agent reviewer -p "Review the current diff" --no-subagents Manage definitions in the TUI
The official modes guide documents /config-agents with /agents as an alias. It is an interactive command, not a grok agents shell subcommand.
Use /tasks to inspect tasks and subagents, /session-info to confirm model and session state, and /fork only when a separate peer lineage is intended.
- Slash commands run inside the TUI.
- Shell options are parsed before launch.
- Source-preview commands stay labeled preview until official docs or release evidence confirm them.
Audit inherited surfaces
grok inspect reports the configuration sources, rules, skills, plugins, hooks, and MCP servers discovered for the current directory; agent definitions live under .grok/agents and ~/.grok/agents. Compatibility scanning can also import agent definitions from other tool layouts, so an empty local agent folder is not proof that no definitions are active.
Review instruction provenance and tool authority before enabling a custom agent in a repository with secrets or deployment access.