How to Use initialPrompt in Claude Code Subagent Frontmatter: Auto-Kickstart Agents Without Manual Prompting
Claude Code v2.1.9x added initialPrompt as a supported frontmatter field for subagent configuration files. When present, it auto-submits as the first turn when the subagent is spawned — no manual kickstart required. Here’s how to use it effectively. What initialPrompt Does In a Claude Code subagent configuration file (typically a CLAUDE.md or equivalent file that defines the agent’s role and behavior), you can now include a YAML frontmatter block at the very top. The initialPrompt key in that block is auto-submitted as the agent’s first message when it’s spawned. ...