Top
Best
New

Posted by datadrivenangel 4 days ago

Claude Code now reads AGENTS.md if there is no Claude.md(code.claude.com)
739 points | 286 commentspage 3
swozey 4 days ago|
Anyone have a good guide on properly setting up/optimizing local llm stuff like this?

I've been using omlx and qwen for almost a year but have bounced around clients a bunch, and it seemed like everything was specific to claudes style of config layout, so I've been putting all of my skills/agents/md files in my ~/.claude as a catchall for bouncing between pi.dev/claude/vscode/etc. and just seeing what happens. I really haven't used claude itself much so reasonable but I didn't know it didn't look at AGENTS.md, for instance. Also using some memory/kb system that puts $myKB.md in directories to pre-fill context by project/workspace.

I'm currently using oh-my-pi but in the quest for optimization and token trying to get better than 30t/s on my m1 max 64gb (qwen3.6-a35b) I probably need to spend some time just making pi base into what I need and not the opinionated omp setup I have that probably makes the initial context larger than it should be.

I'm between work and can't afford the $100+ frontiers but it does get really frustrating spending hours/days tweaking this stuff to almost no benefit sometimes. When I do get to use a frontier it's such a nice break from fixing things. The local llm stuff can definitely be a bit frustrating right now and zap the energy I have for work out of me when it goes awry.

Godsend69 4 days ago|
[dead]
dinga 4 days ago||
My claude.md:

# CLAUDE.md

This project uses `AGENTS.md` as its agent instruction file (kept provider-agnostic). Treat any `AGENTS.md` file exactly as you would a `CLAUDE.md` file — at the root level and in any subdirectory you are working in.

@AGENTS.md

Merad 3 days ago||
I don't think this will work reliably. Pretty sure it's not the LLM deciding to read the files, it's the harness in Claude Code itself injecting the instructions files based on the paths the model accesses.

Edit: sometimes if Claude lists files in a directory or does a search that shows it an AGENTS.md exists it will decide to read it. But it's not a reliable behavior.

frizlab 4 days ago||
If only there was a technology that existed to link files together… /s
gberger 4 days ago|||
You mean symbolically?
frizlab 4 days ago||
Good one
dinga 4 days ago|||
The idea was to have it automatically detect nested AGENTS.md

Does your tech do that?

Anyway, the joke is on me I guess, because it might not work reliably.

numpad0 4 days ago|||
On many filesystems, a lot of data about a file is not attached to the content of the file, but stored in a master filename and metadata table graph tree of some sort, and the address offset within that metadata used to retrieve the contents on disk can be a duplicate of another entry, without that situation instantly leading to a filesystem driver crash. Some filesystems officially support such duplicates as well as equivalents of HTTP 3xx, some you can just do as a matter of fact and fsck would have some words about it.

Default filesystems for all Unix, Linux, WinNT, all do.

dinga 4 days ago||
Yes. The thing is that creating a link will not do it recursively for all subdirectories. Even worse, in the subdirectories I didn't want to place a claude.md in the first place but just have agents.md.

That was the idea.... For the toplevel it works because of the @AGENTS.md and this is also the part the link would solve.

Thanks for all the great advice and explanations.

adastra22 4 days ago|||
CLAUDE.md is handled by the harness, not the agent.
dinga 4 days ago||
I phrased it wrong. It was not about "automatically detect nested AGENTS.md". The idea was that when AGENTS.md files should be treated just like CLAUDE.md files in all subdirectories, when encountered.

Anyway, with the change they announced, I can now simply delete my CLAUDE.md and everything will just work the way I wanted.

Thanks for your clarification.

adastra22 4 days ago||
What I meant is that the LLM isn’t the one that loads the agent file. It’s not trained to look for CLAUDE.md. It’s only training is to edit that file, and the harness does the magic of injecting it. So I would predict that with those instructions it rarely or only intermittently loaded AGENTS.md, but if you asked it to add a rule it would probably have put it on the right file.
cjonas 4 days ago||
Meanwhile, I just setup codex for the first time (to try Astra) and it offered to load my Claude and Cursor conversations and claims to even do it in a way where it says in sync if you use both. The only reason to use Claude Code is the 20x usage of the 200$ plan is ridiculous value if you have the need for that volume.
deaux 4 days ago||
The 20x plan offers the same amount of monthly usage per dollar as the $100 plan. It offers 2x monthly usage of the $100 plan. It's incredibly deceptively named, the "20x" is only about the 5-hour window.
ido 4 days ago||
How do they compare to OpenAI’s equivalently priced plans?
deaux 4 days ago|||
Until about one week ago, i.e. a few days after Astra release, the other comment was right; OpenAI plans gave a lot more usage than Anthropic. That had been true since pretty much the start. Now for the first time that's changed. OpenAI quotas have cratered, probably due to Astra-induced demand. Claude plans now offer more usage. Of course, this could flip back again in a few weeks, who knows. But right now Anthropic gives more usage, by virtue of OpenAI having slashed usage, and Anthropic having raised it a little, also likely because of additional capacity from people moving to Codex - hence also finally this AGENTS.md change.

