Skip to content

Look for custom prompts in {project root}/.codex/prompts/ first #4734

Closed as not planned

Description

@alexeyv

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

Activity

  1. added
    enhancement
    on Oct 4, 2025
  2. Hotion13 commented on Oct 4, 2025

    @Hotion13

    May this help you in meanwhile :
    #4715 (comment)

  3. sehz commented on Oct 9, 2025

    @sehz

    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

  4. Hotion13 commented on Oct 9, 2025

    @Hotion13

    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 !

  5. tlester commented on Oct 12, 2025

    @tlester

    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.

  6. Hotion13 commented on Oct 12, 2025

    @Hotion13

    That would be must have to not being forced using agent locally, with customs prompts and same feature than CLI and vscode extension !

  7. Helmi commented on Oct 16, 2025

    @Helmi

    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)

  8. Hotion13 commented on Oct 16, 2025

    @Hotion13

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

  9. Helmi commented on Oct 16, 2025

    @Helmi
  10. xiaowangzhixiao commented on Oct 27, 2025

    @xiaowangzhixiao

    The feature is really needed because using the spec-kit on codex is too painful.

  11. etraut-openai commented on Nov 14, 2025

    @etraut-openai
    Contributor

    This is related to #3706

  12. vpominchuk commented on Nov 22, 2025

    @vpominchuk

    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.

  13. JulianPinzaru commented on Dec 3, 2025

    @JulianPinzaru

    Are there any plans to add this to one of the upcoming releases ? 😔

  14. noname-oni commented on Dec 11, 2025

    @noname-oni

    Please add local .codex folder support

  15. added
    agent
    on Dec 14, 2025
  16. etraut-openai commented on Jan 22, 2026

    @etraut-openai
    Contributor

    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.

  17. your-diary commented on Feb 4, 2026

    @your-diary

    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:

  18. rahuls360 commented on Feb 10, 2026

    @rahuls360

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions