context: fork and agent frontmatter silently ignored for plugin-loaded skills
Summary
When a skill with context: fork and agent: Explore frontmatter is loaded via a plugin (--plugin-dir or installed plugin), the fork/agent fields are silently ignored. The skill body is injected inline as a synthetic user message instead of being dispatched to a subagent. The identical skill works correctly when placed in .claude/skills/.
This is a blocker for teams distributing forked skills via plugins.
Reproduction
SKILL.md (identical file used in both tests):
---
name: fork-test
description: Use this skill when the user says "test fork".
context: fork
agent: Explore
---
# Fork Test
1. Write a file at `fork-test-output.txt` containing "FORK_DETECTED: true"
2. Run: `echo "FORK_PID: $$"`
3. Output: "FORK_TEST_COMPLETE"
Test 1 — Local skill (works)
mkdir -p /tmp/test-project/.claude/skills/fork-test/
cp SKILL.md /tmp/test-project/.claude/skills/fork-test/SKILL.md
cd /tmp/test-project && claude -p "test fork" --output-format json
Test 2 — Plugin skill (broken)
cd /tmp/test-project && claude -p "test fork" --plugin-dir /path/to/plugin --output-format json
Evidence from JSON output
| Field | Local skill | Plugin skill |
|---|---|---|
| tool_use_result.status | "forked" | missing |
| tool_use_result.agentId | "a02a93032c8fcc105" | missing |
| tool_use_result.result | Summary from subagent | missing |
| isSynthetic user message | Not present | true (skill body injected inline) |
| Models used | Opus + Haiku (Explore agent) | Opus only (no subagent) |
Local skill tool_use_result (correct)
{
"success": true,
"commandName": "fork-test",
"status": "forked",
"agentId": "a02a93032c8fcc105",
"result": "**Summary**: I am operating in read-only mode..."
}
Plugin skill tool_use_result (broken)
{
"success": true,
"commandName": "plato-ai-jetpack:fork-test"
}
No status, no agentId, no result. The skill body appears as a synthetic user message (isSynthetic: true) and executes inline in the main conversation.
Expected behavior
Plugin skills with context: fork should be dispatched to a subagent, identical to local skills.
Actual behavior
The context and agent frontmatter fields are silently stripped/ignored. No warning or error is emitted. The skill runs inline.
Impact
Teams cannot distribute skills that use context: fork via plugins. This defeats the purpose of plugins for any skill that needs subagent isolation (research tasks, long-running operations, context window protection). There is no workaround other than asking every team member to manually copy skills into .claude/skills/.
Environment
- Claude Code: 2.1.76
- Platform: macOS (Darwin 25.3.0)
- Feedback ID: e039757e-bc04-48cc-b81e-3cd78dfc9f98
5 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This needs to be fixed for teams as well as plugin developers to actually benefit from claude's features without too much workarounds.
one thing i just discovered, but still have to verify. In a plugin context, once i namespaced my custom agent, it started actually dispatching the context isolated, backgrounded, sub-agent. The skill and agent
bar-agentlive under the same pluginfoo-pluginnamespaceI wonder if there is still a prefix for native agents from a plugin context
This was fixed in v2.1.101 — Plugin-loaded skills now honor the
context: forkandagentfrontmatter fields instead of silently ignoring them. If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.