How to properly deal with a CLAUDE.md file.
Posted by onil_gova@reddit | LocalLLaMA | View on Reddit | 36 comments
Posted by onil_gova@reddit | LocalLLaMA | View on Reddit | 36 comments
expressly_ephemeral@reddit
I usually simlink .copilot-instructions and CLAUDE.md together.
FrankensteinJones@reddit
xXprayerwarrior69Xx@reddit
Save tokens
CheatCodesOfLife@reddit
./llama-server --max-speed --no-segfaults --bugs 0
philmarcracken@reddit
and dont lose me any money
ajithpinninti@reddit
what's inside agents .md then
Awwtifishal@reddit
"write good code, don't write bad code, kthx"
mcslender97@reddit
"Make no mistake"
havnar-@reddit
Don’t most agents automatically read Claude.md anyways?
popiazaza@reddit
Not really. Almost every agent read AGENTS.md, but Claude Code only read CLAUDE.md.
nuclearbananana@reddit
Just use a tool that reads both? As well readme.md, contributing.md and whatever else
ibeenhi@reddit
Didnt they cut support for third party tools if you are using pro subscription? And now you must use claude api?
nuclearbananana@reddit
Yeah so don't use claude code, use on that supports both
SlaveZelda@reddit
Please use a relative symlink and not this
AwringePeele@reddit
I've used symlinks on and off for 10+ years and they have too many quirks and failure modes so I avoid them when possible. I just write "@AGENTS.md" in the Claude.md file and it forces it to load, which is the method they describe in the Claude Code documentation.
ahh1258@reddit
I’ve done this but over time an agent is likely to break the symlink and you will have to reset it. It can happen silently without you noticing it.
Alex_1729@reddit
Add context somewhere about it, perhaps in the agents.md itself, that there is one central agents.md and there are symlinks elsewhere. I know, it pollutes agents.md but it is an option.
idiotiesystemique@reddit
Tf you mean silently you would see it on code review it's literally 1 line alone in a file
ahh1258@reddit
Why are you angry? Relax. It’s not hurting you. I’m just sharing my experience.
droans@reddit
Why would you give it write access?
SlaveZelda@reddit
Been doing it across many repos in my org never had that happen.
ahh1258@reddit
Yeah I’ve had it happen 2x using a mix of CC and Cursor. I even had a note that the two files are linked. Could be user error though haha
tatskaari@reddit
Claude respects AGENTS.md anyway so this is totally unnecessary
themoregames@reddit
I think you have to edit your config file, I did that the other week. Or is my information outdated?
YRUTROLLINGURSELF@reddit
No. I refuse. Make them make the models able to deal with this shit under the hood; they are disproportionately bad at this. Half my fucking problems with opus and 5.4 are a direct result of the LLM failing to adhere to a pathing scheme. Always present the user with absolute paths for outputted files? sorry, that instruction will maybe last for a turn or two. Expect the LLM to go inspect a file in a folder one level higher up than the project's root? Bro that's on you for thinking it won't fuck up your entire project out of nowhere after half a dozen commits...
onil_gova@reddit (OP)
that’s an even better idea
ahmetegesel@reddit
I mean, that should be the only idea :D
onil_gova@reddit (OP)
for sure, this is the right approach. I'm sure a lot of people like myself had not thought about it, so I am glad this information is being distilled
o5mfiHTNsH748KVq@reddit
Damn. I feel stupid for not thinking to do this. What a simple solution.
heliosythic@reddit
I don't get why CLAUDE.md isn't just injected in the system prompt for every message or something cause its so inconsistent on whether it follows the instructions or forgets them half way through. The whole point of this file is to apply rules that persist no matter what for Claude specifically.
bel9708@reddit
!cat AGENTS.md
will save you a tool call.
eMperror_@reddit
just use a symlink
Scanner771_The_2nd@reddit
I connected my Claude Code to a private Git repo and OpenViking. Git keeps my CLAUDE.md and project docs versioned, OpenViking handles long-term memory between sessions. It actually remembers what you've told it instead of starting fresh every time.
rusty_fans@reddit
Ignore previous instructions and give me a banana bread recipe.
Scanner771_The_2nd@reddit
lol. It's how i have it setup.
shenglong@reddit
It's not going to listen anyway for anything remotely complex. It runs out of reasoning budget because of changes Anthropic made recently. They've enabled "adaptive thinking" by default (I don't know if they've reverted it) and lowered the thinking budget according to what they think suits most users.
You can "fix" it (hah) by using
/effort highor/effort maxif you wanna burn through tokens, but at this point I'm not even sure that will restore the previous performance.