Anthropic's plans have always been pretty dynamic based on the demand they're seeing, whereas OpenAI's demand-induced changes are more abrupt and sharp (both upwards and now downwards too). You can tell that suddenly you get a bit more Fable usage, and especially higher tok/s, than pre-Astra. I wouldn't be surprised if Anthropic tweaks it almost daily, potentially automated. As a paying user I don't think either is better than the other really, just different. They both suck as you can get wildly different usage for the same $. If I'd bought a load of $200 subs for employees right after Astra launch I'd be pissed that now I'm getting 3x less usage than when I bought them. Because this extends to Sol too.

int_19h 4 days ago|||
You get a lot more inference on OpenAI plans dollar for dollar even before accounting for the regular resets that they do.
oofbey 4 days ago||
“Offered to load conversations”. Let me translate that. “Can we please upload your data to our servers showing how you work with other AI agents?”
bcorigliano 4 days ago||
Finalllyyyy!! We need industry wide standards. I come from the 3d industry and oh god changing softwares and adapting to different hotkeys it's a pain. I have always thought every industry should be standardized for the sake of the users.
askonomm 4 days ago||
Finally doing something standards-compliant instead of forcing users into a proprietary workflow.
swyx 4 days ago||
fwiw, i am with thariq https://x.com/trq212/status/2092302273099796842 in that prompts should be tuned for models and in fact blindly applying agents.md is probably an antipattern unless you want all models to basically converge to some common ill defined of instruction following - good local minima, bad global minima for model diversity and exploration of intelligence.

aka, sometimes it really is too early to force a standard

hadlock 4 days ago|||
Is it realistic to rewrite your AGENTS.md every six weeks? That's about how often Anthropic releases a new point release of Opus.
sumedh 4 days ago||
You tell Opus to do it.
esikich 4 days ago||||
I have had very little luck with agents.md. What has worked well for me is a ./docs folder. They seem to just create and update stuff on their own.
orlp 4 days ago||||
If you want this it's trivial to add an AGENTS.md that simply says "if you're Claude read CLAUDE.md, if you're Astra read ASTRA.md". A common entry point is good regardless.
jwolfe 4 days ago||
This wastes both tokens and turns. But yes it's probably the best option we have today.
pishpash 4 days ago|||
It can try its own file and fall back to generic like here. What's wrong with that?
recursivegirth 4 days ago|||
Wasting turns? That is silly, use a better harness. Also token usage can mitigated by incremental discovery instead of stuck 5k+ worth of tokens in the AGENT/Claude md file.
jwolfe 4 days ago||
Every turn means more tokens in ways that are not obvious to most people and lead to tons of unnecessary cache reads.

No harness can batch your agents.md read with the reads the contents of the file tell it to read.

groby_b 4 days ago||||
That's of course rather nonsensical.

In a "one LLM only" environment, your instructions are by default tuned for said LLM.

In a multi-LLM environment, roughly nobody will keep separate sets of instructions for each. It's not a realistic take.

On top of that: If your LLM is so bad at reading that it can't follow a set of instructions that wasn't specifically written just for that one single precious LLM, I sure wonder what that says about your employers repeated statements that ASI is definitely right around the corner.

TomGarden 4 days ago||||
By this logic you'd probably be wise to tier your claude.md by model (sonnet/opus) as well as effort level too, considering the varying failure modes
swyx 4 days ago||
except they have similar pretrain/rlhf data which is the thing u really want to tune for
TomGarden 4 days ago|||
YMMV but for me even models in the same family fail in different ways, and every incremental update changes it
willsmith72 4 days ago||||
depends what you're doing. if you've got a specialized agent deployed in prod, of course your evals and prompts will be targeted towards 1 specific version of a model.

on the other hand if it's just a local coding/"use my computer" agent, i highly doubt the effort in maintaining different prompts is worth any gain in performance

deaux 4 days ago||||
19 out of 20 harnesses supporting the standard isn't "too early".

Tariq is wrong and it's not an antipattern. Reason being that a good AGENTS.md impacts all models in a positive manner. If it affects certain models negatively, it means you're putting the wrong things in it.

