codex icon indicating copy to clipboard operation
codex copied to clipboard

/update-agents.md command

Open robin-liquidium opened this issue 1 year ago • 7 comments

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

robin-liquidium avatar Sep 20 '25 13:09 robin-liquidium

You can do this by creating a slash command for it in ~/.codex/prompts. For example I use ~/.codex/prompts/update-mds.md with a prompt that tells the agent to update all relevant Markdown files, such as AGENTS.md or spec files such as plan.md

Docs: https://github.com/openai/codex/blob/main/docs/prompts.md

feli0x avatar Sep 20 '25 14:09 feli0x

Suggestion from @feli0x is great, closing this for now as there is a good solution for this already. Thank you for the suggestion!

tibo-openai avatar Sep 21 '25 18:09 tibo-openai

Disagree - Claude Code for example, allows you to run /init repeatedly, whenever you like, and it will update all Claude files. Codex should absolutely allow you to either run /init again, or implement /update

NeonWizard avatar Dec 16 '25 02:12 NeonWizard

I 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.

zihang-huang avatar Jan 13 '26 09:01 zihang-huang

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).

etraut-openai avatar Jan 13 '26 16:01 etraut-openai

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?

NeonWizard avatar Jan 13 '26 16:01 NeonWizard

So I guess for updating AGENTS.md, the best way is to prompt it inside AGENTS.md itself and not calling /init

shotx333 avatar May 23 '26 21:05 shotx333