[BUG] --append-system-prompt does not append to the system prompt, but is a user message instead
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [x] Other: Claude Code via Max 20 subscription
- Claude CLI version: 1.0.61
- Operating System: MacOS
- Terminal: Alacritty
Bug Description
--append-system-prompt does not actually append to the system prompt, but injects a user message instead. This completely defeats the purpose of it being a system prompt: the context is lost over time, and may even be subject to compaction, which would lead to complete loss of the role.
Steps to Reproduce
- Use --append-system-prompt
- Observe with mitmproxy that it is actually a
message
Expected Behavior
It would be appended as-is after the existing claude code system prompt, perhaps with some clear markers around it.
Actual Behavior
It is sent as a user message.
Additional Context
Here you can see that the literal text I provided as --append-system-prompt is actually provided as a user message, which makes it not very much different than just a custom slash command and defeats the purpose.
yep i noted the same!
wondered why it was not quite following my instructions as well, this makes it clear!
One unrelated question - do you know how the flag behaves when you continue a conversation? Will it append the system prompt after each continue of the convo?
It's just user input, will lose relevance as the context size grows, and may eventually be compacted away.
This imho is a major bug, as especially with the sub-agents, it doesn't enable us to provide additional instructions to the "main" agent, ie "never ever edit code yourself" or those kind of things.
I asked Claude if he could see my amendment in the system prompt and it said no. It wasn't following the instructions in it ... so that explains it.
Can you check again?
/context seems still broken
but Claude acknowledges the --append-system-prompt context as being actually in the system prompt
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
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.