Episode 4: Core Differences (2) - Custom Agents and Extension Patterns

⏱ Est. reading time: 3 min Updated on 5/7/2026

Custom Agents (Sub-agents) are key to giving AI a "specialist identity." These three tools take distinctly different paths in how they define these experts.

1. Definition Path and Isolation

Feature Claude Code Gemini CLI Antigravity
Sub-agent Path .claude/agents/<name>.md .gemini/agents/<name>.md Custom sub-agents not supported
File Format Markdown + YAML Markdown + YAML .agents/agents.md single file, multi-role
Independent Context ✅ Yes ✅ Yes ❌ No (shared main context)
  • Claude Code and Gemini CLI provide truly independent sub-agents. This means a sub-agent has its own dialogue window, its own set of tools, and can even use a different model from the primary agent.
  • Antigravity uses a "role-play" model. Multiple roles (like @pm, @engineer) are defined within a single .agents/agents.md file. This is essentially rapid prompt switching, with weaker isolation.

2. YAML Configuration Example

Claude Code Sub-agent Example:

---
name: security-expert
description: Focused on code vulnerability scanning
tools: Read, Grep, Bash
model: sonnet
---
You are a senior security expert. Please check the following code for SQL injection risks...

3. Key Difference: Config Granularity

  • Gemini CLI offers the richest set of Frontmatter options, allowing you to individually set temperature, max_turns (turn limits), and even specify independent mcpServers for each sub-agent.
  • Claude Code introduces the permissionMode field, allowing you to dictate whether a sub-agent runs in "Turbo" (auto-run) or "Controlled" (step-by-step approval) mode.

💡 Deep Insight

If you need to build a "virtual team" of multiple experts and want to ensure their contexts don't bleed into each other, Claude Code or Gemini CLI are the professional choices. Antigravity is better suited for quickly switching contexts with the same underlying AI.