AGENTS.md should be reloaded on Each Turn
Resolved 💬 6 comments Opened Sep 5, 2025 by astrosheep-zero Closed Nov 28, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
Currently, when AGENTS.md is updated during a conversation, changes aren't applied until you restart the session. And we don't have --resume functionality now, the conversation history is lost.
Solution: Automatically reload AGENTS.md on each conversation turn to ensure instructions are always current.
This also resolves issue #2927.
6 Comments
Looks like the --resume option is coming soon.
https://github.com/openai/codex/commit/234c0a0469db222f05df08d00ae5032312f77427
Thanks for the info!
But still I think it would be better to read AGENTS.md changes in time.
As it can serve as memories (from official guide), it should be able to develop as tasks progress.
Does this have an assignee yet? If not, I can take it and submit a PR.
This is a huge must and would allow developers to create self-improving AI to assist with large projects. The agents file could easily serve as a database of information that the AI can update with new findings and workflows as it learns the project.
Reloading Agents.md after every turn would be very inefficient, especially for longer AGENTS.md files. It would consume significant context window space and could create conflicting instructions for the model. If you modify AGENTS.md, it's best to start a new session. If you want to modify instructions within a session, it's best to do so surgically, not by repeating the AGENTS.md.
That definitely assumes that you can't implement a file delta for GPT to ingest which certainly can be done. The language model is smart enough to collate a delta from an original system prompt. So, just calculate a delta if you've used the AGENTS.md file before. It's not that complicated, shall I make a PR?