[BUG] Plugin-shipped output styles not registered in 2.1.246: force-for-plugin ignored and style unresolvable by name (repro of auto-closed #64914)
Preflight Checklist
- [x] I have searched existing issues; the identical #64914 was auto-closed as stale with "open a new issue if this is still relevant"
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
Output styles shipped in a plugin's output-styles/ directory are not registered. Neither activation path works:
force-for-plugin: truein the style's frontmatter does not apply the style when the plugin is enabled.- Setting
"outputStyle": "<style name>"in~/.claude/settings.jsonsilently falls back to Default while the style file exists only inside the plugin.
A/B isolation with the identical file:
- Plugin-only: fresh sessions show no trace of the style in the system prompt (probed by asking the session to quote the style's section), under both activation paths above.
- After copying the same file to
~/.claude/output-styles/with the sameoutputStylesetting: the style is injected correctly and the probe returns the full section.
User-scope loading works and the file is valid; plugin-shipped registration is the broken piece.
The plugin itself is loaded and healthy: skills and hooks from the same install work. The plugin is enabled at user scope via enabledPlugins, installed from a git-source marketplace, and the plugin cache holds the current version with the style file and frontmatter intact.
Note: the /config outputStyle= autocomplete listing only built-in styles is the separate cosmetic gap tracked in #85246 and is not the failure reported here.
What Should Happen?
Per the output styles documentation (the force-for-plugin frontmatter table entry): a style in an enabled plugin's output-styles/ directory should be registered, selectable by name, and applied automatically when force-for-plugin: true is set.
Steps to Reproduce
- Create a plugin with
.claude-plugin/plugin.jsonandoutput-styles/mystyle.md:
```markdown
---
name: MyStyle
description: Test style
keep-coding-instructions: true
force-for-plugin: true
---
# Marker Section
Test instructions.
```
- Enable the plugin at user scope (
enabledPluginsin~/.claude/settings.json); confirm the plugin's skills and hooks load. - Start a fresh session and ask it to quote "Marker Section" from its system prompt: absent.
- Add
"outputStyle": "MyStyle"to~/.claude/settings.json; fresh session: still absent. - Copy the identical file to
~/.claude/output-styles/; fresh session: the section is present.
Environment
- Claude Code 2.1.246 (VS Code extension), Linux
- Plugin installed from a git-source marketplace, enabled at user scope
References
- #64914: identical report, auto-closed by the stale bot without a fix
- #85246:
/config outputStyle=autocomplete gap (separate, cosmetic)