{"version":"2.1.331","anchor":"plugin-manifests-gain-optionaldependencies-with-a-persisted","canonical_anchor":"plugin-manifests-gain-optionaldependencies-with-a-persisted","heading":"Plugins can declare optional dependencies","tier":"use","area":"Plugins","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331\/e\/plugin-manifests-gain-optionaldependencies-with-a-persisted","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.331","markdown":"### Plugins can declare optional dependencies\n\nPlugin manifests accept `optionalDependencies`, declined ones are remembered, manifests are validated, and a new `agent_note` field is added\n\n**What**\n\nA plugin's manifest is the file that describes it. Manifests can now list `optionalDependencies` next to `dependencies`. These are other plugins that are installed and enabled with the plugin by default.\n\n- You can disable or uninstall an optional dependency, and one that cannot be installed is skipped\n\n- Claude Code keeps a `declinedPlugins` list in a settings-like file. When automatic dependency cleanup disables a plugin, it is written to that list so it is not installed again. If that save may have failed, Claude Code warns \"Could not save as declined\"\n\n- Manifest checks now report an `optionalDependencies` value that is not a list (\"'optionalDependencies' must be a list of plugin names\"), a malformed entry, a name also listed in `dependencies`, and a version range that will be ignored\n\n- The field is open to all plugin authors, with no switch controlling it\n\nSeparately, the system message format in `stream-json` output, where each event is written as a line of JSON for another program, gains an optional `agent_note` field. It carries a note a plugin left for an agent about another agent's work.\n\n**Why**\n\nPlugin authors can offer helpful companion plugins without forcing them on you, and turning one off should stay turned off. Programs that read `stream-json` output may see the new `agent_note` field.\n\n- Area: Plugins\n- Names: `optionalDependencies`\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}