Environment variables

CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH

Sets the allowed nesting depth for subagents beneath the main conversation.

Syntax

CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH

Type to search the reference, templates and lessons.