6 ms·
> Finally, we keep this file synced with an AGENTS.md file to maintain compatibility with other AI IDEs that our engineers might be using. I researched this th
by simonw 1y ago
> Finally, we keep this file synced with an AGENTS.md file to maintain compatibility with other AI IDEs that our engineers might be using.
I researched this the other day, the recommended (by Anthropic) way to do this is to have a CLAUDE.md with a single line in it:
@AGENTS.md
Then keep your actual content in the other file: https://docs.claude.com/en/docs/claude-code/claude-code-on-the-web#best-practices https://docs.claude.com/en/docs/claude-code/claude-code-on-t...
- raybb 1y agoYou think it would be a good idea to use a symlink instead?
- simonw 1y agoI'm still not 100% sure I understand what a symlink in a git repository actually does, especially across different operating systems. Maybe it's fine? Anthropic say "put @AGENTS.md in your CLAUDE.md" file and my own experiments confirmed that this dumps the content into the system prompt in the same way as if you had copied it to CLAUDE.md manually, so I'm happy with that solution - at least until Anthropic give in and support AGENTS.md directly.
- pletnes 1y agoOn windows, it depends on the local git configuration. It’s not something I’ve been happy with, especially since symlinks also behave differently again when you’re running a docker container to get your windows usable for development.
- OJFord 1y agoIt just creates the same symlink on any other checkout. (On Linux/macOS at least, Windows I believe requires local settings changes.) Only sane (guaranteed portable) option is for it to be a relative symlink to another file within the same repo, of course. i.e. CLAUDE.md would be -> 'AGENTS.md', not '/home/simonw/projects/pelicans-on-bicycles/AGENTS.md' or whatever.
- j_bum 1y agoI have AGENTS.md symlinked to CLAUDE.md and it works fine in my repos. But I can’t speak to it working across OS.
- BoiledCabbage 1y agoConfirm on a new clone that if you modify a file that the other is updated. I thought git by default treats symlinks simply as file copies when cloning new. Ie git may not be aware of the symlink.
- auscompgeek 1y agogit very much supports symlinks. Although depending on the system config it might not create actual symlinks on Windows.
- nivertech 1y agoI use symbolic links, and Claude Code often gets confused, requiring several iterations to understand that the CLAUDE.md file is actually a symbolic link to AGENTS.md, and that these are not two different, duplicate files The recommended approach has the advantage of separating information specific to Claude Code, but I think that in the long run, Anthropic will have to adopt the AGENTS.md format Also, when using separate files, memories will be written to CLAUDE.md, and periodic triaging will be required: deciding what to leave there and what to move to AGENTS.md
- sshh12 1y agoYeah that's probably a slightly cleaner way of doing it.
- donatj 1y agoWe have an AGENTS.md symlinked to CLAUDE.md, seems to work fine.
- schainks 1y agoThis is the way.
- allyant 1y agoThis is one thing I think they need to get in-line with, and rename CLAUDE.md to AGENTS.md to follow convention.
- embedding-shape 1y agoTo be fair, I think Anthropic/Claude started doing CLAUDE.md before AGENTS.md was a thing.
- jstummbillig 1y agoI'd say if we criticize that they did not think that far ahead, we are still pretty fair.
- unfunco 1y agoThey ain't giving up that free marketing.
- SavioMak 1y agoI strongly disagree. It is extremely annoying when I cannot make different agents read a different prompt file when I needed to tell them different things. Cursor currently autoloads AGENTS.md without a way to disable it and it sucks.
- caymanjim 1y agoIn my experience, neither Claude nor any other agent actually reads AGENTS.md (or CLAUDE.md or anything else) without being told to explicitly every session.
- simonw 1y agoI've sniffed Claude Code's HTTP traffic and confirmed that the CLAUDE.md file content (and AGENTS.md if it is @-referenced) is automatically included in the system prompt without it having to perform any additional file read operations.
- topherhunt 1y agoWow! That's.... discouraging, actually, considering how frequently Claude ignores my AGENTS.md guidance.
- brulard 1y agoDid you notice the @-referencing requirement? AGENTS.md is not included by default, but CLAUDE.md should be