Look for custom prompts in {project root}/.codex/prompts/ first
Resolved 💬 16 comments Opened Oct 4, 2025 by alexeyv Closed Jan 22, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What feature would you like to see?
People are using development tools (such as Codex CLI) to work on multiple projects. Some of us have project-specific custom prompts, and even SHARED custom prompts, version controlled in project repos. Both are great reasons why global ~/.codex/prompts/ is not good enough.
Yes, I can do CODEX_HOME=pwd/.codex/ every time I switch to another project or worktree, that is (a) a rather silly hoop to jump through, but more importantly (b) I now have all the stuff that SHOULD live in ~/.codex split between multiple locations. Yuck!
Proposal: search for /custom-prompt should look for {project root}/.codex/prompts/custom-prompt.md first, then go to $CODEX_HOME or ~/.codex
Additional information
_No response_
16 Comments
May this help you in meanwhile :
https://github.com/openai/codex/issues/4715#issuecomment-3368447587
Running into same problem. Codex should support multiple places to looking for prompts. There should be a system wide codex config as well as project specific. Overriding system wide doesn't work since that's where auth setting are stored
Oh, and one more think.
With my little linux envrc trick, or my python package custom prompts works for codex-cli, it's still broken in codex ide (vscode extension) !
I dont even understand how this extension is meant to be used effectively !
This feature will be important later was we will want to use custom prompts when we run tasks in the cloud. If they are in the projects .codex directory, then the prompts directory can live in the repo and the cloud tasks can have access to the prompts.
That would be must have to not being forced using agent locally, with customs prompts and same feature than CLI and vscode extension !
can't see how this is not implemented from the beginning. I totally second the request to have a project based folder for prompts (and config as well)
Have you tried my little project ? If this might help you: https://github.com/Hotion13/cx-prompts
It'll hardlink your custom prompts to your user home codex folder.
Tell me if it's work for you too. I'll delete it when this will be implemented by codex....
Thanks for your work and for pointing it out. I might try this later.
The feature is really needed because using the spec-kit on codex is too painful.
This is related to #3706
I found a temporary workaround for project-specific prompts that may help others until native support is available.
In my project root, I created an executable script at:
.codex/bin/test-coverage.shwith the following content:Then I simply run:
.codex/bin/test-coverage.shThis initializes the agent with prompts scoped to the project.
It’s not ideal, since you need to exit and restart another agent when switching tasks (or run multiple Codex sessions and swap between them), but it works reliably for now.
Native project-level prompt loading would make this much smoother, especially when versioning prompts within the repository.
Are there any plans to add this to one of the upcoming releases ? 😔
Please add local .codex folder support
We have decided to deprecate support for custom prompts. We recommend switching to skills, which provide all of the functionality of custom prompts and more.
There is no way to disable implicit invocation of skills (https://github.com/openai/codex/issues/10573).
So skills cannot always be used in place of custom prompts.
I opened a feature request related to this situation:
@etraut-openai This accurately highlights the core distinction between custom slash commands and skills. Skills are designed to be triggered automatically by the LLM whenever a particular task needs to be performed. In contrast, custom slash commands are manually triggered by developers when necessary, providing a convenient way to execute predefined prompts.
Deprecating stash commands creates inconvenience when trying to store
.mdfiles and attach them only when required. This flexibility should remain with the developer.