fix: remove unsupported agents field from plugin.json#1490
fix: remove unsupported agents field from plugin.json#1490gaurav0107 wants to merge 2 commits intoaffaan-m:mainfrom
agents field from plugin.json#1490Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
💤 Files with no reviewable changes (2)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PR removes the top-level Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR fixes a plugin install failure by removing the unsupported Confidence Score: 5/5Safe to merge — removes a field that was actively breaking installs, with no functional regressions. All changes are targeted removals of an unsupported field. The local schema already had No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[claude plugin install] --> B{Validate plugin.json}
B -->|Before PR: agents field present| C["❌ agents: Invalid input\n(Claude Code validator rejects field)"]
B -->|After PR: agents field absent| D["✅ Validation passes"]
D --> E[Plugin installs successfully]
F["agents/*.md files"] -->|Auto-discovered by convention| E
G["schemas/plugin.schema.json\nadditionalProperties: false"] -->|Rejects agents if re-added| B
Reviews (2): Last reviewed commit: "docs: update README to reflect agents fi..." | Re-trigger Greptile |
There was a problem hiding this comment.
1 issue found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".claude-plugin/PLUGIN_SCHEMA_NOTES.md">
<violation number="1" location=".claude-plugin/PLUGIN_SCHEMA_NOTES.md:162">
P2: The new docs overgeneralize hooks behavior: they claim any explicit `hooks` field causes errors, conflicting with the documented exception that additional hook files may be declared.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
The Claude Code plugin validator rejects the "agents" field entirely. Remove it from the manifest, schema, and tests. Update schema notes to document this as a known constraint alongside the hooks field. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7156985 to
53a599f
Compare
Hey! Ran into this while trying to install the plugin —
claude plugin installfails with:Turns out the
"agents"array in.claude-plugin/plugin.jsonisn't recognized by Claude Code's plugin validator at all. Same thing that happened with thehooksfield a while back (already documented in PLUGIN_SCHEMA_NOTES.md).What I changed
agentsarray (38 entries) fromplugin.json— this is the actual fixagentsproperty fromschemas/plugin.schema.jsonso the local schema stays in syncagents, same pattern as the existinghookswarningagentsdoesn't come backThe actual agent
.mdfiles inagents/are untouched — they're auto-discovered by convention, same as hooks. This only removes the manifest declaration that was breaking installs.Testing
The new test mirrors the existing hooks pattern:
'claude plugin.json does NOT have agents field (unsupported by Claude Code validator)'Closes #1459
Summary by cubic
Remove the unsupported
agentsfield from.claude-plugin/plugin.jsonto stop plugin install failures ("agents: Invalid input"). Align the schema, docs, and tests, and document that agents are auto-discovered by convention.agentsfrom.claude-plugin/plugin.jsonandschemas/plugin.schema.json..claude-plugin/PLUGIN_SCHEMA_NOTES.mdand.claude-plugin/README.mdto stateagentsis not a supported manifest field and is auto-loaded (like hooks).Written for commit 53a599f. Summary will update on new commits.
Summary by CodeRabbit
Documentation
agentsfield is unsupported and must not be included; examples, anti-patterns, and contributor guidance updated with an explicit critical warning.Chores
Tests
agentsmust not be declared.