Comment by hysan
16 hours ago
Relevant anecdata because I've burned many a Claude sessions on this.
If you're using Claude Code, then it's in the harness. At the close of many sessions, I would start a meta conversation over why the LLM would consistently break certain rules. What it found when debugging itself is that some of the "contradicting" rules that I had were in fact, not from my rules. Instead, the instructions from its own harness had phrases telling it to do things like that. When something contradicts, its own instructions would outweigh any custom ones you write. Every rule variant I had tested (including the one that says it overrides the harness instructions - and yes, I've actually tested all the ideas in your comment too) has ultimately been unsuccessful due to this according to the LLM.
You can't trust it's account on why it did something, it does not "remember". It will just make up something plausible sounding.
I know this is a popular position and it makes sense at face value when you think of LLMs as autocomplete systems. But it’s genuinely wrong.
Relevant reading is most notably anthropic’s research on the J-space. LLMs will plan ahead of time helped with CoT, get to a plan and “store” it in j-space, and execute on that plan which means they can in fact “backtrack” and give you reasoning on why they did something, because it IS part of their state.
True which is why I said anecdata. But the point is that it’s a useful signal when it’s across enough sessions where it quotes back contradictions to you. If you’re willing to burn the tokens, the first thing it does is use a tool call to search your rules to see what it quoted wasn’t there. That leads to the LLM claiming two common conclusions (sometimes after a lot of back and forth) - it’s in the harness or it’s in the model. Over the 30+ sessions where I’ve tried this, the overwhelming claim was some variant of a harness instruction. It might not be there but given the consistency and how all my rule tests have failed in the same way that others describe, it at least makes it reasonable to conclude that it’s baked in somewhere and in a way where agent rules aren’t able to strongly affect the behavior. My bet would be on the harness because the class of undesired behavior follows that of a structured response.
It has access to its own instructions, right? Otherwise how would the instructions work?
All instructions to LLMs are merely suggestions to nudge it in the right behaviour. Unless you have a deterministic guardrail that guards against a single specific action, everything else is a slot machine that's biased strongly in your favour.
My global CLAUDE.md explicitly states "When commenting on code and configs, or writing MD files, strictly write within the domain of the content being commented on. DO NOT include information, negatives or ramblings from work sessions. For e.g. if commenting on a proto string field that is replacing an int field, do not comment that 'this is not an int field'".
This reduced the idiocy of the agent (Opus 5 included) when writing documents. But I'm still catching it writing README.md talking about the negatives that it removed. Those belong in the memory if it is actually that important (most of the time it's junk), but Claude doesn't seem to understand and never ever learns.
To me it explained its inability to follow my preferred coding style by blaming its training data.
I've had better success with having it write and then rewrite rather than trying to prompt the first write into following my style rules.
2 replies →
Sounds plausible.
It can read its own context. That’s how this all works.
I have found that asking the agent why it did X or Y is an essential part of iterating on its harness. It was non-obvious to me, probably because I'm used to having to reverse-engineer why a system does something, but that's not usually necessary with LLMs, unless the harness is complicated and you have to hunt for the instruction it tells you about.
This is one of the reasons I use Pi. Pi’s minimal system prompt avoids contradiction between what the harness writer thinks is best and what the user thinks is best. The user specifies what the user wants and that’s pretty much the end of it.
Does the harness apply when you sue Claude model in third party IDE? like Opencode, or third party adds their harness on top, not replacing it?
[flagged]