[BUG] In an Output-Style file, keep-coding-instructions in frontmatter doesn't do anything. Claude Code’s built-in software engineering instructions are never removed
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
As explained in the Output-Style doc:
Custom output styles should leave out Claude Code’s built-in software engineering instructions, such as how to scope changes, write comments, and verify work, unless keep-coding-instructions is set to true.
But even if you don't set keep-coding-instructions to true (if you set it to false or if you don't set this parameter at all), the default's output style stays in the system prompt.
What Should Happen?
when we set keep-coding-instructions to false in a custom output-file file, ClaudeCode's built-in software engineering instructions should be gone from the system prompt.
But it's not the case. Setting the keep-coding-instructions to true or to false doesn't change the system prompt at all. (Nor any of of the system-reminders passed during the conversation).
Error Messages/Logs
Steps to Reproduce
- Create an example output-file following this documentation.
- set the keep-coding-instructions: true in the frontmatter of this file.
- put this file in your project's .claude/output-styles/ folder
- set your new output file in the claude config (Run /config in the terminal and select your style under Output style, or set outputStyle in a settings file to the style’s name. It takes effect after /clear or the next time you start a session.)
- start a fresh conversation
- look at the system-prompt that was send to your claude agent (save it somewhere)
- repeat step 1 to 6 but in step 2 set the keep-coding-instructions to false
- compare the two system prompts
You'll see that the system-prompt are exactly the same.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.246
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
_No response_