4 ms·
My CLAUDE.md is just: @AGENTS.md And Claude processes it just fine. (I see that it's a common workaround, and there's a comment in the above link saying
by ValentineC 4mo ago
My CLAUDE.md is just:
@AGENTS.md
And Claude processes it just fine.
(I see that it's a common workaround, and there's a comment in the above link saying just this: https://github.com/anthropics/claude-code/issues/6235#issuecomment-3217884068 https://github.com/anthropics/claude-code/issues/6235#issuec...)
It's a hassle having to add it to every repo that I use Claude with though, and I often use other models and harnesses too for the more trivial tasks.
- troupo 4mo agoI beg people to learn what symlinks are. The fact that "put @AGENTS.md in there" is a "common workaround" shows why programmers (good ones at least) are not going anywhere soon.
- ahtihn 4mo agoSymlinks are a pain if you're on Windows, I'd rather not bother with them.
- layer8 4mo agoSymlinks aren’t portable.
- rurban 4mo agoPortable to all systems Claude runs on
- ValentineC 4mo agoOne bonus to this approach is that I can add Claude Code-specific stuff in there, that I wouldn't need for other harnesses.
- deleted 4mo ago[deleted]
- fortuitous-frog 4mo agoI used to use a symlink but was concerned that Claude might see the presence of an "AGENTS.md" file (in e.g, a "List Files" tool call output or from a direct `ls`), be curious and attempt to read it directly (not knowing that it's the same as the "CLAUDE.md" file auto-injected by the harness), and essentially double the token impact / context bloat. Indeed, I did some local experimentation and noticed this was the case, which is why I switched to the explicit "@AGENTS.md" approach. So perhaps there's no need to be rude about it :)
- lelandbatey 4mo agoYour solution "appears" to solve the problem, but without any information about how exactly that solution works, it's just magic an vibes. Does the harness parse the contents of CLAUDE.md, see the @AGENTS.md and then inject the contents of AGENTS.md into that file with a note saying "hey Claude-the-llm, here's the contents of AGENTS.md per an @reference"? Does the harness parse and inject but WITHOUT any ceremony telling claude-the-llm that what it's looking at is from another file? Or does the harness do nothing and Claude-the-llm is merely trained to see @references and treat those as "I should go read that file"? Which is it? If it's #1 and #3, then on long contexts/after compaction, then the LLM is still pretty likely to lose the fact that it read that file and re-read it again. If it's #2, the LLM could have the same problem as with the symlinks. How does it work? The Anropic docs certainly don't say. So what's the best choice? I guess it's magic. For folks like me who care though, I guess there's always Pi or Opencode (or even, writing your own harness [which is shockingly easy if you want it reliable without all the fanciest features]).
- thejazzman 4mo agowhy over complicate it? the answer is obviously yes? it sees it and reads the file? might it sometimes not? yeah, just like every other thing you write in agents.md or the prompt. if you want to write a more verbose statement telling it to read the other file do so. or if you really want to make damn sure it read what you wrote, then symlink it, because it does in fact read the thing twice.
- dpkirchner 4mo agoI'm pretty sure some agent harnesses read both files when present, so this @ "aliasing" is more token efficient.
- lijok 4mo agoGood programmers know symlinks are not portable
- _alternator_ 4mo agoNeither are line endings. But like line endings, I just put it into git and get over it.