Class 05 — Claude Code

The Power Layer

Subagent orchestration, MCP server integrations, remote sessions, initialization hooks, and the debug surface.

Key concept
Classes 1–4 cover using one Claude. This class is about composing Claudes — spawning subagents with specialized prompts and tools, connecting external context via MCP, and wiring Claude into your infrastructure via hooks.

Agents & Subagents

Claude Code can orchestrate specialized subagents — each with its own system prompt, tool set, model, and turn limit. The orchestrator spawns them via the Task tool.

--agent

Specify a named agent (defined in .claude/agents/) for this session. Overrides the agent field in config files.

claude --agent my-custom-agent
--agents

Define subagents inline as a JSON object. Each key is an agent name; the value is a config object with description, prompt, tools, and model.

claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You review PRs…"}}'
--teammate-mode

Controls how spawned teammates are displayed. auto (default), in-process, or tmux for terminal pane isolation.

claude --teammate-mode in-process
--agents JSON — Config Fields
description required Natural language description of when this subagent should be invoked. The orchestrator uses this to decide which agent to Task.
prompt required The system prompt guiding the subagent's behavior and expertise area.
tools optional Array of allowed tools, e.g. ["Read", "Edit", "Bash"]. Inherits all tools if omitted.
disallowedTools optional Tools explicitly denied. Takes precedence over the tools list.
model optional Model alias: sonnet, opus, haiku, or inherit. Use cheaper models for simpler subtasks.
skills optional Array of skill names to preload into the subagent's context window on spawn.
mcpServers optional MCP servers available to this subagent. Each entry is a name string or {"name": config} object.
maxTurns optional Maximum agentic turns before the subagent auto-stops. Prevents runaway subtasks.

MCP, Remote, Lifecycle & Debug

Connect external context servers, move sessions between cloud and local, wire up lifecycle hooks, and expose the debug surface.

MCP
--mcp-config

Load MCP servers from JSON files or strings. Adds servers to the current session. Repeatable for multiple config files.

claude --mcp-config ./mcp.json
MCP
--strict-mcp-config

Only use MCP servers from --mcp-config, ignoring all others. Guarantees a controlled, reproducible server set.

claude --strict-mcp-config --mcp-config ./mcp.json
MCP
--ide

Automatically connect to an IDE on startup if exactly one valid IDE is available. Enables IDE integration features.

claude --ide
MCP
--chrome / --no-chrome

Enable or disable Chrome browser integration. Gives Claude access to web automation and testing. --no-chrome explicitly disables even if enabled globally.

claude --chrome
Remote
--remote

Create a new web session on claude.ai with the provided task description. Launches in the browser for cloud execution.

claude --remote "Fix the login bug"
Remote
--teleport

Resume a web session in your local terminal. Brings a cloud session back to your CLI environment — teleport it home.

claude --teleport
Hooks
--init

Run initialization hooks and then start interactive mode. Bootstraps projects with setup scripts before the session begins.

claude --init
Hooks
--init-only

Run initialization hooks and exit immediately — no interactive session follows. Pure setup mode for CI bootstrapping.

claude --init-only
Hooks
--maintenance

Run maintenance hooks and exit. For scheduled upkeep, cleanup scripts, or CI maintenance routines.

claude --maintenance
Debug
--debug

Enable debug mode with optional category filtering. Pass "api,hooks" to include only those categories, or "!statsig" to exclude one.

claude --debug "api,mcp"
Debug
--version / -v

Output the current Claude Code version number and exit. Quick check without starting a session.

claude -v
Series complete  ·  5 of 5

You've covered the full CLI

From anatomy to exchange, output to control, and now the power layer — all 50+ flags across 11 categories.

← Class 04: Controlling Claude 5 of 5