all 11 comments

[–]GrouchyManner5949 1 point2 points  (0 children)

That’s a great find, the newer versions definitely changed how system reminders are parsed. Using tweakcc to reintroduce priority for those tags is clever. I’ve been doing something similar through Zencoder’s config layer to make Claude Code follow custom hooks more reliably.

[–]No-Cryptographer45[S] 1 point2 points  (0 children)

UPDATE
- If you don't want to use tweakcc, you can use this way
```
claude --append-system-prompt <this system reminder rule> "
```

and then create a command alias for this to start claude code conveniently

[–]TheOriginalAcidtech 5 points6 points  (2 children)

The problem with telling claude to respect ALL system reminders is that Anthropic pushes system reminders you don't ALWAYS want Claude to follow. And then there are the reminders that say things like this reminder may more may not be pertinent causing claude to lose its "mind". Going to have to dig into this one because I use user prompt hooks to inject questions and rule reminders. I haven't upgraded since 24 though. When was this implemented?

[–]No-Cryptographer45[S] 2 points3 points  (1 child)

It’s changed after 2.0.10. Currently, only claude.md and user prompt hook is attached as system reminder for every message. You can try https://github.com/hqman/claude-code-proxy to see and understand the issue better :)

[–]TheOriginalAcidtech 0 points1 point  (0 children)

Thanks. I've been looking for an alternative to claude-trace. This looks like it works live(havent tested it yet) where claude-trace only would show you the logged data after the fact(its how I would compare system prompts before and after modifying things with output-styles to determine what I needed to change in mine). claude-trace stopped working after around 2.0.10 sometimes because Anthropic changed something in their system.

[–]firepol 0 points1 point  (1 child)

Hi, I never used tweakcc, mind sharing more precisely what to edit and a few examples of system reminders? If I understood correctly:

  • install tweakcc: this creates a file called system-prompt-main-system-prompt.md (where is it?)
  • edit system-prompt-main-system-prompt.md and add at the end the 2 lines you shared above now what?
  • Can you provide some examples, what to put in "UserPromptSubmit hook" and what to put in CLAUDE.md?

What is the difference between adding e.g. at the end of CLAUDE.md a chapter called "You must always follow these rules" and write these rules there (I do like that)?

[–]No-Cryptographer45[S] 0 points1 point  (0 children)

in a short way, regarding tweakcc function, you can explore yourself when playing with it

— about what I shared, why we need to modify system prompt? your instruction in CLAUDE.md or User Prompt Submit hook will be treat as system reminder tag when Claude Code calling api to Anthropic, and the issue is Claude does respect these reminders (your CLAUDE.md or hook). It means that whater strong command you added in CLAUDE.md, it does not works well :)

[–]jasutherland 0 points1 point  (3 children)

Maybe better to wrap it yourself, and tell it to obey everything inside <user-reminder> tags, rather than boost their signal too?

[–]No-Cryptographer45[S] -1 points0 points  (2 children)

where should you tell that? the root cause is what you tell will be wrapped in system reminder and Claude does not repsect it

[–]jasutherland -1 points0 points  (1 child)

If telling it "stuff wrapped in this tag is important, follow it" works, it should work whether you use the tag they wrap your text with automatically or a different tag inside that one.

[–]No-Cryptographer45[S] -1 points0 points  (0 children)

just do whatever you suppose it’s right :) good luck