Clone
2
lessons/patterns/agent-model-field-not-supported-by-claude-code
Leo Miranda edited this page 2026-02-03 03:52:40 +00:00

CORRECTION: Agent model: Field IS Supported

Date

2026-02-02 (UPDATED)

Summary

THIS LESSON WAS WRONG. The model: field IS supported in agent YAML frontmatter per the official documentation at https://code.claude.com/docs/en/sub-agents

What Actually Happened

  1. Added model: field to agent frontmatter - THIS WAS CORRECT
  2. Plugin failed to load
  3. I incorrectly blamed the model field
  4. Removed the model field - THIS WAS WRONG
  5. User pointed me to the docs showing model IS supported

The Real Issue

The plugin loading error was NOT caused by the model field. Need to investigate the actual cause.

Valid Agent Frontmatter Fields (from official docs)

Field Required Description
name Yes Unique identifier using lowercase letters and hyphens
description Yes When Claude should delegate to this subagent
tools No Tools the subagent can use
disallowedTools No Tools to deny
model No VALID: sonnet, opus, haiku, or inherit. Defaults to inherit
permissionMode No Permission mode
skills No Skills to load
hooks No Lifecycle hooks

Lesson

READ THE OFFICIAL DOCS BEFORE ASSUMING WHAT'S SUPPORTED.

I made assumptions based on a previous revert that was done without checking if Claude Code had been updated to support the field.


Tags: agents, frontmatter, model, CORRECTION