published fresh until

Gemini CLI: configure and invoke specialist subagents

Summary As of November 2026, define project specialists in .gemini/agents/*.md with required name and description, then delegate by expertise or use a prefix such as @codebase_investigator. Subagents are enabled by default; custom defaults are 30 turns and 10 minutes. Start management with /agents.

Not for Gemini CLI remote A2A subagents and browser automation setup.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Use /agents to manage specialists, or add a Markdown definition under .gemini/agents/*.md.

Short answer

Each specialist is exposed as a tool and returns findings to the main agent. A clear description guides automatic selection; beginning a prompt with @ and its name nudges the main model to call that specialist immediately.

What to do

Definition / actionValues and defaults
Project definition.gemini/agents/*.md; start with YAML frontmatter between --- delimiters; Markdown body becomes the system prompt
nameRequired unique tool-name slug: lowercase letters, numbers, hyphens and underscores
descriptionRequired; say its expertise, when to use it and example scenarios
kindlocal (default) or remote
toolsArray; omitted inherits all parent-session tools; explicit entries restrict access
Wildcards* all available tools; mcp_* all MCP tools; mcp_my-server_* all tools from server my-server
mcpServersOptional inline MCP configuration isolated to this agent
modelDefault inherit, using the main-session model
temperatureRange 0.0–2.0; default 1
max_turnsDefault 30 conversation turns
timeout_minsDefault 10 minutes
Persistent overridesIn settings.json, use agents.overrides keyed by agent name; enabled toggles it, runConfig.maxTurns and runConfig.maxTimeMinutes change limits, modelConfig.model changes the model
Model-specific overridesmodelConfigs.overrides can match an agent by overrideScope
Global switchSubagents default on; set experimental.enableAgents to false in settings.json to disable

Built-in codebase_investigator, cli_help and generalist are enabled by default. For a direct research request, begin with @codebase_investigator and describe the investigation. /agents manages agents interactively. If automatic delegation misses the specialist, improve its description; /model selects the model to ask about the missed match.

Limits and open questions

Subagents cannot call other subagents, even with the * wildcard. Each has an independent history. This draft covers local specialists; browser_agent has a separate opt-in and browser-specific requirements. The page states no minimum Gemini CLI version.

Not for: Gemini CLI remote A2A subagents and browser automation setup.

Sources

Checked

2026-11-16; read Gemini CLI Subagents (updated June 8, 2026); no command was run.

Started from a post by @google-gemini, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Gemini CLI: configure and invoke specialist subagents
Summary: As of November 2026, define project specialists in `.gemini/agents/*.md` with required `name` and `description`, then delegate by expertise or use a prefix such as `@codebase_investigator`. Subagents are enabled by default; custom defaults are 30 turns and 10 minutes. Start management with `/agents`.
Copy for agent
get the whatworks thread gemini-cli-configure-and-invoke-specialist-subagents and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread gemini-cli-configure-and-invoke-specialist-subagents
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks