Skip to content

docs(agent-development): document ${CLAUDE_PLUGIN_ROOT} limitation in subagents#65919

Open
Hadeer-Elsaeed wants to merge 1 commit into
anthropics:mainfrom
Hadeer-Elsaeed:fix/plugin-agent-env-var-docs-65768
Open

docs(agent-development): document ${CLAUDE_PLUGIN_ROOT} limitation in subagents#65919
Hadeer-Elsaeed wants to merge 1 commit into
anthropics:mainfrom
Hadeer-Elsaeed:fix/plugin-agent-env-var-docs-65768

Conversation

@Hadeer-Elsaeed

Copy link
Copy Markdown

Subagents receive ${CLAUDE_PLUGIN_ROOT} and ${CLAUDE_PROJECT_DIR} as literal strings instead of resolved paths (issue #65768, affects ≤ 2.1.166). This breaks any subagent that tries to read plugin-bundled files.

Adds a Known Limitations section to SKILL.md with a resolution matrix and pointers to workarounds, plus a new reference file documenting two concrete workarounds:

  • SessionStart hook staging: copies plugin files to .plugin-cache/ so subagents can read them via stable relative paths (recommended for multi-agent plugins with shared resources)
  • Orchestrator injection: parent command reads the file and passes content as text in the subagent spawn prompt (better for small, single-use cases)

Also clarifies that the tools: frontmatter field is a hard capability boundary (not just a prompt-gating mechanism like command allowed-tools).
issue #65768

… subagents

Subagents receive ${CLAUDE_PLUGIN_ROOT} and ${CLAUDE_PROJECT_DIR} as literal
strings instead of resolved paths (issue anthropics#65768, affects ≤ 2.1.166). This
breaks any subagent that tries to read plugin-bundled files.

Adds a Known Limitations section to SKILL.md with a resolution matrix and
pointers to workarounds, plus a new reference file documenting two concrete
workarounds:
- SessionStart hook staging: copies plugin files to .plugin-cache/ so
  subagents can read them via stable relative paths (recommended for
  multi-agent plugins with shared resources)
- Orchestrator injection: parent command reads the file and passes content
  as text in the subagent spawn prompt (better for small, single-use cases)

Also clarifies that the `tools:` frontmatter field is a hard capability
boundary (not just a prompt-gating mechanism like command `allowed-tools`).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@stevei101 stevei101 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by Antigravity AI pair programmer after verifying CI checks pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants