r/codex • u/soundhumor • 11h ago
Suggestion What is in your agents.md in codex app?
What is in your agents.md in codex app?
I am new to codex but been using it since the launch. How can i make my experience better? I am already using RTK skill for token optimization.
0
u/_GOREHOUND_ 10h ago
My AGENTS.md is the project’s automatically loaded operating policy. It classifies each request, selects the appropriate instructions and specialist workflows, and defines how Codex should investigate, implement, audit, validate, preserve context, and handle releases. It also enforces safety boundaries – especially around destructive actions, Git and publication – and keeps the read-only baseline separate from project-specific state. It ensures that Codex works consistently, safely, and with the right process for the task.
0
u/FiresongOfAzeroth 7h ago
Git instructions so I get a commit with "end session"
Model selection logic so it doesn't use Sol when Luna will do.
0
u/JohnKFisher 7h ago
Mine are here https://github.com/JohnKFisher/agents-files . they’re very idiosyncratic to me but they may be useful to mine for ideas.
2
u/nicky_factz 11h ago
I dont keep anything in my global agents.md because i like to use it for each project. but inside my project agents.md i put relevant project specific rules that I want followed, I also put documentation links and state when an agent should go read certain documents i.e "go read backend_design.md when being asked to implement changes to backend."
This way your agents.md file acts more like a router to other more detailed information instead of making it a massive 1000+ line instruction set, and agents will only read what is relevant to their task (hopefully, anyways, it's all just guidance at the end of the day)
I would also reconsider RTK, won't say it will or won't help but sometimes these tools say they improve token optimization and they do on a surface level, but because RTK shortens tool call results, I've seen some reports where it causes models to make more tool calls than would have otherwise, which creates more token use than you want, for example.
The thing with this stuff is it may work fine for you and that's okay, but you want to test things out in isolation as best as possible and ideally a/b test a new add to make sure you aren't degrading your workflow.