[DOCS] Clarify behavior of `agent` field when `context` is not set to `fork`
Documentation Type
Unclear/confusing documentation
Documentation Location
https://code.claude.com/docs/en/skills#available-metadata-fields
Section/Topic
The agent field entry within the "Available metadata fields" table in the Agent Skills documentation.
Current Documentation
The agent field description states:
"Specify which agent type to use when context: fork is set (e.g., Explore, Plan, general-purpose, or a custom agent name from .claude/agents/). Defaults to general-purpose if not specified. Only applicable when combined with context: fork."
What's Wrong or Missing?
While the documentation mentions the field is "only applicable" when combined with context: fork, it does not explicitly state the behavior when a user defines an agent but leaves the context as inline (the default). It is unclear whether this configuration triggers a validation error, a warning, or is silently ignored.
Suggested Improvement
The documentation should explicitly state that the agent field is ignored if the context is not set to fork.
Suggested Text:
"Specify which agent type to use whencontext: forkis set (e.g.,Explore,Plan,general-purpose, or a custom agent name from.claude/agents/). Defaults togeneral-purposeif not specified. This field is ignored unlesscontextis set tofork."
Impact
High - Prevents users from using a feature
Additional Context
- This relates directly to the
contextfield documented immediately above it: https://code.claude.com/docs/en/skills#available-metadata-fields - Explicitly defining "ignored" behavior helps developers avoid confusion when a Skill executes in the main thread despite an agent being specified in the metadata.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