/update-agents.md command
Resolved 💬 7 comments Opened Sep 20, 2025 by robin-liquidium Closed Sep 21, 2025
💡 Likely answer: A maintainer (tibo-openai, collaborator)
responded on this thread — see the highlighted reply below.
What feature would you like to see?
you currently already have the /init prompt which creates an AGENTS.md file. i'd love to have a /update prompt that updates my AGENTS.md file by removing outdated information and adding updated information. It will make it much easier to maintain a good AGENTS.md file.
Are you interested in implementing this feature?
_No response_
Additional information
_No response_
7 Comments
You can do this by creating a slash command for it in
~/.codex/prompts. For example I use~/.codex/prompts/update-mds.mdwith a prompt that tells the agent to update all relevant Markdown files, such asAGENTS.mdor spec files such asplan.mdDocs: https://github.com/openai/codex/blob/main/docs/prompts.md
Suggestion from @feli0x is great, closing this for now as there is a good solution for this already. Thank you for the suggestion!
Disagree - Claude Code for example, allows you to run
/initrepeatedly, whenever you like, and it will update all Claude files. Codex should absolutely allow you to either run/initagain, or implement/updateI also agreed with @NeonWizard , how Claude Code handles all the text prompt file for agentic coding is really convenient and Codex definitely should have similar features.
Have you tried prompting Codex to update your AGENTS.md? There are different forms of "update" that you may want ("completely rewrite", "update terminology", "adjust design rules", etc.), so it's not clear that a general "update" command would work for everyone.
If you find that you want the same "update" all the time, you could write a custom prompt (invoked as a slash command) or a skill (invoked with a dollar sign).
I think it would be up to the agent on what amount of updating needs to be done, no? Thus the whole reason of an autonomous agent with decision-making capabilities?
So I guess for updating AGENTS.md, the best way is to prompt it inside AGENTS.md itself and not calling /init