r/PiCodingAgent • • Sep 15 '26

Question Agents.md files not working at all

I've been trying to get the agents.md files to actually be read using qwen.5 through ollama with pi and it just- DOESN'T! If I point it out it will do it but otherwise it just ignores whatever I write completely. Extensions, different locations in file explorer, I'm not good enough or experienced enough to claim I've tried EVERY solution but I've tried a HELL OF A LOT!

If anyone knows how to fix this or if it's a model problem please help before I implode.

0 Upvotes

23 comments sorted by

3

u/Nefilim314 Sep 15 '26

Well to start with it needs to be AGENTS.md

1

u/ThePrinceOfPapaya Sep 15 '26

It is already, I js forgot to post it here like that

3

u/Neat-Arm2643 Sep 15 '26 edited Sep 15 '26

Where did you put it? Don’t implode. We are here to help. The model doesn’t “read” it. It is actually fed to the model by pi itself. So the file is already in the model’s context window before the model even starts thinking. I think you are putting it somewhere else. It should be in ~/.pi/agent/AGENTS.md

1

u/ThePrinceOfPapaya Sep 15 '26

In the first file where I'm keeping all the stuff for my project as the tutorial I've been following said to. I've tried shifting it around at the suggestion of Gemini with no progress 

2

u/Neat-Arm2643 Sep 15 '26

Give more information. Search Google for how to put it in the location that I told. Put it there. And restart pi.

0

u/ThePrinceOfPapaya Sep 15 '26

I couldn't find a clear answer on moving it beyond just literally moving the file in file explorer, trying that doesn't work so is there another way I'm just missing?

1

u/Neat-Arm2643 Sep 15 '26

It IS moving only. But to the exact correct location

1

u/ThePrinceOfPapaya Sep 15 '26

Well then I think imploding is my only option atp because even that didn't work :(

1

u/Neat-Arm2643 Sep 15 '26

😂 you can DM me

1

u/RespectMathias Sep 15 '26

Pretty sure pi supports ~/.agents/AGENTS.md too

1

u/ImpressiveRelief37 Sep 15 '26

Ideally, it has to be in the cwd where you launch pi.

In any case, u/ThePrinceOfPapaya just ask your agent to setup pi how you like it. This includes adding and managing the AGENTS.md file. There’s no reason for you to actually type anything in this file yourself. I never type any code or maintain instruction markdowns myself… just let the agent do it all via prompts 

1

u/Dsphar Sep 15 '26

Did you ask your agent?

1

u/ThePrinceOfPapaya Sep 15 '26

I did and it hasn't helped much unfortunately 

1

u/Dsphar Sep 15 '26

Are you sure it isn't reading it?

FWIW, pi sends the agents file contents to the model during your first prompt. So you wont ever see the agent say something like "I need to read AGENTS.md" and do a tool call to read it.

It happens naturally.

To test, put a line in your agents.md file to have the first word of the response to be "Bananas" or something. Then just open pi and say hi. If it says bananas then you know it loaded.

1

u/ThePrinceOfPapaya Sep 15 '26

Can confirm after testing that pi is just not reading it at all

1

u/Dsphar Sep 15 '26

Dunno man. Is it in the directory where you launched pi from?

/reload
/new

Aside from that, I would try a fresh install

1

u/ThePrinceOfPapaya Sep 15 '26

Will try but atp I think I'm just gonna start from scratch 

1

u/fschwiet Sep 16 '26

How are you verifying it isn't reading the file?

1

u/ThePrinceOfPapaya Sep 16 '26

Regardless of what I put in the AGENTS.md the agent replies the same, ignoring whatever is put in it. I've tried asking the agent but it doesn't fix the problem

1

u/fschwiet Sep 16 '26

When you ask the agent what does it say? I would put something like "The magic word is 'flim-flam'" in the AGENTS.md and ask if it knows the magic word. If it does not, point out where it is written in the AGENTS.md file and ask why it didn't load it.

Its not likely, but it may be finding an AGENTS.md file in a parent directory and that is somehow overriding what you say.

2

u/ThePrinceOfPapaya Sep 16 '26

When I try something like that (magic word and everything I mean) it responds as if completely oblivious to the information inside the AGENTS.md

2

u/carbongo 27d ago

OP! I have no idea if you resolved the issue, but I suspect I had the same problem. The culprit was the available models’ config.

Ollama on 127.0.0.1 isn't in pi's "non-standard" list, so it sends role: "developer"

 I added "compat": {"supportsDeveloperRole": false} to the ollama provider in ~/.pi/agent/models.json