Plugin skill agent path resolution looks in wrong directory

Resolved 💬 3 comments Opened Jan 13, 2026 by philhradecs Closed Feb 26, 2026

Bug Description

When a workflow file specifies an Agent: directive, the skill loading system resolves the agent path relative to the skill directory instead of the plugin root directory.

Reproduction Steps

  1. Create a plugin with this structure:

``
plugins/my-plugin/
├── agents/
│ └── my-agent.md ← Agent file lives here
└── skills/
└── my-skill/
├── SKILL.md
└── workflows/
└── my-workflow.md ← References "Agent: my-agent"
``

  1. In my-workflow.md, specify:

``markdown
**Agent:** my-agent
``

  1. Trigger the workflow via the skill
  1. Observe error: Error reading file for path plugins/my-plugin/skills/my-skill/agents/my-agent.md

Expected Behavior

The agent should be resolved relative to the plugin root:

  • Expected path: plugins/my-plugin/agents/my-agent.md

Actual Behavior

The agent is resolved relative to the skill directory:

  • Attempted path: plugins/my-plugin/skills/my-skill/agents/my-agent.md

Context

This affects inject-mode workflows that need to load agent persona principles. The SKILL.md documentation states:

Agent definitions live in agents/ directory

This implies <plugin-root>/agents/, but the loader resolves relative to the skill subdirectory.

Environment

  • Claude Code version: Latest (as of 2025-01-13)
  • OS: macOS (Darwin 24.6.0)
  • Plugin structure follows the documented pattern in claude-code plugin docs

Workaround

Currently none — the agent file cannot be found regardless of where it's placed relative to the workflow.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