Regression in 2.1.205: installed plugin slash commands return "Unknown command" in print mode (claude -p); 2.1.204 works
Status Fixed / completed
Reported on v2.1.205
Maintainer reply ✓ Yes — bcherny
Workaround ✓ Mentioned in description ↑
Activity 3 comments · opened Jul 9, 2026 · closed Aug 20, 2026
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
Environment
- Claude Code 2.1.205 (native/standalone install, macOS arm64, Darwin 25.5.0)
- Plugin installed user-scope from a marketplace (registered in ~/.claude/plugins/installed_plugins.json), cache under ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/ with a valid .claude-plugin/plugin.json and commands/*.md
Bug
As of 2.1.205, slash commands provided by installed plugins are not resolved in print mode. Every invocation exits immediately:
$ claude -p "/structured-workflows:help"
Unknown command: /structured-workflows:help
The same commands work fine in 2.1.205 interactive sessions, and project-local .claude/commands/*.md slash commands still work in print mode on 2.1.205 — the regression is specific to plugin commands in print mode.
Bisect
Ran the identical command against older native binaries from ~/.local/share/claude/versions:
- 2.1.203: works (command executes)
- 2.1.204: works (command executes)
- 2.1.205: "Unknown command"
Impact
Any headless automation that dispatches plugin commands via claude -p breaks completely. In our case an unattended pipeline lost a full night of scheduled runs because every dispatched plugin command died instantly; we've had to pin the CLI to 2.1.204 and disable the auto-updater.
Notes
- Possibly related (older, different repro paths): #55756 (plugin commands via enabledPlugins unknown in -p, --plugin-dir works), #70596 (plugin commands unavailable in background sessions).
--plugin-dirpointed at the plugin cache dir is a workaround but bypasses the installed-plugin registry.- Exit code 0 for "Unknown command" also makes this hard to detect in automation — a non-zero exit would help.
3 Comments
Retested this on 2.1.233 (Linux): installed a plugin user-scope from a marketplace (registered via the installed-plugin registry, no
--plugin-dir), then ranclaude -p "/myplugin:command"in print mode — the plugin command resolves and executes correctly. A nonexistent command still printsUnknown command, so the resolution path is genuinely working rather than silently succeeding.This appears to have been fixed in a recent release after 2.1.205 (changelog). Please update from your pinned 2.1.204 and re-enable the auto-updater; your headless pipeline should work again on current versions.
One note:
Unknown commandin-pmode still exits 0 — your point that a non-zero exit would make failures detectable in automation is a fair one and worth its own feature request if you'd like to file it.Closing as fixed — reply here to reopen if you still hit this on the current release.
🤖 Generated with Claude Code
Confirmed fixed on 2.1.238: user-scope marketplace plugin commands resolve and execute in
-pmode. I unpinned on 07-10 after verifying 2.1.206 and the auto-updater has been on since. Filed the non-zero-exit follow-up as #88387. Thanks for retesting.---
Drafted with Claude Code (AI-assisted); reviewed by the author.
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.