You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Look for custom prompts in {project root}/.codex/prompts/ first #4734
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
Reacted by Hotion, Maciek Bryński, Alexey Dubinin, Zarinah Casanova, vizonluo, mberthelier94, Glenn 'devalias' Grant, Tom Lester, Gabriel Terwesten, 忍者 and 38 more
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
Reacted by Hotion, Derek Chen, kvcop, JulianPinzaru, Ray Jasson and Chase Wang
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.
Reacted by Hotion, Glenn 'devalias' Grant, kvcop and Alexandr Kondratskii
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.sh with the following content:
#!/bin/bash
codex [YOUR_CODEX_OPTIONS] ".codex/instructions/default.agent.md .codex/prompts/test-coverage.md Focus only on analyzing the existing code for test coverage needs. Do not generate any unit tests yet—wait for my next instruction."
Then I simply run: .codex/bin/test-coverage.sh
This 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.
Reacted by JulianPinzaru, Francesco Rolando, Robert Hamilton, Fabián Figueredo, roman-che-dev, Ray Jasson, Zura Guerra, glebsa8, enprop, zero-phan and 1 more
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.
Reacted by Noname Oni, Manuel García, Igor, vjain419, enprop, zero-phan, Mark Wotton, Roki, YASHURA, Fabrizio Sabatini and 1 more
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 (#10573).
So skills cannot always be used in place of custom prompts.
I opened a feature request related to this situation:
There is currently no option to turn off the implicit invocation of skills (#10573).
@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 .md files and attach them only when required. This flexibility should remain with the developer.
Reacted by ynn, Muly Oved, Asuma Yamada, enprop, zero-phan, YASHURA and Denis
Activity
Hotion13 commentedon Oct 4, 2025
May this help you in meanwhile :
#4715 (comment)
sehz commentedon Oct 9, 2025
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
Hotion13 commentedon Oct 9, 2025
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 !
tlester commentedon Oct 12, 2025
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.
Hotion13 commentedon Oct 12, 2025
That would be must have to not being forced using agent locally, with customs prompts and same feature than CLI and vscode extension !
Helmi commentedon Oct 16, 2025
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)
Hotion13 commentedon Oct 16, 2025
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....
Helmi commentedon Oct 16, 2025
xiaowangzhixiao commentedon Oct 27, 2025
The feature is really needed because using the spec-kit on codex is too painful.
etraut-openai commentedon Nov 14, 2025
This is related to #3706
vpominchuk commentedon Nov 22, 2025
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.
JulianPinzaru commentedon Dec 3, 2025
Are there any plans to add this to one of the upcoming releases ? 😔
noname-oni commentedon Dec 11, 2025
Please add local .codex folder support
Add support for project-level custom prompts
etraut-openai commentedon Jan 22, 2026
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.
your-diary commentedon Feb 4, 2026
There is no way to disable implicit invocation of skills (#10573).
So skills cannot always be used in place of custom prompts.
I opened a feature request related to this situation:
rahuls360 commentedon Feb 10, 2026
@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.docs(codex): note project-scoped install blocked on openai/codex#4734
docs(codex): note project-scoped install blocked on openai/codex#4734
feat(host-codex): install surface — hooks.json + global prompts + CLI…