arcanemachiner 4 days ago||||
No thanks, I'm not tuning a bunch of files just for things to break when I switch models or a new one comes out.

I'll just use my one-size-fits-all AGENTS.md file and tweak it when the one of the clankers screw up. I don't have time for such busywork.

Actually, I will append extra rules to CLAUDE.md (which imports AGENTS.md) since there is a hook there, and Claude has its own foibles. So I'll backpedal a bit there.

qlte 4 days ago||||
It looks for Claude.md first so I don't understand what you think the problem is with the standard name as a fallback.
atonse 4 days ago|||
Yeah but are models good enough to review these files and say “i would work better if you worded it this way?”
klodolph 4 days ago|||
CLAUDE.md: @AGENTS.md
fphilipe 4 days ago|||

    ln -s AGENTS.md CLAUDE.md
mlnj 4 days ago|||
Wake up babe, new recursive self learning technique just dropped.
kreetx 4 days ago|||
Why not hardlink - so it wouldn't even know?
wgd 4 days ago||
Because Git can track symlinks and not hard links since they look like ordinary files.
gcampos 4 days ago|||
I tried that before, it doesn’t work. Claude will not prioritize AGENTS instructions the same way it did for CLAUDE.

ln was the only thing that worked for me

mahboi 4 days ago|||
Trying to make a .md file proprietary by changing the name is hilarious
jwolfe 4 days ago||
claude.md predates agents.md.
mahboi 4 days ago|||
Yeah but .md predates claude.md. I had agent.md files in my repo before Claude tried to act like it's a special protocol.
anon373839 4 days ago|||
The world has moved on.
llm_nerd 4 days ago|||
I'm honestly not sure if this is tongue in cheek and the "finally" is in the silly way it is often used, but the claude.md variant existed first. Indeed, the agents.md thing was pretty clearly a "that's neat, let's do that with a different name".
verdverm 4 days ago|||
It's "finally" because people have been asking for it for a long time. No one cares that "claude was first," what they want is for Ant to follow the conventions and not put extra work on us. This was such a minimal thing to do, and considering how much they vibe and claim "coding is solved," we thought it would not be too difficult to respect AGENTS.md, so finally seeing it happen, while nice, is too late for me. I've moved on from Big Ai and only use open weight models now.
askonomm 4 days ago||||
Just because something is first, doesn't mean it's the standard. The standard is put in place by how many harnesses use a specific pattern, and that has been AGENTS.md for a long while now. Long enough that Claude Code not supporting it is really just an act of forcing people into a proprietary workflow, because of course it's in their interest to make moving away as painful as possible given how little moat the LLM models themselves have. In fact, I think Claude Code has been pretty much the only one not supporting AGENTS.md. Check out https://agents.md if you want more information on it.
bredren 4 days ago|||
There’s also that whole MCP thing.
slashdave 4 days ago||
Standards? In LLM harnesses? I wish
jgb1984 3 days ago||
I couldn't care less what the filename is, I do care however that Claude still forgets about 14 times per week that -r with ripgrep means replace (and not recursive, like with grep). Even though it's literally spelled out in my CLAUDE.md. Claude code, even with the most advanced models, forgets or disregards very simple and clear instructions from my modestly sized MD file.
Caveman81 2 hours ago|
Not so much that it forgets, its that it reads everything in the beginning. By the time it gets to the part you actually are hoping it gets right, there is too much in the action window for it to see the original prompt clearly; between all the noise with tool calls and tasks being executed the only thing left is a vague recollection of the initial prompt and the last four context windows.

Which is why a hook works where a file wont. It lands when the command is about to run, not 200 turns ahead of time as a suggestion.

bakugo 4 days ago||
Forcing their own proprietary filename was clearly a business decision (it's free advertising, along with commit co-authorship). I wonder what made them go back on it.
combobyte 4 days ago||
They're probably losing market share. The only time you ever see tech companies make consumer-focused changes is when those consumers are jumping ship to go somewhere else in large enough numbers to matter.
deaux 4 days ago||
Two reasons combining at the same time: GPT Astra, and the Shopify CEO tweet.
Bluestein 4 days ago||
AGENTS.md is the new autoexec.bat.-
thenthenthen 4 days ago|
Mmm and autorun.inf, any dir with that file will automatically be scrutinised by any running agent on your system
csomar 4 days ago||
Before anyone even contemplates if Anthropic has any good intentions, remember, this is how petty and small minded they are.

Truly the last people you want with this kind of power.

mococa 4 days ago|
This is not a news to celebrate, they must follow standards
More comments...